OpenCV: get the highest value of R colord
I use this code to read an image:
import cv2
imbgr=cv2.imread('rgbpic.jpg')
How can I get the higest value of the redcolor that exists in this picture ?
I think you shall use the HSV space (cvtColor(img, COLOR_BGR2HSV)), then create a mask of blue colors (like around 240° that is 120 in H) and get the highest S
@begueradj , please, not so sloppy.
your title asks about red, your question about blue, you mention a LAB model, but your code does only bgr.
more effort, please !
@berak I was awkward ... sorry ...
@begueradj you can edit the question and the code