标签:
gen_warped_mesh (VectorField, WarpedMesh, 10) gen_empty_obj (WarpedMesh) count_obj (VectorField, Number) for Index := 1 to Number by 1 select_obj (VectorField, ObjectSelected, Index) *把vector转换成存储行坐标和列坐标图像 vector_field_to_real (ObjectSelected, DRow, DCol) get_image_size (VectorField, Width, Height) *取行坐标 for ContR := 0.5 to Height[0] - 1 by Step Col1 := [0.5:Width[0] - 1] tuple_gen_const (Width[0] - 1, ContR, Row1) get_grayval_interpolated (DRow, Row1, Col1, ‘bilinear‘, GrayRow) get_grayval_interpolated (DCol, Row1, Col1, ‘bilinear‘, GrayCol) gen_contour_polygon_xld (Contour, GrayRow, GrayCol) concat_obj (WarpedMesh, Contour, WarpedMesh) endfor *取列坐标 for ContC := 0.5 to Width[0] - 1 by Step Row1 := [0.5:Height[0] - 1] tuple_gen_const (Height[0] - 1, ContC, Col1) get_grayval_interpolated (DRow, Row1, Col1, ‘bilinear‘, GrayRow) get_grayval_interpolated (DCol, Row1, Col1, ‘bilinear‘, GrayCol) gen_contour_polygon_xld (Contour, GrayRow, GrayCol) concat_obj (WarpedMesh, Contour, WarpedMesh) endfor endfor return ()
标签:
原文地址:http://www.cnblogs.com/xiaomaLV2/p/5496920.html