gen_region_contour_xld (ClosedContours, Region2, 'filled') 二、region转xld 方法1:gen_contour_region_xld (SelectedRegions, Contours, 'border') 拟合部分边缘提取和轮廓分割之间会用到,因为轮廓分割需输入xld轮廓,而用boundary提取区域边缘输出的是区域(region),所以需要转换。 方法2:先将区域转换骨架,然后再...
在这个示例中,contour_xld是一个已经存在的XLD变量,region是一个空的Region变量。gen_region_contour_xld函数将contour_xld中的轮廓转换为Region,并将结果存储在region中。 3. 检查转换后的Region是否满足预期 转换完成后,你需要检查转换后的Region是否满足你的预期。这可以通过可视化Region、计算Region的属性(如面积、...
paint_region (Circle, Image, ImageR, 0, 'fill') paint_region (Circle, Image, ImageG, 255, 'fill') paint_region (Circle, Image, ImageB, 0, 'fill') compose3 (ImageR, ImageG, ImageB, MultiChannelImage) *保存图像 write_image (MultiChannelImage1,'bmp' , 0, 'C:/Users/世纪森林/Deskto...
Halcon对象之间的相互转换,一般可以转化为"gen_目标对象_原对象"形式,如gen_region_contour_xld(根据xld创建一个区域region);再如gen_contour_region_xld(根据region创建一个xld轮廓) 2.1 gen_region_contour_xld(Contour : Region : Mode : ) 根据轮廓xld创建一个区域region read_image(Image,'lena') draw_xld...
1、使用Region为中介缩放XLD 1 gen_image_const (Image, 'byte', 8200, 4200) 2 set_system ('clip_region', 'false') 3 read_contour_xld_dxf (Contours,'01.dxf', [], [], DxfStatus) 4 *转为region 5gen_region_contour_xld (Contours, Region, 'margin')6 *缩放region ...
方法1:gen_contour_region_xld (SelectedRegions, Contours, 'border') 拟合部分边缘提取和轮廓分割之间会用到,因为轮廓分割需输入xld轮廓,而用boundary提取区域边缘输出的是区域(region),所以需要转换。 方法2:先将区域转换骨架,然后再提取骨架轮廓 skeleton (Region2, Skeleton2) gen_contours_skeleton_xld (Skeleton...
gen_polygons_xld (RegionCo, RegionPo, 'ramer', 2) 2.转换规律 Halcon对象之间的相互转换,一般可以转化为"gen_目标对象_原对象"形式,如gen_region_contour_xld(根据xld创建一个区域region);再如gen_contour_region_xld(根据region创建一个xld轮廓) ...
XLD代表亚像素级别的轮廓或者多边形 threshold_sub_pix(inputimage, output,requirement) gen_contour_region_xld(inputRegion,output,...) XLD的选择操作(select_shape_xld/selet_contours_xld): select_shape_xld(XLDFeatures,Operation,Min,Max:) select_contours_xld(ContoursFeature,Min1,Max1,Min2,Max2:) ...
二、Region、XLD、Polygon之间的互相转换 1、Region像素坐标值的存储方式 根据如下代码生成一个矩形区域,并获取该区域内所有像素的坐标值,根据结果可以看出,Region内像素坐标值是根据行程编码的规则存储的。 gen_rectangle1 (ROI_0, 100, 100, 300, 300) ...
union_cocircular_contours_xld: 合并同圆的xld union_adjacent_contours_xld: 合并相邻的xld xld的转换操作与region类似: shape_trans_xld(XLD:XLDTrans:Type:) 有上面几个类型 Xld的分割操作(segment_contours_xld) 把初始xld分割成直线,直线和圆,直线和椭圆 ...