I really need some help cracking the OpenCV onboard camera capture…
I have spend really long time and tried many different approaches, but it always fails
The TX2 is flashed with the latest Nvidia package and all cpp samples works
I want to capture using python, and really need the simplest example that should work on a “out of the box” installation from the latest TX2 SDK manager software
I have tried with “gst-launch-1.0 nvarguscamerasrc …” producer
and all of these examples in versus combinations.
def open_cam_onboard(width, height):
# On versions of L4T previous to L4T 28.1, flip-method=2
# Use Jetson onboard camera
gst_str = ("nvarguscamerasrc ! "
"video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420, framerate=(fraction)30/1 ! "
"nvvidconv ! video/x-raw, width=(int){}, height=(int){}, format=(string)BGRx ! "
“videoconvert ! appsink”).format(width, height)
return cv2.VideoCapture(gst_str, cv2.CAP_GSTREAMER)
cap = open_cam_onboard(1280, 720)
#cap = cv2.VideoCapture("nvcamerasrc ! 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)$
#cap = cv2.VideoCapture(0)
#cap = cv2.VideoCapture(“nvcamerasrc”)
if not cap.isOpened():
print(“No Cam”)
exit()
System info
thr@TX2:~/python$ cat /etc/nv_tegra_release
R32 (release), REVISION: 4.3, GCID: 21589087, BOARD: t186ref, EABI: aarch64, DATE: Fri Jun 26 04:34:27 UTC 2020
thr@TX2:~/python$ sudo apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Version: 4.4-b186
thr@TX2:~/python$ opencv_version
OpenCV 4.1.1 - with GStreamer support