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...!
0 件のコメント
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!