逻辑背后的代码 [英] logic behind the code
本文介绍了逻辑背后的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以任何一个解释这个代码后面的逻辑
could any one explain me logic behind this code??
pt1.x = cvRound(x0 + 1000*(-b));
pt1.y = cvRound(y0 + 1000*(a));
pt2.x = cvRound(x0 - 1000*(-b));
pt2.y = cvRound(y0 - 1000*(a));
推荐答案
> x0,y0 。您现在创建两个其他点对象,一个在( - b * 1000,a * 1000)
和一个在(b * 1000, a * 1000)
相对于原点。假设 1000
是解决规模问题,因为值 a
和 b
与
x0,y0
不同的比例。
You have a point defined by x0, y0
. You're now creating two other point objects, one at (-b*1000, a*1000)
and one at (b*1000, -a*1000)
relative to the original point. Presumably the 1000
is to fix problems of scale, as the values a
and b
are on a different scale than the points x0, y0
.
这篇关于逻辑背后的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文