dev_display_shape_matching_results

 dev_display_shape_matching_results (ModelID, 'red', Row, Column, Angle, 1, 1, 0)

* This procedure displays the results of Shape-Based Matching.
* 
NumMatches := |Row|
if (NumMatches > 0)
    if (|ScaleR| == 1)
        tuple_gen_const (NumMatches, ScaleR, ScaleR)
    endif
    if (|ScaleC| == 1)
        tuple_gen_const (NumMatches, ScaleC, ScaleC)
    endif
    if (|Model| == 0)
        tuple_gen_const (NumMatches, 0, Model)
    elseif (|Model| == 1)
        tuple_gen_const (NumMatches, Model, Model)
    endif
    for Index := 0 to |ModelID| - 1 by 1
        get_shape_model_contours (ModelContours, ModelID[Index], 1)
        dev_set_color (Color[Index % |Color|])
        for Match := 0 to NumMatches - 1 by 1
            if (Index == Model[Match])
                hom_mat2d_identity (HomMat2DIdentity)
                hom_mat2d_scale (HomMat2DIdentity, ScaleR[Match], ScaleC[Match], 0, 0, HomMat2DScale)
                hom_mat2d_rotate (HomMat2DScale, Angle[Match], 0, 0, HomMat2DRotate)
                hom_mat2d_translate (HomMat2DRotate, Row[Match], Column[Match], HomMat2DTranslate)
                affine_trans_contour_xld (ModelContours, ContoursAffinTrans, HomMat2DTranslate)
                dev_display (ContoursAffinTrans)
            endif
        endfor
    endfor
endif
return ()

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