安装:
pip install opencv
import cv2
image=cv2.imread(‘1.png’) #读取图片按像素存入数组。 numpy.ndarray 类型 image[x][y] x行,y列 的rgb值
cv2.imshow(‘image’,image) //显示图片
cv2.waitKey(0) #按键退出
cv2.destroyAllWindows()
image.shape(0) //图片高度 shape(1) 宽度
https://github.com/zeusees/train-detector