Approximating a set of points from a binary image
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?
Thank you so much :)! for someone following your example and being as bad as me don't forget to change the the depth to fulfill fitline() assertions.