How to use usb webcam in H3??

Jump to: navigation, search
Revision as of 11 January 2018 at 11:34.
The highlighted comment was edited in this revision. [diff]

How to use usb webcam in H3??

Because I use python opencv

>> cap = cv2.VideoCapture(0)

It doesn't capture webcam

How to solve this problem??

    11:52, 17 October 2017

    Hi

    I write information when I checked the usb webcam using Yocto v2.23.0.
    I don't understand your detailed environment, but I am glad if this is helpful for you.

    Environment:
    - H3 Starter Kit
    - Yocto v2.23.0
    - USB Webcam Logicool C920t

    1. Enable the following kernel config.
            Device Drivers --> Multimedia support  ---> [*] Media USB Adapters
                    [*] USB Video Class (UVC)
                    [*] UVC input events device support (NEW)
    
    2. Modify the gstreamer1.0-plugin-vspfilter
     # vi gst/vspfilter/vspfilterutils.c
       {GST_VIDEO_FORMAT_UYVY, V4L2_PIX_FMT_UYVY, V4L2_MBUS_FMT_AYUV8_1X32, 1},
    +  {GST_VIDEO_FORMAT_YUY2, V4L2_PIX_FMT_YUYV, V4L2_MBUS_FMT_AYUV8_1X32, 1},
    
    3. bitbake
    
    4. How to run
     Ex)
     # gst-launch-1.0 v4l2src device=/dev/video16 ! video/x-raw,width=1920,height=1080 ! vspfilter ! video/x-raw,format=BGRA ! waylandsink
    
     * videoN: Please set according to your environment.
       Ex) In case of M3 SK it was video8.
    
      04:38, 23 October 2017

      My environment : - Yocto v2.19.0 - USB Webcam logitech HD WEBCAM C525

      I refer https://elinux.org/R-Car/Boards/Yocto-Gen3/OpenCL & https://elinux.org/index.php?title=R-Car/Boards/Yocto-Gen3&oldid=449821

      sorry I don't know where can I revise the code you say in the first 1. Enable the following kernel config.

             Device Drivers --> Multimedia support  ---> [*] Media USB Adapters
                     [*] USB Video Class (UVC)
                     [*] UVC input events device support (NEW)
      
        07:33, 23 October 2017
          22:54, 23 October 2017

          for enter in the configuration of the kernel ( you must have a X server configured because you have a popup with the menuconfig) : bitbake linux-renesas -c do_menuconfig

            04:33, 11 January 2018