0

So i'm tying to get usb uvc extension units working with opencv. I've tried looking for extension units, vendor specific units or XU units and nothing has shown up.

Does opencv has this ability.

  • you should introduce what "UVC extensions" and "extension units" are. -- I looked that up. that's quite close to hardware. use system APIs (dshow/msmf, V4L, ...) directly. – Christoph Rackwitz Apr 15 '22 at 22:27
  • So i'm not a USB expert in any way but i can tell you what i know from reading the specification which you can read here. https://www.usb.org/document-library/video-class-v15-document-set – used_up_user Apr 19 '22 at 11:51
  • The Extension Unit (XU) is the method provided by this specification to add vendor-specific building blocks to the specification. Although a generic host driver will not be able to determine what functionality is implemented in the Extension Unit, it shall report the presence of these extensions to vendor-supplied client software, and provide a method for sending control requests from the client software to the Unit, and receiving status from the unit. – used_up_user Apr 19 '22 at 11:52
  • So from a coding perspective it should just be a call to a lower level driver that's completely generic. Like extension_unit_call(call,buffer). All the other call to the camera are low level driver calls. Like the exposure and contrast, so the extension unit is just a which the library doesn't inherently know what the size of the call is from the specification. – used_up_user Apr 19 '22 at 11:56
  • What i'm trying to do know is work with this guy library https://github.com/joelpurra/node-uvc-control, which is a USB UVC wrapper for this library https://github.com/node-usb/node-usb which is a generic USB driver library that works across linux and windows. With the goal of trying to make a XU call with this and grab the frame with Opencv – used_up_user Apr 19 '22 at 11:57
  • 1
    that... is node.js. I have no idea how you could make that and OpenCV interoperate. best case, you can open the camera with whatever program, and send these XU control things from another program, so multiple programs "access" the usb device concurrently. I am not very positive that this should be the case. – Christoph Rackwitz Apr 19 '22 at 21:58
  • 1
    So my end goal is to use a nodejs electron app with with a lot of image manipulation. So i was hoping of using opencv for the image grab and the image manipulation. After a lot of searching i found that this library libuvc could do the job. https://github.com/libuvc/libuvc. There's also a nice wrapper for it for javascript https://github.com/node-ffi-libraries/node-ffi-library-libuvc-v0.0.6 – used_up_user Apr 20 '22 at 21:09

1 Answers1

0

At the moment it's my understanding that opencv doesn't support extension units.

So a alternative to opencv for grabbing a image and sending the extension unit commands is https://github.com/libuvc/libuvc.

It's cross platform and you should be able to easily pass your opencv mat to it.