how to select a particular portion in am image automatically?

조회 수: 1 (최근 30일)
In a video of a man walking in a plain background... i splited that into frames.now i want in each of the frames just to select where the man is? not the other things.. i used imcrop(a) but its manual thing... is any function avail in matlab to select automatically in a rectangular fasion?
Is my question clear? Thanks in advance...!

채택된 답변

David Legland
David Legland 2012년 9월 21일
Hi,
using imcrop you can also specify the coordinates of the box. Then you do not have to click. But you have to know the position in advance.
If you are looking for a method that detect the position of the man, this is an image segmentation problem. There are various methods in image processing toolbox. One possibility is to try to use graythresh function, together with im2bw. There are other more complicated algorithms, the most appropriate one depends on the kind of image.
You can extract the bounding box of a region with the "regionprops" function, using the 'BoundingBox' tag.
Regards, David

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by