600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > python读取图片rgb opencv python将图像读取为RGB

python读取图片rgb opencv python将图像读取为RGB

时间:2018-08-13 23:18:23

相关推荐

python读取图片rgb opencv python将图像读取为RGB

Is it possible to opencv (using python) as default read an image as order of RGB ? in the opencv documentation imread method return image as order of BGR but in code imread methods return the image as RGB order ? I am not doing any converting process. Just used imread methods and show on the screen. It shows as on windows image viewer.

is it possible ?

EDIT 1:

my code is below. left side cv.imshow() methods and the other one plt.imshow() methods.

cv2.imshow() methods shows image as RGB and plt show it as opencv read (BGR) the image.

image_file = image/512-2-1001-18-RGB.jpg

# img = imp.get_image(image_file)

img = cv2.imread(image_file)

plt.imshow(img)

plt.show()

cv2.imshow(asd, img)

cv2.waitKey(0)

cv2.destroyAllWindows()

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。