How to detect blue color object using opencv

混江龙づ霸主 提交于 2019-12-04 11:45:13

For blue, it can be used as HSV values : [120,255,255]

I calculated it from GIMP, an open-source image processing tool like Photoshop. Similarly you can use any tools to do so.

But remember in OpenCV, Hue ranges from 0-180, S = 0-255, V = 0-255

But in GIMP, it is H = 0-360, S = 0-100, V = 0-100. So you have to apply scaling according to that.

A lot of interactive sites are available on googling. You can try that.

  • To know how they convert these values, check its wikipedia page.
  • Or you can check out the OpenCV docs to see how it works in OpenCV : cvtColor()

I just pasted the relation for you here:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!