halcon-read_shape_model读取形状模板
在HDevelop中
dev_close_window () read_image (Image, 'D:/bb/tu/1.jpg') rgb1_to_gray (Image, GrayImage) read_shape_model ('D:/bb/tu/ss.shm', ModelID) *读取形状模板 *参数2:模板句柄 find_shape_model (GrayImage, ModelID, -0.2, 0.2, 0.8, 5, 0.5, 'least_squares', 0, 0.9, Row, Column, Angle, Score)
在QtCreator中
HObject ho_Image, ho_GrayImage;
HTuple hv_ModelID, hv_Row, hv_Column, hv_Angle;
HTuple hv_Score;
ReadImage(&ho_Image, "D:/bb/tu/1.jpg"); Rgb1ToGray(ho_Image, &ho_GrayImage); ReadShapeModel("D:/bb/tu/ss.shm", &hv_ModelID); //读取形状模板 //参数2:模板句柄 FindShapeModel(ho_GrayImage, hv_ModelID, -0.2, 0.2, 0.8, 5, 0.5, "least_squares", 0, 0.9, &hv_Row, &hv_Column, &hv_Angle, &hv_Score);