Error accessing camera connected to NVIDIA Jetson AGX ORIN 64 Gb development kit
Show older comments
I am trying to access camera connected to Nvidia Jeston AGX orin. The camera model is: See3CAM_CU135M_H03R1 (econsystem usb 3). The camera is working properly in Nvidia Jeston. But when i am trying to use it on matlab i am having the following output and error:
Checking for CUDA availability on the Target...
Checking for 'nvcc' in the target system path...
Checking for cuDNN library availability on the Target...
Checking for TensorRT library availability on the Target...
Checking for prerequisite libraries is complete.
Gathering hardware details...
Checking for third-party library availability on the Target...
Gathering hardware details is complete.
Board name : NVIDIA Jetson AGX Orin Developer Kit
CUDA Version : 12.2
cuDNN Version : 8.9
TensorRT Version : 8.6
GStreamer Version : 1.20.3
V4L2 Version : 1.22.1-2build1
SDL Version : 1.2
OpenCV Version : 4.8.0
Available Webcams : See3CAM_CU135M_H03R1
Available GPUs : Orin
Available Digital Pins : 7 11 12 13 15 16 18 19 21 22 23 24 26 29 31 32 33 35 36 37 38 40
Available Webcams:
1: See3CAM_CU135M_H03R1
Details of Webcam 1: See3CAM_CU135M_H03R1
Error initializing camera See3CAM_CU135M_H03R1: Gstreamer pipeline error. Make sure that the camera is not opened.
The code which i used is given below:
clear all
close all
clc
% Connect to the Jetson
hwJetson = jetson('10.134.169.67', 'JetsonCam', 'ws132');
% List the available webcams
webcams = hwJetson.WebcamList;
% Display the list of webcams
disp('Available Webcams:');
for i = 1:length(webcams)
fprintf('%d: %s\n', i, webcams{i});
end
% Get detailed information about each webcam
for i = 1:length(webcams)
camName = webcams{i};
fprintf('\nDetails of Webcam %d: %s\n', i, camName);
% Try to initialize the camera with a specific resolution and frame rate
try
% Initialize the camera with the default resolution and frame rate
cam = camera(hwJetson, camName, [1280 720]); % Example resolution and frame rate
% Display video modes supported by the camera
videoModes = cam.AvailableResolutions;
% Print available resolutions
fprintf('Available Resolutions:\n');
for j = 1:length(videoModes)
fprintf('Resolution %d: %s\n', j, videoModes{j});
end
% Clean up
clear cam;
catch ME
% Display an error message if the camera initialization fails
fprintf('Error initializing camera %s: %s\n', camName, ME.message);
end
end
2 Comments
Ramakrishna Mandalapu
on 30 Jul 2024
Hi Avishek,
Can you let me know the MATLAB release you are using?
Also, please run the below command on Orin and provide the output.
$ v4l2-ctl --info -d <camera number> --list-formats-ext
Ramakrishna
avishek
on 31 Jul 2024
Answers (1)
Ramakrishna Mandalapu
on 12 Aug 2024
Hi Avishek,
Thanks for the info.
Can you please check if you are able to access this camera via cheese or other applications.
From the v4l2-ctl output I can see that the camera supports GREY and Y16 pixel formats. GStreamer's v4l2 plugin won't support the above formats hence the issue. These are the formats that can be supported by v4l2 plugin to access the USB cameras.
video/x-raw
format: { (string)RGB16, (string)BGR, (string)RGB, (string)ABGR, (string)xBGR, (string)RGBA, (string)RGBx, (string)GRAY8, (string)GRAY16_LE, (string)GRAY16_BE, (string)YVU9, (string)YV12, (string)YUY2, (string)YVYU, (string)UYVY, (string)Y42B, (string)Y41B, (string)YUV9, (string)NV12_64Z32, (string)NV24, (string)NV61, (string)NV16, (string)NV21, (string)NV12, (string)I420, (string)ARGB, (string)xRGB, (string)BGRA, (string)BGRx, (string)BGR15, (string)RGB15 }
width: [ 1, 32768 ]
height: [ 1, 32768 ]
framerate: [ 0/1, 2147483647/1 ]
Our camera function uses GStreamer underneath, so can you try accessing your camera using webcam function instead of camera.
Thanks,
Ramakrishna
Categories
Find more on Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!