read_shape_model

    read_image (Image, ImageFiles[1])
    read_shape_model ('D:/VisionControl/shmFiles/CreateShapeModel20230907144756.shm', ModelID)
    get_shape_model_contours (ModelContours1, ModelID, 1)
    get_shape_model_params (ModelID, NumLevels, AngleStart, AngleExtent, AngleStep, ScaleMin, ScaleMax, ScaleStep, Metric, MinContrast)
    
    find_shape_model (Image, ModelID, rad(-90), rad(180), 0.5, 1, 0.5, 'least_squares', 7, 0.9, Row, Column, Angle, Score)
    dev_display_shape_matching_results (ModelID, 'red', Row, Column, Angle, 1, 1, 0)
    Row2:=832.06102362204
    Column2:=1072.50819672131
    Length12:=111.035130369785
    Length22:=102.236157862703
    gen_rectangle2 (Rectangle, Row2, Column2,0,Length12,Length22)
    *创建一个初始化矩阵
    hom_mat2d_identity (HomMat2D)
    *从点和角度计算刚性仿射变换,找出模板和卡尺工具的对应关系
    vector_angle_to_rigid (Row2, Column2, 0, Row, Column, Angle, HomMat2D)
    affine_trans_pixel (HomMat2D, Row2, Column2, RowTrans, ColTrans)

你可能感兴趣的:(笔记,开发语言)