*求矩形四个顶点
gen_rectangle2 (ROI_0, 753.38, 1023.18, rad(15.3874), 50.2514, 19.3874)
smallest_rectangle2 (ROI_0, Row, Column, Phi, Length1, Length2)
gen_rectangle2 (ROI_0, Row, Column, Phi, Length1, Length2)
tuple_cos (Phi, Cos)
tuple_sin (Phi, Sin)
a:= -Length1*Cos - Length2*Sin
b := -Length1*Sin + Length2*Cos
gen_cross_contour_xld(Cross, Row-b, Column+a, 6, 1)
c := Length1*Cos - Length2*Sin
d := Length1*Sin + Length2*Cos
gen_cross_contour_xld(Cross, Row-d, Column+c, 6, 1)
e:= Length1*Cos + Length2*Sin
f := Length1*Sin - Length2*Cos
gen_cross_contour_xld(Cross, Row-f, Column+e, 6, 1)
g := -Length1*Cos + Length2*Sin
h := -Length1*Sin - Length2*Cos
gen_cross_contour_xld(Cross, Row-h, Column+g, 6, 1)
halcon求旋转矩形四个顶点
![](https://img-home.csdnimg.cn/images/20240711042549.png)