Hi,
Since your source output is UYVY format, you may try nvv4l2camerasrc:
import sys
import cv2
def read_cam():
cap = cv2.VideoCapture("nvv4l2camerasrc ! video/x-raw(memory:NVMM),width=3840,height=2160,framerate=15/1 ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw,format=BGR ! appsink sync=0 ")
if cap.isOpened():
cv2.namedWindow("demo", cv2.WINDOW_AUTOSIZE)
while True:
ret_val, img = cap.read();
cv2.imshow('demo',img)
cv2.waitKey(10)
else:
print "camera open failed"
cv2.destroyAllWindows()
if __name__ == '__main__':
read_cam()
The setting video/x-raw(memory:NVMM),width=3840,height=2160,framerate=15/1 is for E-Con CU135 USB camera(capability is 4Kp15). You need to change it per your source. Running with OpenCV takes certain CPU usage, please run sudo nvpmodel -m 0 and sudo jetson_clocks to get max performance. And can run sudo tegrastats to get system status.