QQ登录

只需一步,快速开始

halcon clip_contours_xld函数介绍

[ 复制链接 ]
clip_contours_xld(Contours : ClippedContours : Row1, Column1, Row2, Column2 : )
函数用四个参数Row1, Column1, Row2, Column2所组成的矩形对输入轮廓Contours 进行剪切,
结果保存于ClippedContours 。

例程
dev_close_window ()
read_image (Angio, 'angio-part')
get_image_size (Angio, Width, Height)
dev_open_window (0, 0, 3 * Width / 2, 3 * Height / 2, 'black', WindowID)
dev_set_part (0, 0, Height - 1, Width - 1)
lines_gauss (Angio, Lines, 2.3, 0.0, 0.7, 'dark', 'true', 'parabolic', 'true')
dev_display (Angio)
dev_set_color ('yellow')
dev_display (Lines)
stop ()

Top := 200
Left := 100
Bottom := 300
Right := 200
gen_rectangle1 (Rectangle, Top, Left, Bottom, Right)
reduce_domain (Angio, Rectangle, AngioReduced)
clip_contours_xld (Lines, LinesClipped, Top, Left, Bottom, Right)
dev_clear_window ()
dev_display (AngioReduced)
dev_set_color ('dim gray')
dev_display (Lines)
dev_set_color ('yellow')
dev_display (LinesClipped)


例程读入一图像,进行轮廓 提取,
然后用四个常量
Top := 200
Left := 100
Bottom := 300
Right := 200
生成一个矩形。
调用 clip_contours_xld 对轮廓进行剪切,显示结果。
  

halcon从自学到接项目视频教程,另外再赠送全网最全资源  

  

欢迎围观我录制的一套halcon自学视频教程(进入)


回复

使用道具 举报

快速回复 返回列表 客服中心 搜索