网页的依托网站,北京展览设计制作工厂,个人可以备案哪些网站,重庆江北区网站建设公司一个halcon处理的例子 目录处理要求#xff1a;原图#xff1a;处理程序#xff1a;处理结果#xff1a;处理要求#xff1a;
根据客户给的宽度#xff0c;计算出电路宽度太窄的为NG
原图#xff1a; 处理程序#xff1a;
read_image (Image, 1.png)
rgb1_to_gray(I…一个halcon处理的例子
目录处理要求原图处理程序处理结果处理要求
根据客户给的宽度计算出电路宽度太窄的为NG
原图 处理程序
read_image (Image, 1.png)
rgb1_to_gray(Image, GrayImage)
threshold(GrayImage, Region, 130, 255)
connection (Region, ConnectedRegions)
select_shape(ConnectedRegions, SelectedRegions, area, and, 10000, 99999)
opening_circle(SelectedRegions, RegionOpening, 2.5)
get_image_size (GrayImage, Width, Height)
distance_transform (RegionOpening, DistanceImage, city-block, true, Width, Height)
threshold (DistanceImage, Regions, 6, 127)
fill_up(Regions, RegionFillUp)
erosion_circle (RegionFillUp, RegionErosion, 2.5)
skeleton (RegionErosion, Skeleton)
junctions_skeleton (Skeleton, EndPoints, JuncPoints)
dilation_circle (EndPoints, RegionDilation, 10.5)
dilation_circle (JuncPoints, RegionDilation1, 5.5)
difference (Skeleton, RegionDilation, RegionDifference)
difference (RegionDifference, RegionDilation1, RegionDifference1)
gen_contours_skeleton_xld (RegionDifference1, Contours, 1, filter)
union_adjacent_contours_xld (Contours, UnionContours, 50, 5, attr_keep)
smooth_contours_xld (UnionContours, SmoothedContours, 23)
select_shape_xld(SmoothedContours, SelectedXLD, contlength, and, 500, 99999)
dev_display (GrayImage)
dev_display (SelectedXLD)处理结果