Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linear Regression in Open CV?

I am currently trying to determine the mean line of a 2D Point cloud .. and while I am doing so, I asked myself whether there is a solution for this in OpenCV or not? So that I just can push a vector with points and parameters to it and then get back the calculated mean-line?

like image 852
Sebastian Boldt Avatar asked Mar 22 '23 15:03

Sebastian Boldt


1 Answers

Use fitLine function, it is based on weighted least-squares algorithm.

like image 103
old-ufo Avatar answered Mar 30 '23 06:03

old-ufo