Sensor型号:树莓派 IMX219
在Opencv中读取并保存图像数据,
图像读取 cap = cv2.VideoCapture(),参数需要注意。
import cv2
import numpy as np
impor tpickle
import matplotlib.pyplot as plt
cap = cv2.VideoCapture("nvarguscamerasrc ! video/x-raw(memory:NVMM),
width=(int)1280, height=(int)720,format=(string)I420,
framerate=(fraction)30/1 ! nvvidconv flip-method=0 ! video/x-raw,
format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR !
appsink")
frame =cap.read()
cv2.imshow('frame',frame )
cv2.imwrite("kk.jpg",frame)
参考:https://www.cnblogs.com/TransTown/p/7398254.html