Many computer vision algorithms deal with points. They may be contour points, or key points, or something else. And, in some cases, we know that all of these points should lie on the same curve, with a known mathematical shape. The process of finding the parameters of the curve (in the case of noisy data) is called approximation. Here, we're going to review two functions from OpenCV which find approximations for the ellipse and line for a set of points.
Fitting lines and circles into two-dimensional point sets
Getting ready
You need to have OpenCV 3.x installed, with Python API support.