How to use HSV values for drawing functions in Python?
For example:
cv2.rectangle(img,pt1,pt2, X ,-1)
X = (B,G,R) for red, green, and blue.
I want to draw a square that has a specific (h,s,v) value. Can someone please tell me of a way I can use my (h,s,v) value in a drawing functions such as cv2.rectangle?
I'd rather not use some kind of online converter or anything outside my code please.
Sorry but I do not quite understand your question. A couple questions 1: Do you already have the BGR to HSV conversion done? 2: What exactly do you mean by draw a square that has a specific (h,s,v) value? Are you trying to do this on the image that was converted from
BGR2HSV
or an entirely new image which is represented in HSV?I've used frame = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV), but then the frame shows everything in very unrealistic colors.
I want to use the drawing function in this format: (cv2.rectangle( img,pt1,pt2,(hue,saturation,value),-1)
3.I want to use cv2.rectangle( img,pt1,pt2,(hue,saturation,value),-1) on a frame that looks like a normal natural frame.
Also, using color of (0,255,0) gives me a green rectangle on both my normal frames and hsv frames.