How to find object in a image ?
7 次查看(过去 30 天)
显示 更早的评论
I have a binary image with different objects. I want to find the number of object in the image in a particular length .For example suppose the horizontal length of the image is C. Now I want to find the number of objects in a region of horizontal length of 1 to C/2. Similarly next region length will be 2 to (C/2+1). Next will be 3 to (C/2+2). For each region the length will be same. In matlab is there any built in function to scan in that way? Thank You
0 个评论
采纳的回答
Image Analyst
2016-1-25
Yes. See my Image Segmentation Tutorial to learn how to make measurements such as area, major axis length, etc. from the binary image: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
If you want, after calling regionprops() you can call bwpropfilt() to extract out blobs with properties (such as MajorAxisLength) that lie in a certain range (such as 0.4*C to 0.6*C), and exclude everything else.
2 个评论
Image Analyst
2016-1-25
What exactly does that mean? Do you mean like how you can use imdistline() or ginput(2) or imline() to specify two points that define the length of the thing you want to extract? Or did you mean something else?
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!