- dev_update_off()
- dev_set_draw('margin')
- read_image (Image, 'C:/Users/Bells/Desktop/163956tgbgu6ua1gyn98vx.jpg')
- gen_rectangle1 (modelROI, 17.25, 18.75, 66.25, 42.25)
- reduce_domain(Image, modelROI, modelImage)
- area_center(modelROI, Area, refRow, refColumn)
- gen_rectangle1 (checkROI, 33.8125, 61.75, 37.4375, 91)
- reduce_domain(Image,checkROI, ImageReduced2)
- points_harris(ImageReduced2, 0.5, 1.5, 0.08, 500, Row2, Column2)
- gen_cross_contour_xld(Cross, Row2, Column2, 6, 0.785398)
- create_shape_model(modelImage, 'auto', rad(-10), rad(20), 'auto', 'auto', 'use_polarity', 'auto', 'auto', ModelID)
- gen_rectangle1 (searchROI, 6.75, 174.75, 79.25, 286.25)
- reduce_domain(Image, searchROI, ImageReduced)
- find_shape_model(ImageReduced, ModelID, -0.39, 0.79, 0.5, 1, 0.5, 'least_squares', 0, 0.9, Row, Column, Angle, Score)
- dev_display(Image)
- dev_display_shape_matching_results(ModelID, 'red', Row, Column, Angle, 1, 1, 0)
- vector_angle_to_rigid(refRow, refColumn, 0, Row, Column, Angle, HomMat2D)
- affine_trans_region(checkROI, RegionAffineTrans, HomMat2D, 'nearest_neighbor')
- reduce_domain(ImageReduced, RegionAffineTrans, ImageReduced1)
- points_harris(ImageReduced1,0.5, 1.5, 0.08, 500, Row1, Column1)
- gen_cross_contour_xld(Cross1, Row1, Column1, 6, Angle)
- dev_display(Image)
- dev_display(checkROI)
- dev_display(Cross)
- dev_display(RegionAffineTrans)
- dev_display(Cross1)
复制代码
|