Giter Club home page Giter Club logo

Comments (14)

Namburger avatar Namburger commented on June 1, 2024 1

error: VIDIOC_QUERYCTRL: No such device

May means that your camera was not detected at index 0 and 1 when initializing it. Can you show the outputs of

ls /dev/video*

from edgetpu.

Namburger avatar Namburger commented on June 1, 2024

@akioolin
Hi, could you check whether if your USB hub supports 3.0? This is most-likely due to USB bandwidth. We haven't tested out using 2 USB cameras, but here are a few concerns:

  • Bandwidth issues which you are experiencing, especially while using a single USB port.
  • While inference are sped up by the TPU, image processing is still being done on the CPU. The Arm Cortex-A53 may slow the application down significantly unless you're threading the image processing, but also keep in mind that invoke() shouldn't be run in parallel
  • Power issue. I suggest that you are using a USB hub that also supplies power to the cameras.

As for using 2 cameras, I have successfully used 2 cameras, one is our own coral's cameras and a usb hp camera but we haven't tried 2 usb cameras yet. I'll get another USB camera tomorrow and test this, I'll keep you updated!

from edgetpu.

akioolin avatar akioolin commented on June 1, 2024

@Namburger

Thank you very detail suggestion. The usage of edgetpu will be interleaved, which means camera 1's image send into edgetpu, next is camera 2's image into edgetpu, and so on. The image pre-processing will be next major issue for performance optimization.

As my past experience, using hw image pre-processing unit is the best way. but after check the architecture block of i.MX8M, this AP seems has no hw scaler, color space conversion embedded.
For what you mention about threading, this will be the optimization phase. BTW, is there any example talking about using GPU for image processing in BSP?

For USB bandwidth, I'll check the usb hub working mode and make sure using a real usb 3.0 hub.

For power issue, the usb hub is forced to using external power supply.

For uvcvideo kernel module's bandwidth issue, I found some threads talking about it. Please check the below URLs.

https://forum.odroid.com/viewtopic.php?t=33707
https://stackoverflow.com/questions/25619309/how-do-i-enable-the-uvc-quirk-fix-bandwidth-quirk-in-linux-uvc-driver

Could you do me a favor while testing two usb camera with quirks option setting? if the bandwidth problem occurred, try the setting option "quirks". Although, I can get the BSP source code, like imx-uboot, imx-linuxk-kernel, etc. But I don't know how to make my own boot image and flash into dev-board. Is there any documents talking about boot-image customization of dev-board ?

I think, this issue may also be seen on dev-board mini, which using MTK 8167s AP. May be you can use the same test device on dev-board mini to see what happens.

BR, Akio

from edgetpu.

Namburger avatar Namburger commented on June 1, 2024

Hi @akioolin
So I just quickly put this script together to reproduce the issue: https://gist.github.com/Namburger/9a4fb9b7c092541654a38f4dc7de067f

To my surprise, it works without errors. The weird thing is that my USB hub only supports USB 2.0 standard with no power supply so maybe the the cameras I used does uses much power/data transfer?
Here are the cameras I'm using:
https://www.logitech.com/en-us/product/c930e-webcam
Here is the usb hub I'm using:
https://www.amazon.com/C2G-Cables-27402-4-Port-Inches/dp/B000LWX6U8

I can even use 3 cameras after modifying the script a little bit.

from edgetpu.

Namburger avatar Namburger commented on June 1, 2024

Also, documentation for Mendel OS are here: https://coral.googlesource.com/docs/+/refs/heads/master/ReadMe.md

from edgetpu.

mbrooksx avatar mbrooksx commented on June 1, 2024

Hi @akioolin

Here's a minimal gstreamer example: https://gist.github.com/mbrooksx/2bb6dfa1bdc74512688d7ffd588dc832

Note you need to install gstreamer1.0-tools

