为什么OpenCV的fitLine2D_wods是这样编码的?

问题描述 投票:0回答:1

我在看代码的时候:fitLine2D_wods


    t = (float) atan2( 2 * dxy, dx2 - dy2 ) / 2;
    line[0] = (float) cos( t );
    line[1] = (float) sin( t );

我不明白这个陈述的意思:

t = (float) atan2( 2 * dxy, dx2 - dy2 ) / 2;

你能帮忙解释一下吗?

我觉得应该是这个

https://www.mathsisfun.com/data/least-squares-regression.html

我试图在整个网站上搜索它,但没有有用的信息。

opencv least-squares
1个回答
0
投票

就是“Inertia principal axis (? Sorry, I don’t know how this word in English)”的方向(角度)公式。

© www.soinside.com 2019 - 2024. All rights reserved.