So I have Image like this
(source: de-viz.ru)
I want to get something like this (I hevent drawn all lines I want but I hope you can get my idea)
(source: narod.ru)
I need some super fast algorithm for finding all straight lines on it. I want to give to algorithm parameters like min length and max line distortion. I want to get relative to picture pixel coords start and end points of lines.
So on this picture to find all lines between tiles and thouse 2 black lines on top.
So I need algorithm for super fast finding straight lines of different colors on picture.
Is there any such algorithm? (super duper fast=)
Thus, the Hough Transform algorithm detects lines by finding the (ρ, θ) pairs that have a number of intersections larger than a certain threshold.
The Hough transform takes a binary edge map as input and attempts to locate edges placed as straight lines. The idea of the Hough transform is, that every edge point in the edge map is transformed to all possible lines that could pass through that point.
To detect the lines present in an image, we have to read the image using the imread() function and convert it into grayscale if it's not in grayscale already. After that, we have to find the edges of the given image using the Canny() function of OpenCV. The first argument of the Canny() function is the given image.
You need to use sophisticated image processing methods such as Canny Edge Detection, Marr-Hildreth edge detection, Gaussian Filtering and Hough Transform etc.
But existence of "super fast" method is highly unlikely.
Minimum complexity of most of the image processing algorithms is at least O(N^2)
.
By "super fast" I mean at most O(1)
;)
Some links that might help:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With