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