How to find object in a image ?
6 ビュー (過去 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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153550/image.png)
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!