Detecting shapes
So, we have seen how to detect edges; however, this process is a pixel-by-pixel process answering the question of whether this pixel is an edge or not. Moving forward, in shape analysis, we would need more concrete information than just the edge test; we will need a better representation.
For example, if we have a picture of a box and we did the edge detection, we will end up with thousands and thousands of edge pixels; however, if we tried to fit a line to these edge pixels, we get a rectangle, which is a more symbolic and useful representation.
Understanding the Hough line transform
There are many ways to fit a line through a number of points, and Hough transform is considered an under constrained method, where we use only one ...
Get OpenCV Android Programming By Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.