1.affine_trans_region(区域的任意变换)
2.hom_mat2d_identity(创建二位变换矩阵)
3.hom_mat2d_translate(平移)
4.hom_mat2d_scale(缩放)
5.hom_mat2d_rotate(旋转 )
6.vector_angle_to_rigid(刚性放射变换)
7.affine_trans_image(扩展图像变换)
刚性变换矩阵vector_to_rigid
刚性变换矩阵(带角度)vector_angle_to_rigid
区域二维变换affine_trans_region
图像二维变换affine_trans_image
XLD二维变换affine_trans_contour_xld
平移矩阵hom_mat2d_translate
旋转矩阵hom_mat2d_rotate
缩放矩阵hom_mat2d_scale
变换矩阵
read_image (Image, 'D:/QQ文件/钻头长度测量/1.bmp')
get_image_size (Image, Width, Height)
threshold (Image, Regions, 0, 155)
connection (Regions, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 43135.4, 88218.9)
boundary (SelectedRegions, RegionBorder, 'inner')
dilation_circle (RegionBorder, RegionDilation, 3.5)
reduce_domain (Image, RegionDilation, ImageReduced)
edges_sub_pix (ImageReduced, Edges, 'canny', 1, 20, 40)
segment_contours_xld (Edges, ContoursSplit, 'lines_circles', 5, 4, 2)
select_shape_xld (ContoursSplit, SelectedXLD3, ['column','contlength'], 'and', [60.3,10.95], [498.14,200])
*select_shape_xld (ContoursSplit, SelectedXLD2, ['column','contlength'], 'and', [60.3,16.51], [498.14,200])
*select_shape_xld (ContoursSplit, SelectedXLD1, 'column', 'and', 0, 501.86)
union_adjacent_contours_xld (SelectedXLD3, UnionContours, 10, 1, 'attr_keep')
select_shape_xld (ContoursSplit, SelectedXLD, ['column','contlength'], 'and', [538.96,101.86], [590.91,200])
fit_line_contour_xld (SelectedXLD, 'tukey', -1, 0, 5, 2, RowBegin, ColBegin, RowEnd, ColEnd, Nr, Nc, Dist)
gen_contour_polygon_xld (Contour, [RowBegin,RowEnd], [ColBegin,ColEnd])
angle_lx (RowBegin, ColBegin, RowEnd, ColEnd, Angle)
vector_angle_to_rigid (Width/2, Height/2, Angle, Width/2, Height/2, rad(180), HomMat2D)
affine_trans_contour_xld (Contour, ContoursAffineTrans, HomMat2D)
affine_trans_contour_xld (UnionContours, ContoursAffineTrans1, HomMat2D)
affine_trans_image (ImageReduced, ImageAffineTrans, HomMat2D, 'constant', 'false')
shape_trans_xld (ContoursAffineTrans1, XLDTrans, 'rectangle1')
dev_display (ImageAffineTrans)
dev_display (ContoursAffineTrans)
dev_display (ContoursAffineTrans1)
dev_display (XLDTrans)
smallest_rectangle1_xld (XLDTrans, Row1, Column1, Row2, Column2)
disp_message (200000, '距离是:'+(Column2-Column1), 'image', 30, 30, 'black', 'true')