Implement a hough for thick lines
Please suggest the best method for implement a function by hough for thick lines detection.
Note :
- Angles range[0 - 179].
- Angels zero and 179 are neighbors.
Please suggest the best method for implement a function by hough for thick lines detection.
Note :
You could detect them as follows:
If we run canny, for each thin line we have two line.When you run canny on the image how would you distingiush between the two top lines and the left line.
Probably you meant that for each thick line you get two canny lines. Of course the above method doesn't work if you have also parallel thin lines next to each other and want to distinguish between a thick line. For this case I would suggest you to use Erosion (morphological operation), then the thick lines get smaller and the thin lines will disappear.
I want to detect all lines simultaneously without disappearing any thin lines from image.
Yet, you can solve it by applying erosion multiple times. 1. Save your old image. 2. Apply erosion so often that you won't detect any line any more 3. restore old image. 4. Iteratively erode the image one pass less than the before, you then will detect the thickest lines and you also know how thick they are from the number of erosions. 5. Remove these lines (or mask them out) in the image and start with step 4 again with one erosion pass less than before.
Alternatively you could vary the structuring element of the erosion process (thicker structuring elements denote thicker lines)
Morphological operations is rejected because it damages the shape of lines & it is high order computation.How would you compute the width of contours when there are crossing lines.
How should it damage the shape of the line? It hins it out that is all. I also don't think it is a high order computation. However you have a good point that crossing lines contradict working with connected components directly. but you could group the lines according to their line width as it is done in http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=5540041
Look at the left line in the above picture.The thick lines are not neat. When lines are connected to each other and spread cross the image and width of thick lines is n,To get all line on the image you have to iterate n times the morphological operation. In some cases,There are not any thin line but you have to n times run the morphological operations.
Yes, this is true and as I said, it depends on the pictures you have if that is suitable for you or not. But erosion itself is not difficult to compute and in general pretty fast. So for small images it should be fast enough, maybe also just downsampling of the image will remove thin lines enough that they won't be detected anymore.
Asked: 2013-01-30 09:40:13 -0600
Seen: 13,406 times
Last updated: Feb 01 '13
The basic function doesn't detect your line? Do you have an example of image?
It is a public function that act in all situation.I edited my question and put the sample image.
what do you mean by "a public function"?