Difference between revisions of "Hough Transform"
Jump to navigation
Jump to search
m (added Wikipedia link) |
Athrasher7 (talk | contribs) m |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:How to Guides: Technical]] | ||
+ | [[Category:IGVC]] | ||
+ | |||
+ | This algorithm is implemented as the '''LinearHoughTransform2''' filter for the [[ImageFilterDemo]] program. | ||
+ | |||
A good description is on [http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm this page]. | A good description is on [http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm this page]. | ||
Line 7: | Line 12: | ||
== Cons == | == Cons == | ||
− | * | + | * Designed for detecting ''straight'' lines, making it tricky to use for curved lines - which will probably be common |
− | |||
* Designed to detect ''lines'' as opposed to detecting ''line segments'' | * Designed to detect ''lines'' as opposed to detecting ''line segments'' | ||
* Computationally expensive (when compared to simple filters) | * Computationally expensive (when compared to simple filters) | ||
Line 17: | Line 21: | ||
== Output == | == Output == | ||
* A list of the positions/orientations of the lines detected in the input image | * A list of the positions/orientations of the lines detected in the input image | ||
+ | |||
+ | == Issues with the Current Implementation == | ||
+ | * The current implementation does not work well with input images containing no lines. This, however, is due to the way that Hough output is thresholded - the Hough algorithm itself still works well. | ||
+ | |||
+ | == Pictures == | ||
+ | [[Image:LinesOnBlack.png|thumb|left|150px|Two solid straight lines]] | ||
+ | [[Image:LinesOnBlackWithHoughTransform.png|thumb|left|150px]] | ||
+ | [[Image:LinesOnBlackWithIdentifiedLines.png|thumb|left|150px]] | ||
+ | {{clr}} | ||
+ | |||
+ | [[Image:CurvyLine.png|thumb|left|150px|One solid curvy line]] | ||
+ | [[Image:CurvyLineAsHoughSpace.png|thumb|left|150px|]] | ||
+ | [[Image:CurvyLineWithIdentifiedLines.png|thumb|left|150px|]] | ||
+ | {{clr}} | ||
+ | |||
+ | [[Image:TwoSolidCurvyLines.png|thumb|left|150px|Two solid curvy lines]] | ||
+ | [[Image:TwoSolidCurvyLinesAsHoughSpace.png|thumb|left|150px|]] | ||
+ | [[Image:TwoSolidCurvyLinesWithIdentifiedLines.png|thumb|left|150px|]] | ||
+ | {{clr}} | ||
+ | |||
+ | [[Image:TwoDashedCurvyLines.png|thumb|left|150px|Two dashed curvy lines]] | ||
+ | [[Image:TwoDashedCurvyLinesAsHoughSpace.png|thumb|left|150px|]] | ||
+ | [[Image:TwoDashedCurvyLinesWithIdentifiedLines.png|thumb|left|150px|]] | ||
+ | {{clr}} | ||
+ | |||
+ | [[Image:NoLines.png|thumb|left|150px|No lines at all! Just some salt noise.]] | ||
+ | [[Image:NoLinesAsHoughSpace.png|thumb|left|150px|Yikes!]] | ||
+ | [[Image:NoLinesWithIdentifiedLines.png|thumb|left|150px|Double yikes! The robot would probably panic upon seeing this. :P]] | ||
+ | {{clr}} |
Latest revision as of 20:51, 5 February 2020
This algorithm is implemented as the LinearHoughTransform2 filter for the ImageFilterDemo program.
A good description is on this page.
Wikipedia also has its own Hough Transform article.
Pros
- Able to detect dashed lines
Cons
- Designed for detecting straight lines, making it tricky to use for curved lines - which will probably be common
- Designed to detect lines as opposed to detecting line segments
- Computationally expensive (when compared to simple filters)
Input
- A binary/grayscale image hilighting the line-pixels in the input image
Output
- A list of the positions/orientations of the lines detected in the input image
Issues with the Current Implementation
- The current implementation does not work well with input images containing no lines. This, however, is due to the way that Hough output is thresholded - the Hough algorithm itself still works well.
Pictures