*1、创建模板(获取要做模板区域的图像)
*create_shape_model (ImageReduced, 4, 0, rad(360), rad(1), 'none', 'use_polarity', 30, 10, ModelID)
*2、获取形状模型---第二步(为了显示找的的模板)
*get_shape_model_contours (ShapeModel, ModelID, 1)
*3、查找模板
*find_shape_model (ImageCheck, ModelID, 0, rad(360), 0.7, 1, 0.5, 'least_squares', 4, 0.7, RowCheck, ColumnCheck, AngleCheck, Score)
*4、仿射变换,确定变换矩阵
*1)第一种方法,获取变换矩阵HomMat2D;
*vector_angle_to_rigid (0, 0, 0, RowCheck, ColumnCheck, AngleCheck, HomMat2D)
*affine_trans_contour_xld (ShapeModel, ShapeModelTrans, HomMat2D)
*2)第二种方法,获取变换矩阵HomMat2DRotate
*hom_mat2d_identity (HomMat2DIdentity)
*hom_mat2d_translate (HomMat2DIdentity, RowCheck, ColumnCheck, HomMat2DTranslate)
*hom_mat2d_rotate (HomMat2DTranslate, AngleCheck, RowCheck, ColumnCheck, HomMat2DRotate)
*affine_trans_contour_xld (ShapeModel, ShapeModelTrans, HomMat2DRotate)
*5、通过确定的变换矩阵执行其他检测内容;如测量:首先要对要进行测量区域的中心点进行变换;
*affine_trans_pixel (HomMat2DRotate, Rect1Row, Rect1Col, Rect1RowCheck, Rect1ColCheck)