Running Raspi + Lepton FLIR Cameras simultinuesly

Hi,

I am looking if i can run Raspi and Lepton FLIR cameras simultinuesly in python code and OpenCV in jetson nano. i was able to run both cameras by this command from the terminal

gst-launch-1.0 nvarguscamerasrc sensor_mode=0 ! ‘video/x-raw(memory:NVMM),width=3264, height=2464, framerate=21/1, format=NV12’ ! nvvidconv flip-method=2 ! ‘video/x-raw,width=800, height=600’ ! videoconvert ! ximagesink & gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,format=UYVY ! videoscale ! video/x-raw,width=800,height=600 ! videoconvert ! ximagesink

and i am looking if can implement the above command in this python / opencv code

import cv2
print(cv2.version)
dispW=640
dispH=480
flip=2

camSet=‘nvarguscamerasrc ! video/x-raw(memory:NVMM), width=3264, height=2464, format=NV12, framerate=21/1 ! nvvidconv flip-method=’+str(flip)+’ ! video/x-raw, width=’+str(dispW)+’, height=’+str(dispH)+’, format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink’
cam= cv2.VideoCapture(camSet)

while True:
ret, frame = cam.read()
cv2.imshow(‘nanoCam’,frame)
if cv2.waitKey(1)==ord(‘q’):
break
cam.release()
cv2.destroyAllWindows()

Have reference to below git hub.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.