Hi there, I want to detect an object which is so close (stick) to another object. can any one help me how I can do that
2 views (last 30 days)
Show older comments
In attached image, there are two objects so close to each other, how I can detect only one of them?
0 Comments
Answers (1)
Image Analyst
on 8 Apr 2014
Just draw a black line across the intersection to separate them. See attached demo.
2 Comments
Image Analyst
on 9 Apr 2014
No, you'll get measurements for both. If you want you can use ginput(1) to indicate which one to remove. Or just throw away the measurements you don't want. Like if you never want the blob on the left, just label the image and use ismember to remove it.
labeledImage = bwlabel(binaryImage);
blob2 = ismember(labeledImage, 2) > 0; % Only take blob 2 on the right.
measurements = regionprops(blob2, 'all');
See Also
Categories
Find more on Feature Detection and Extraction in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!