Detection of lines from an Image
Show older comments
Hello I have an image from which many lines are being dropping down from top to bottom.. some are straight and some are random. I have a code that works well but the problem is it detects only 10 to 15% of the lines from top to bottom and rest of them are just blank pixels nothing is detected. Can you suggest me what should I do to detect all the lines. PS: Image is very clear and lines are very clear on the image.
9 Comments
Walter Roberson
on 6 Oct 2017
A sample image would help.
Image Analyst
on 6 Oct 2017
Perhaps hough() or houghlines()? Perhaps RANSAC. Perhaps radon(). Who knows? Usually people attach an image when they ask for image processing advice. It's hard to work blind.
Image Analyst
on 7 Oct 2017
Sorry, no. So just try those suggestions I gave you. There is code examples there for finding lines and they may work for your images. Or else substitute a generic, non-classified image that looks similar and don't tell us what it is.
Image.Processor
on 7 Oct 2017
Walter Roberson
on 7 Oct 2017
I see in most sections that continuity of the individual lines could reasonably be decided by assuming there are no sudden sharp turns. However I also see a couple of places where two lines come together and overlay each other for a while and then separate again, and without knowledge of the physical processes involved we have no information as to which side of the continuation to choose. I am looking in particular near the middle, where there is a section that looks sort of like
A B
A B
C
C
C
D E
D E
that might be either
A B
A B
BA
BA
BA
A B
A B
or
A B
A B
AB
AB
AB
B A
B A
Image Analyst
on 8 Oct 2017
What exactly do you want to know about them? The length of the line until it breaks apart? The curl or tortuosity? The total length? If you can't find the length of the lines, what do you really want to know? Maybe there is something else that can be measured, like area fraction or something that correlates with what you want to know but doesn't require finding each separate, individual line.
Image.Processor
on 8 Oct 2017
Image.Processor
on 8 Oct 2017
Walter Roberson
on 9 Oct 2017
Unfortunately the sample image appears to have disappeared.
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type 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!