OpenCV example error

Hi

I use Toradex Analogue Camera Adapter (ACA) to connect Camera to Ixora V1.1A board and I can display the video input frames with gstreamer piplines. My camera has PAL video output.
I tested the OpenCV Example but I have these output after run the program:

[ 2783.943654] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
[ 2783.950237] ERROR: v4l2 capture: slave not found! V4L2_CID_HUE
OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file /usr/src/debug/opencv/3.3+gitAUTOINC+87c27a074d_2a9d1b22ed_a62e20676a_34e4206aef_fccf7cd6a4-r0/git/modules/videoio/src/cap_gstreamer.cpp, line 881
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:

/usr/src/debug/opencv/3.3+gitAUTOINC+87c27a074d_2a9d1b22ed_a62e20676a_34e4206aef_fccf7cd6a4-r0/git/modules/videoio/src/cap_gstreamer.cpp:881: error: (-2) GStreamer: unable to start pipeline
 in function cvCaptureFromCAM_GStreamer

ERROR: Could not access the camera!

I only change these lines before make:

//these part commented out
    //if (!face_cascade.load( face_cascade_name ) ) {
        //printf("--(!)Error loading training file: haarcascade_frontalface_alt2.xml\n");
        //return -1;
    //};
 
    try {
        capture.open("v4l2:///dev/video3");  //video3 changed to video0
        capture.set(CV_CAP_PROP_FRAME_WIDTH, 640); //640 changed to 720
        capture.set(CV_CAP_PROP_FRAME_HEIGHT, 480); //480 changed to 576
    }

My Linux dmesg

Thanks

hi @prog

Thanks for the dmesg log.
Which changes have you done to the local.conf when you compiled the custom Linux? Which SDK did you use to compile the opencv example?

Could you check if /dev/video3 is correct?

Best regards, Jaski

Hi @jaski.tx
I added these lines in local.conf:

IMAGE_INSTALL_append = " boost zlib qt3d qt5-plugin-generic-vboxtouch qtbase qtcanvas3d qtcharts qtconnectivity qtdatavis3d qtdeclarative qtenginio qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquick1 qtquickcontrols2 qtquickcontrols qtscript qtsensors qtserialport qtsvg qtsystems qttools qttranslations qtvirtualkeyboard qtwebchannel qtwebkit-examples qtwebkit qtwebsockets qtxmlpatterns openssh-sftp-server gdb gdbserver opencv "
IMAGE_INSTALL_append = " assimp devil"
IMAGE_INSTALL_append = " x11vnc"

ACCEPT_FSL_EULA = "1"

I built my new custom Image.

bitbake -k angstrom-lxde-image

after that I created new sdk:

bitbake angstrom-lxde-image -c populate_sdk

and at the end I install it from deploy directory.

I also tested /dev/video3 but I get error.

Thanks

Could you give the output of ls /dev | grep video and v4l2-ctl --all -d /dev/video3? Thanks.

Hi @jaski.tx

root@apalis-imx6:~# ls /dev | grep video
    video0
    video1
    video16
    video17
    video18
    video19
    video2
    video20
    root@apalis-imx6:~# v4l2-ctl --all -d /dev/video3
    Failed to open /dev/video3: No such file or directory

I use video0 as video source.

Thanks

Thanks for the Input. What is the output of v4l2-ctl --list-devices?
And what is the output of v4l2-ctl -d /dev/video* where for * you put the number which got from the list devices command?