OPENCV如何求两条线的交点
发布网友
发布时间:2022-09-25 12:02
我来回答
共1个回答
热心网友
时间:2023-09-17 13:09
/*函数功能:求两条直线交点*/
/*输入:两条Vec4i类型直线*/
/*返回:Point2f类型的点*/
Point2f getCrossPoint(Vec4i LineA,
{
double ka, kb;
ka = (double)(LineA[3] - LineA
kb = (double)(LineB[3] - LineB
Point2f crossPoint;
crossPoint.x=(ka*LineA[0]-
crossPoint.y = (ka*kb*(LineA[0
return crossPoint;
}
热心网友
时间:2023-09-17 13:09
/*函数功能:求两条直线交点*/
/*输入:两条Vec4i类型直线*/
/*返回:Point2f类型的点*/
Point2f getCrossPoint(Vec4i LineA,
{
double ka, kb;
ka = (double)(LineA[3] - LineA
kb = (double)(LineB[3] - LineB
Point2f crossPoint;
crossPoint.x=(ka*LineA[0]-
crossPoint.y = (ka*kb*(LineA[0
return crossPoint;
}