In this chapter, we will cover the following recipes:
Detecting image contours with the Canny operator
Detecting lines in images with the Hough transform
Fitting a line to a set of points
Extracting the components' contours
Computing components' shape descriptors