函数:

对图像进行颜色识别,将突图像转为RGB三通道图,将三通道图转成’hsv‘色差空间中,在针对颜色特定的灰度值范围对图像中的物体进行区分,图像的明亮度对结果影响不大

效果图:

explore_halcon.hdev(29)之p_do_color_fuses函数模块

主要算子:

trans_from_rgb:从RGB颜色空间转换图像到任意颜色空间

HSV:H色调、S饱和度、V明度

计算方式:

  Min := min([R, G, B])
  Max := max([R, G, B])
  V := Max
  if (Max == Min)
     S := 0
     H := 0
  else
     S := (Max - Min) / Max
     if (R == Max)
        H := ((G - B) / (Max - Min)) * rad(60)
     elseif (G == Max)
        H := (2 + (B - R) / (Max - Min)) * rad(60)
     elseif (B == Max)
        H := (4 + (R - G) / (Max - Min)) * rad(60)
     endif
  endif

explore_halcon.hdev(29)之p_do_color_fuses函数模块

相关文章:

  • 2022-03-02
  • 2021-12-19
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-01
  • 2021-06-29
猜你喜欢
  • 2021-12-04
  • 2021-04-28
  • 2021-11-08
  • 2021-07-16
  • 2021-05-04
  • 2021-08-27
  • 2021-06-09
相关资源
相似解决方案