Identifying the range of a color in HSV using openCV

前端 未结 4 1962
陌清茗
陌清茗 2021-02-03 13:59

I am working on identifying the color yellow using openCV in python. I have come to this step where I have to define the lower and upper range of the color yellow in HSV.

<
4条回答
  •  滥情空心
    2021-02-03 14:34

    take a look at this page you will find HSV values of the color you want.

    For HSV, Hue range is [0,179], Saturation range is [0,255] and Value range is [0,255]. Different softwares use different scales. So if you are comparing OpenCV values with them, you need to normalize these ranges.

    i guess you are searching the values like below for yellow

    lower_blue = np.array([25,50,50])
    upper_blue = np.array([32,255,255])
    

提交回复
热议问题