Hi, I am new to the Jetson TX2 and I am currently trying to use python and openCV2 to do open the Jetson TX2 camera.
I am able to turn on the camera using:
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=4 ! video/x-raw, format=(string)I420 !
videoconvert ! video/x-raw, format=(string)BGR !
appsink”)
However, I get a message when the camera turns on that says:
VIDEOIO ERROR: V4L: device nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420, framerate=(fraction)30/1 ! nvvidconv flip-method=4 ! video/x-raw, format=(string)I420 ! videoconvert ! video/x-raw, format=(string)BGR ! appsink: Unable to query number of channels
Available Sensor modes :
2592 x 1944 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
2592 x 1458 FR=30.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
1280 x 720 FR=120.000000 CF=0x1109208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 1 WxH = 2592x1458 FrameRate = 30.000000 …
How can I change the sensorModeIndex to 3 where the resolution is 1280x720 and framerate is 120 and dont get this message everytime I turn on the camera?