Why doesn't opencv give this rectangle a colour using python's cv2 -


the following code draws white rectangle. not supposed that. considering opencv uses bgr colorspace, should http://www.colorpicker.com/?colorcode=9f635f

import cv2 import numpy np  drawing = np.zeros([500, 500, 3]) cv2.rectangle(drawing, (0, 0), (250, 250), (95, 99, 159), -1) cv2.imshow("drawing", drawing) cv2.waitkey() 

it draw fine if change

drawing = np.zeros([500, 500, 3]) 

to

drawing = np.zeros([500, 500, 3], np.uint8) 

otherwise, image of 32f type.

enter image description here


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -