Get RGB value opencv python

前端 未结 5 884
暖寄归人
暖寄归人 2020-12-16 17:28

I am loading an image into python e.g.

image = cv2.imread(\"new_image.jpg\")

How can i acccess the RGB values of image?

5条回答
  •  太阳男子
    2020-12-16 17:43

    You can use numpy Better convert the image into numpy array and transpose the matrix [R G B] will be [B G R] and vice versa

提交回复
热议问题