📄 backup.txt
字号:
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//TODO:根据面积比判断是否最接近矩形代码
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CvPoint Point3temp;
CvPoint Point4temp;
Point3temp.x=points[i].X;
Point3temp.y=points[i].Y;
Point4temp.x=points[j].X;
Point4temp.y=points[j].Y;
float s1=abs(getAreaOfTriangle(Point1,Point2,Point3temp));
float s2=abs(getAreaOfTriangle(Point1,Point2,Point4temp));
float s3=abs(getAreaOfTriangle(Point3temp,Point4temp,Point1));
float s4=abs(getAreaOfTriangle(Point3temp,Point4temp,Point2));
float d1=getDistance(Point1,Point3temp);
float d2=getDistance(Point1,Point4temp);
float d3=getDistance(Point2,Point3temp);
float d4=getDistance(Point2,Point4temp);
float AreaRatio=0;
AreaRatio+=abs(s1/s2-1);
AreaRatio+=abs(s3/s4-1);
AreaRatio+=abs((d1/d4)*(d1/d4)-1);
AreaRatio+=abs((d2/d3)*(d2/d3)-1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -