极坐标的逆变换:polar_trans_image_inv(PolarImage : XYTransImage : Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, Width, Height, Interpolation : )
其中:Row, Column分别为圆环的中心行列坐标, AngleStart, AngleEnd为起始和终止的角度值,RadiusStart, RadiusEnd为起始和终止的半径角度值, Width, Height为输出图片的宽和高。
read_image (Image, 'E:/Halcon数据/资源图片/1.png')
gen_rectangle1 (ROI_0, 86.1688, 43.0882, 122.133, 423.088)
reduce_domain (Image, ROI_0, ImageReduced)
threshold (ImageReduced, Region, 0, 125)
gen_rectangle1 (ROI_0, 61.701, 46.8137, 84.6948, 420.108)
reduce_domain (Image, ROI_0, ImageReduced)
threshold (ImageReduced, Region1, 0, 125)
gen_rectangle1 (ROI_0, 27.5052, 48.3039, 59.9323, 420.853)
reduce_domain (Image, ROI_0, ImageReduced)
threshold (ImageReduced, Region2, 0, 125)
read_image (Image33, 'E:/Halcon数据/资源图片/33.png')
get_image_size (Image33, Width, Height)
C:=Width/2
R:=Height/2
Radio:=380/2/3.1415
polar_trans_region_inv (Region, CodeRegionCircular, R, C, rad(110), -rad(250), Radio+230, Radio+180, 380, 40, Width, Height, 'bilinear')
polar_trans_region_inv (Region1, CodeRegionCircular1, R, C, rad(110), -rad(250), Radio+310, Radio+240, 380, 40, Width, Height, 'bilinear')
polar_trans_region_inv (Region2, CodeRegionCircular2, R, C, rad(110), -rad(250), Radio+380, Radio+270, 380, 40, Width, Height, 'bilinear')
invert_image (Image33, ImageInvert)
dev_display (CodeRegionCircular)
dev_display (CodeRegionCircular1)
dev_display (CodeRegionCircular2)