find_shape_model (Image, ModelID, 0, 45, 0.5, 0, 0.5, 'least_squares', 0, 0.9, Row, Column, Angle, Score)
hom_mat2d_identity (HomMat2DIdentity)
hom_mat2d_translate (HomMat2DIdentity, Row, Column, HomMat2DTranslate)
hom_mat2d_rotate (HomMat2DTranslate, Angle, Row, Column, HomMat2DRotate)
get_shape_model_contours (ModelContours, ModelID, 1)
affine_trans_contour_xld (ModelContours, ContoursAffinTrans, HomMat2DRotate)
* dev_display (ContoursAffinTrans)
gen_rectangle2 (Rectangle, 1060.37795,1175.8979963, 0.0953512001, 487.71127852317,442.380028441)
hom_mat2d_identity (HomMat2DIdentity1)
hom_mat2d_rotate (HomMat2DIdentity1, rad(-4.63889553735), 1058.82186948, 1178.4347, HomMat2DRotate1)
affine_trans_region (Rectangle, RegionAffineTrans, HomMat2DRotate1, 'constant')
area_center (RegionAffineTrans, Area, rowCenter, colCenter)
orientation_region (RegionAffineTrans, Phi)
Rectangle2Row1M := 1058.82186948 - rowCenter
Rectangle2Column1M := colCenter -1178.4347
create_metrology_model (MetrologyHandle)
affine_trans_pixel (HomMat2DRotate, Rectangle2Row1M, Rectangle2Column1M, RowTrans, ColTrans)
add_metrology_object_rectangle2_measure (MetrologyHandle,RowTrans, ColTrans, -0.0953512001, 487.7112785, 442.3800284419, 21, 5, 1, 1, [], [], Index)
set_metrology_object_param (MetrologyHandle, 'all', 'num_measures', 40)
set_metrology_object_param (MetrologyHandle, 'all', 'measure_transition', 'negative')