I recently got a fresh Jetson Nano today and was testing OpenCV. I’m posting my Python script below for a basic test. Note that I cut down the resolution to 2K. Also, I’m getting an undervoltage throttling error. I’m going to need to buy a better power supply. However, even with the current throttling issue, I was able to do basic frame resizing test of OpenCV using gstthetauvc. The new unit also does not have a fan and I may be getting thermal throttling as well. I’m making a video of the complete setup from opening the box. I will post here when I complete the video
import cv2
# cap = cv2.VideoCapture(0)
cap = cv2.VideoCapture("thetauvcsrc mode=2K ! decodebin ! autovideoconvert ! video/x-raw,format=BGRx ! queue ! videoconvert ! video/x-raw,format=BGR ! queue ! appsink");
# Check if the webcam is opened correctly
if not cap.isOpened():
raise IOError("Cannot open webcam")
while True:
ret, frame = cap.read()
frame = cv2.resize(frame, None, fx=0.25, fy=0.25, interpolation=cv2.INTER_AREA)
cv2.imshow('Input', frame)
c = cv2.waitKey(1)
if c == 27:
break
cap.release()
cv2.destroyAllWindows()