转载:https://blog.csdn.net/weixin_41799483/article/details/80884682
-
#coding=utf-8
-
#读取图片 返回图片某像素点的b,g,r值
-
import cv2
-
import numpy as np
-
-
img=cv2.imread('./o.jpg')
-
px=img[10,10] # 注意这里坐标是从0开始的
-
print px
-
blue=img[10,10,0]
-
print blue
-
green=img[10,10,1]
-
print blue
-
red=img[10,10,2]
-
print blue