I am running L4T 24.2.0 with OpenCV 3.1.0 that I compiled myself, and I’m trying to capture frames in Python from the onboard camera.
When I run the following command, I get frames that are single channel (grayscale). If I initiate a video capture from the command line with nvoverlaysink, I can see color video. I’ve tried all the combinations of gstreamer pipeline I could find here but nothing works. Any ideas what could be going wrong, and how I can get opencv-style BGR frames?
#
cap = cv2.VideoCapture('nvcamerasrc ! video/x-raw(memory:NVMM),width=(int)1280,height=(int)720,format=(string)I420,framerate=(fraction)24/1 ! nvvidconv flip-method=2 ! appsink')
ret,frame = cap.read()