Error accessing camera connected to NVIDIA Jetson AGX ORIN 64 Gb development kit

13 Ansichten (letzte 30 Tage)
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 Kommentare
Ramakrishna Mandalapu
Ramakrishna Mandalapu am 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
avishek am 31 Jul. 2024
i am running MATLAB '23.2.0.2409890 (R2023b) Update 3' on Windows 11 OS. when i run the command : v4l2-ctl --info -d /dev/video0 --list-formats-ext , i get the follwing output in Jetson kit:
Driver Info:
Driver name : uvcvideo
Card type : See3CAM_CU135M_H03R1
Bus info : usb-3610000.usb-3.2
Driver version : 5.15.122
Capabilities : 0x84a00001
Video Capture
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : uvcvideo
Model : See3CAM_CU135M_H03R1
Serial : 141FCA08
Bus info : usb-3610000.usb-3.2
Media version : 5.15.122
Hardware revision: 0x00000000 (0)
Driver version : 5.15.122
Interface Info:
ID : 0x03000002
Type : V4L Video
Entity Info:
ID : 0x00000001 (1)
Name : See3CAM_CU135M_H03R1
Function : V4L2 I/O
Flags : default
Pad 0x01000007 : 0: Sink
Link 0x02000010: from remote pad 0x100000a of entity 'Extension 3' (Video Pixel Formatter): Data, Enabled, Immutable
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'GREY' (8-bit Greyscale)
Size: Discrete 4200x3120
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 3840x2160
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
[1]: 'Y16 ' (16-bit Greyscale)
Size: Discrete 4200x3120
Interval: Discrete 0.143s (7.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 3840x2160
Interval: Discrete 0.091s (11.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Ramakrishna Mandalapu
Ramakrishna Mandalapu am 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

Produkte


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by