算子:threshold

threshold (ImageFilled, Region, 0, 90)

用来分割图像,算子的原形是:

threshold(Image : Region : MinGray, MaxGray : )

其中
Image是输入图像
Region是分割后的结果
MinGray 和MaxGray是输入的控制参数,分割的最小灰度值与最大灰度值

算子的功能是:

选择满足输入控制参数的灰度值之内的灰度值,当所有的像素点都满足这个区域的话,就有一个区域,当有多个像素段满足这个限制,每个像素段对应一个区域。

例子

1 dev_close_window()
2 dev_update_off()
3 read_image(Image,'fabrik')
4 threshold(Image,Seg,50,255)
5 dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle)
6 dev_display (Seg)

原始图像:
Halcon 算子 threshold

分割后的图像:
Halcon 算子 threshold

相关文章:

  • 2022-02-26
  • 2021-10-10
  • 2021-05-06
  • 2021-07-15
  • 2022-02-11
  • 2021-11-13
  • 2021-11-13
  • 2021-04-13
猜你喜欢
  • 2021-04-24
  • 2021-07-29
  • 2022-12-23
  • 2021-11-27
  • 2021-09-14
  • 2022-02-07
  • 2021-09-30
相关资源
相似解决方案