Distinguish between lines and spots in a grayscale image
Show older comments
Hi everyone,
I have to find a way to distinguish between lines and spots in a grayscale image like the one below, marking them with different colours (i.e. red for lines and blue for spots). My problem is that everything is mixed up and it is difficult to divide lines from everything else. Any ideas?
I would very thankful if you could help me!
Rita
Image:

Accepted Answer
More Answers (1)
Image Analyst
on 2 Nov 2016
1 vote
I have no idea which irregularly shaped blobs in your image you consider to be lines or spots, roundish spots I presume. I don't see either shape. All I see is a bunch or irregularly shaped white blobs plot some small black dots. What you could do is to threshold to find the bright blobs, then ask regionprops to find the Solidity and MajorAxisLength and MinorAxisLength and take the ratio of the lengths. See my Image Segmentation Tutorial for a full demo of using regionprops(). http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
Categories
Find more on Image Processing Toolbox 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!