Reputation: 5834
I'm trying to detect line segments in an image.
From what I gather, the Hough algorithm detects lines but not segments.
Does anyone know of how I would go about this, or any libraries suitable for this?
Im my case, I'm trying to detect star trails (which for these purposes are all straight) from a photograph so I can reduce them back to points.
If it's important, I'm trying to implement this in C#
Any ideas?
Upvotes: 4
Views: 8553
Reputation: 26804
For unsmearing motion blur, you should look at deconvolution. The Hough transform might be helpful in finding the original motion vector (I suspect it would work fine for a bunch of parallel line segments), but deconvolution is what you'd use to get the original stars back out of it, and these guys use a different method for estimating the original motion vector:
Upvotes: 3
Reputation: 9
Look at the LSD line segment detector, published with implementation details and source code.
Upvotes: 0
Reputation: 13799
The openCV Hough transform cvHoughLines2 has a probabilistic mode that detects line segments:
I have tested it and it works
Upvotes: 1