I’ve compiled OpenCV 4.1 for the tx2, and have been successful in connecting to the onboard camera with gstreamer. However, when I connect to the camera in OpenCV python, the feed I get is several seconds delayed.
Here’s the code I use to capture:
cap = cv2.VideoCapture("nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720,format=(string)NV12, framerate=(fraction)2/3 ! nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink", cv2.CAP_GSTREAMER)
I would really appreciate if anyone knows and can share a way to get the feed in real time.