My task is to plot a line that reppresents the approximation (linerar I guess) to a set of points. Example: -draw a line that best fits the white points from this image. I am aware of functions such as fitLine but how can I use them when I represent images as Mat?