1 Reply Latest reply on May 3, 2016 1:12 PM by Intel Corporation

    opencv 3.0 video error V4L/V4L2: VIDIOC_S_CROP

    insen.an

      i'm trying to this with logitec c110 webcam and sparkfun edison base-board

      but i skipped  2. Enabling UVC ( USB Video device Class ) by customizing the Linux Kernel ( optinal )


      https://software.intel.com/en-us/articles/opencv-300-beta-ipp-tbb-enabled-on-yocto-with-intel-edison

       

      environment is

      Yocto linux 1.7.3

      opencv 3.0.0

       

      camera is ok, because i test this applicaion.(node.js & ffmpeg)

      GitHub - drejkim/edi-cam: Video streaming on Intel Edison

       

      but opencv 3.0.0 excuted by this code. error is appear

      (for /home/ext is my sdcard directory. 8GB)

       

      root@edison:/home/ext/opencv-3.0.0/samples/cpp# ./cpp-example-facedetect
      VIDEOIO ERROR: V4L/V4L2: VIDIOC_S_CROP
      
      

       

      facedetect.cpp like this.

       

      #include "opencv2/opencv.hpp"
      #include "opencv2/core/utility.hpp"
      #include "opencv2/imgproc.hpp"
      #include "opencv2/imgcodecs.hpp"
      #include "opencv2/highgui.hpp"
      
      
      using namespace cv;
      using namespace std;
      
      
      int main(int, char**)
      {
          VideoCapture cap(0); // open the default camera
          if(!cap.isOpened())  // check if we succeeded
              return -1;
      
      
          return 0;
      }
      
      

       

      v4l2-ctl command is worked.

      root@edison:/home/ext/opencv-3.0.0/samples/cpp# lsusb
      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 001 Device 002: ID 046d:0829 Logitech, Inc.
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      root@edison:/home/ext/opencv-3.0.0/samples/cpp# v4l2-ctl -info
      Video input set to 0 (Camera 1: ok)
      root@edison:/home/ext/opencv-3.0.0/samples/cpp# v4l2-ctl --list-devices
      Webcam C110 (usb-dwc3-host.2-1):
        /dev/video0
      root@edison:/home/ext/opencv-3.0.0/samples/cpp# v4l2-ctl --list-formats
      ioctl: VIDIOC_ENUM_FMT
        Index       : 0
        Type        : Video Capture
        Pixel Format: 'YUYV'
        Name        : YUV 4:2:2 (YUYV)
      
      
        Index       : 1
        Type        : Video Capture
        Pixel Format: 'MJPG' (compressed)
        Name        : MJPEG
      
      

       

      anyone help this error?

       

      anyway v4l2 installed by opkg package manager.

      root@edison:/home/ext/opencv-3.0.0/samples/cpp# opkg install v4l-utils
      Package v4l-utils (1.0.1-r0) installed in root is up to date.