Answers for "cv2 image with clor and not yellow"

1

images from opencv displayed in blue

# matplotlib interprets images in RGB format, but OpenCV uses BGR format

# so to convert the image so that it's properly loaded, convert it before loading

img = cv2.imread('filename.ext')		# this is read in BGR format
rgb_img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)		# this converts it into RGB

plt.imshow(rgb_img)
plt.show()
Posted by: Guest on August-10-2020
0

cv2 yellow color range

lower = np.array([22, 93, 0])
upper = np.array([45, 255, 255])
Posted by: Guest on September-06-2020

Python Answers by Framework

Browse Popular Code Answers by Language