I have two versions in the script, one that takes raw frames at VGA resolution and one that has higher res which I then decode. I'm not sure how you're receiving frames in your version but I wouldn't expect hires raw frames to work.

Thanks,
Michael

from edgetpu.

akioolin avatar akioolin commented on June 1, 2024

@Namburger

Thank you for your detail reply. I got the same result with my tested camera testbed. After using lsusb to exams the capability of used usb camera, I found there are all USB 2.0 device, nnd the usb hub is USB 3.0. This means I have to check more detail about the camera which issued bandwidth not enough.

If I got any progress, I'll report what I got.

BR, Akio

from edgetpu.

akioolin avatar akioolin commented on June 1, 2024

@mbrooksx

Thank you. I use my own code to test. which you can found in github.com
https://github.com/akioolin/edgetpu_demo/tree/master/edgetpu_demo

this is one channel version, and I build a two channel version based on this project.

BR, Akio

from edgetpu.

Namburger avatar Namburger commented on June 1, 2024

@mbrooksx @akioolin I believe the problem here maybe cameras dependent. I'm able to also execute the gstreamer script with no issue over my USB2.0 hub. With the higher res there is this warning:

There may be a timestamping problem, or this computer is too slow.

Other than that, no issues.

from edgetpu.

akioolin avatar akioolin commented on June 1, 2024

@Namburger @mbrooksx

I just tested the cameras which have this problem. Using the same test code, the problem is the same. The current solution is using two hub, one is connected to the TYPE-A and the other is connected to OTG. The bandwidth problem is gone.

AS @Namburger siad, it is hardware device dependent problem.

BTW, from SoM pin assignment, the SoM has two usb port. in dev-board, one is type-a, one is otg. is the usb all used?

BR, Akio

from edgetpu.

LINYOUWEI0804 avatar LINYOUWEI0804 commented on June 1, 2024

Hello, I tried to open 2 usb cameras according to this sample program [https://gist.github.com/Namburger/9a4fb9b7c092541654a38f4dc7de067f] but this error occurs, what is the problem?

error: VIDIOC_QUERYCTRL: No such device

The coral example can be successfully executed
[https://coral.ai/docs/dev-board/camera/#using-an-hdmi-monitor]
, so I don't think it's a USB camera problem, so I don't think it's a USB camera problem

from edgetpu.

akioolin avatar akioolin commented on June 1, 2024

Hello, I tried to open 2 usb cameras according to this sample program [https://gist.github.com/Namburger/9a4fb9b7c092541654a38f4dc7de067f] but this error occurs, what is the problem?

error: VIDIOC_QUERYCTRL: No such device

The coral example can be successfully executed
[https://coral.ai/docs/dev-board/camera/#using-an-hdmi-monitor]
, so I don't think it's a USB camera problem, so I don't think it's a USB camera problem

@LINYOUWEI0804

Basically, I suggest you do something check about the system configuration, like @Namburger mentioned check. the other is using "v4l2-ctl --list-formats-ext" to check the capability of usb camera which you used.

BR, Akio

from edgetpu.

LINYOUWEI0804 avatar LINYOUWEI0804 commented on June 1, 2024

Some information,
「ls /dev/video*」 :
/dev/video0 /dev/video1 /dev/video2

「v4l2-ctl --list-formats-ext」 :
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

Use the 「v4l2-ctl --list-formats-ext --device /dev/video1」 command to find the camera:
[1]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 1280x720
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
...............
「v4l2-ctl --list-formats-ext --device /dev/video2」:
[0]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 640x480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
...........

from edgetpu.

LINYOUWEI0804 avatar LINYOUWEI0804 commented on June 1, 2024

Solved, thank you. Need to change these 2 parameters:
cap = cv2.VideoCapture(0) , cap2 = cv2.VideoCapture(1)
Change to cap = cv2.VideoCapture(1) , cap2 = cv2.VideoCapture(2 )and it will work successfully

from edgetpu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.