Opencv c Application Not Working With ar0234 sensor (e-con_STURDeCAM25_CUXVR)

Below is my basic source to open capture state :

VideoCapture cap (“v4l2src device=/dev/video0 num-buffers=1 ! video/x-raw, format=(string)UYVY, width=(int)1920, height=(int)1200 ! appsink”);

if( !cap.isOpened() )
{
        cout<<"Cannot open the camera"<<endl;
        return -1;
} 

Opening in BLOCKING MODE
ArgusV4L2_Open failed: No such file or directory
Opening in BLOCKING MODE
[ WARN:0@0.893] global /home/mt/opencv/modules/videoio/src/cap_gstreamer.cpp (1412) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
Opening in BLOCKING MODE
ArgusV4L2_Open failed: No such file or directory
Opening in BLOCKING MODE
[ WARN:0@1.560] global /home/mt/opencv/modules/videoio/src/cap_gstreamer.cpp (2408) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Internal data stream error.
[ WARN:0@1.561] global /home/mt/opencv/modules/videoio/src/cap_gstreamer.cpp (904) startPipeline OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0@1.561] global /home/mt/opencv/modules/videoio/src/cap_gstreamer.cpp (1590) setProperty OpenCV | GStreamer warning: no pipeline
[ WARN:0@1.561] global /home/mt/opencv/modules/videoio/src/cap_gstreamer.cpp (1590) setProperty OpenCV | GStreamer warning: no pipeline
[ WARN:0@1.561] global /home/mt/opencv/modules/videoio/src/cap_gstreamer.cpp (1590) setProperty OpenCV | GStreamer warning: no pipeline
[ WARN:0@1.561] global /home/mt/opencv/modules/videoio/src/cap_gstreamer.cpp (1485) getProperty OpenCV | GStreamer warning: GStreamer: no pipeline
CAM_FPS : 0
Error Received While Reading Frame
terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(4.6.0-dev) /home/mt/opencv/modules/imgcodecs/src/loadsave.cpp:763: error: (-215:Assertion failed) !_img.empty() in function ‘imwrite’

Aborted (core dumped)

Hi,
Please try this sample and see if it works:
V4l2src using OpenCV Gstreamer is not working in Jetson Xavier NX - #3 by DaneLLL

Hi DaneLLL,

I have tried the above step and I am able to open camera now but I am not able to set exposure_absolute_time value.
Everytime I set the value using
v4l2-ctl -d /dev/video0 -c exposure_auto=1
v4l2-ctl -d /dev/video0 -c exposure_time_absolute=100. But when I run opencv application the value goes back to auto_exposure or exposure values Aren’t applied.

Is there way to tune the exposure values from api itself v4l2src… in opencv. I have tried setting exposure from opencv as well but it says unhandled property.

Need help to set the exposure values from opencv application.


This is output image which is being captured from current settings. Need exposure settings for the same camera with opencv.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.