halcon算法思路_halcon常用算法

halcon常用算法

1、read_image (Image, F:/image/001.bmp ) 读入图像 2、threshold (Image, region, 100, 200) 阈值分割,获取区域 3、dev_close_window() 关闭当前图形窗口 4、dev_open_window (0, 0, 640, 480, black , WindowHandle) 打开一个新的图像窗口 5、decompose3 (Image, Red, Green, Blue) 三通道图像转换成三幅单通道图像 5.5、compose3(Red, Green, Blue, Image) 三幅单通道图像组合为三通道图像 6、connection (Region, ConnectedRegions) 将像素有相连的区域合并成一个元素element 7、count_obj(ConnectedRegions, Number) 计算元素element的个数 8、select_shape(Regions, SelectedRegions, Features, Operation, Min, Max) select_shape (ConnectedRegions,SelectedRegions,[ area , anisometry ], and , [500,1.0], [50000,1.7]) 连通域形状的选择 circularity:表示环状;充实度 roundness:圆度 9、dev_set_color( red ) 设定输出的颜色 10、dev_set_draw ( margin ) 或者 dev_set_draw ( fill ) 确定区域填充模式 11、get_image_size (Image, Width, Height) 得到图像的宽度和高度 12、get_image_pointer1 (Image_slanted, Pointer, Type, Width, Height) 设定Pointer指向Image_slanted的起点位置。 13、dev_set_part (0, 0, Height-1, Width-1) 设定图像需要显示的范围 14、dev_display (Image_slanted) 显示图像 15、disp_continue_message(WindowHandle, blue , false ) 等待用户操作是否继续stop () 16、projective_trans_image (Image_slanted, Image_rectified, HomMat2D, bilinear , false , false ) 将投影变换应用于一幅图像中。 17、dev_set_line_width (5) 为区域轮廓线设定线宽 18、disp_message (WindowHandle, Decoded string: , window , -1, -1, black , true ) 程序写一个文本信息 19、union_collinear_contours_xld 合并在同一直线的XLD union_cocircular_contours_xld 合并在同圆的XLD union_adjacent_contours_xld 合并邻近的XLD 20、fit_line_contour_xld 拟合直线 21、trans_from_rgb(Rimage,Gimage,Bimage,Image1,Image2,Image3, hsv ) rgb颜色空间图像转换到hsv颜色空间图像 22、trans_to_rgb(Image1,Image2,Image3,ImageRed,ImageGreen,ImageBlue, hsv ) hsv颜色空间图像转换到rgb颜色空间图像 23、set_display_font (WindowID, 20, mono , true , false ) 设置字体(bottle.hdev) 24、fill_up_shape (RawSegmentation, RemovedNoise, area , 1, 5) 根据给定的形状特征填补区域中的不足 25、opening_circle (RemovedNoise, ThickStructures, 2.5) 以半径为2.5像素先腐蚀再膨胀,开运算去除小区域。 26、fill_up (ThickStructures, Solid) 填补区域中的空洞 27、intersection (ConnectedPatterns, ThickStructures, NumberCandidates) 求两个区域的交集然后输出,求ConnectedPatterns区域和ThickStructures 区域的交集,输出 NumberCandidates 28、dev_set_shape ( rectangle1 ) 设置外接矩形 29、distance_lr (SelectedRegions, Row1, Col1, Row2, Col2, DistanceMin, DistanceMax) 计算直线和区域之间的距离,出现最小距离和最大距离 30、disp_line (WindowID, Row1, Col+100, Row2, Col) 绘制直线段 ( Col+100, Row1)为起点,(Col, Row2)为终点 30.5、disp_circle (WindowID, RowPoint, ColPoint, 10) 在指定点(ColPoint ,RowPoint)绘制直接为10的圆 注意:y1 = Row1, x1 = Col+100. y2 = Row2, x2 = Col. 先y后x 的值(distance_lr.hdev) 31、distance_pc (Hole, Row, Column, DistanceMin, DistanceMax) 计算点到轮廓之间的最大距离和最小距离,其中(Column, Row)为规定的点。 32、edges_sub_pix (Rim, Edges, lanser2 , 0.3, 10, 40) 使用Deriche, Lanser, Shen, or Canny filters等算子提取精确的亚像素边缘。 33、sort_contours_xld (Holes, Holes, upper_left , true , row ) 根据相对位置选择轮廓 34、smallest_circle_xld (Holes, Row, Column, Radius) 确定完整的圆 35、disp_cross (WindowID, Row[i-1], Column[i-1], 6, 0) 在指定点的位置绘制一个十字标记 36、get_region_contour (SelectedRegions, Rows, Column

  • 0
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值