VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. I'm talking about the UVC standard for webcams that work directly with Windows, not the normal kind that require an additional driver (such as TWAIN, VFW, or WDM drivers). Checking on MSDN https://msdn.microsoft.com/en-us/library/windows/hardware/ff568651 I found that the UVC supports the following two raw YUV color modes: YUV2 and NV12. However nothing was mentioned at all about raw RGB color modes. I'm not sure if this means that UVC standard supports RGB and Microsoft felt it was unnecessary to specifically mention it, since it was so obvious that RGB would be supported, or if Microsoft didn't mention it because it is in fact NOT supported.
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Done a LOT of research on this lately...

    UVC supports:

    (spec v1.0 and 1.1)
    Uncompressed YUY2
    MJPEG

    sometimes NV12 or other vendor-specific frame-compatible formats (incl. DV)

    (spec v1.5)
    in addition to above,
    AVC/H264
    possibly also HEVC/H265

    Usually only the BOLD ones are guaranteed, and ONLY when they're also supported by the Cam manufacturer as well.

    Raw/RGB would likely be a proprietary solution if at all (either wholely independent of UVC, or using a proprietary UVC replacement driver). Even lowly DV format, which is supposed to be OK for v1.1, is not being supported by Microsoft's UVC driver.

    Scott
    Quote Quote  
  3. Originally Posted by Cornucopia View Post
    Done a LOT of research on this lately...

    UVC supports:

    (spec v1.0 and 1.1)
    Uncompressed YUY2
    MJPEG

    sometimes NV12 or other vendor-specific frame-compatible formats (incl. DV)

    (spec v1.5)
    in addition to above,
    AVC/H264
    possibly also HEVC/H265

    Usually only the BOLD ones are guaranteed, and ONLY when they're also supported by the Cam manufacturer as well.

    Raw/RGB would likely be a proprietary solution if at all (either wholely independent of UVC, or using a proprietary UVC replacement driver). Even lowly DV format, which is supposed to be OK for v1.1, is not being supported by Microsoft's UVC driver.

    Scott

    Since BGR24 is the standard for Windows Bitmap BMP files (and AVI files, as AVI files use BitmapInfoHeader structure just like BMP files), I would assume BGR24 is THE STANDARD primary pixel format (and YUV formats only secondary formats) for images and video for ANYTHING that Microsoft produced, including its UVC driver. But I couldn't find this stated on the MSDN website. Do you know of any UVC cameras that actually output BGR24 pixel format video stream, so I could test whether or not MS's UVC driver supports it?
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Actually, NO. It is NOT the standard format for most variations of video. More common are forms of YUV. It's analog in the photo world is Jpeg, not bmp. And bitmapinfo is just their (MS's) way of describing the structure, which can be uncompressed or compressed, rgb or yuv or other, full or reduced color palette, etc.

    Scott
    Last edited by Cornucopia; 14th May 2016 at 01:27.
    Quote Quote  
  5. Originally Posted by Videogamer555 View Post
    Since BGR24 is the standard for Windows Bitmap BMP files (and AVI files, as AVI files use BitmapInfoHeader structure just like BMP files), I would assume BGR24 is THE STANDARD primary pixel format
    No, virtually all video is natively YUV.
    Quote Quote  
  6. Originally Posted by jagabo View Post
    Originally Posted by Videogamer555 View Post
    Since BGR24 is the standard for Windows Bitmap BMP files (and AVI files, as AVI files use BitmapInfoHeader structure just like BMP files), I would assume BGR24 is THE STANDARD primary pixel format
    No, virtually all video is natively YUV.
    When I think of video, I think of a stream of frames, each one being its own single RGB image. I think of it this way, because I want to actually be able to process the data (for example, motion detection), and for that one will need to handle all 3 color channels or R, G, and B. I was hoping that a UVC camera, could present the software using it with a stream of RGB images, ready for processing, machine vision, motion detection, etc applications. I was hoping therefore that the UVC standard permitted the use of RGB encoded frames. It would make my work on the software side of things a LOT easier, so I don't have to waste time coding a YUV to RGB decoder, as well as writing my main application. And it's not just my time, it's also the CPU's time that gets wasted. The more steps that the CPU needs to do to get the image into RGB mode, before the image is even ready to be processed in RGB mode with whatever image processing algorithm I would be using, the more likely that the CPU won't finish processing the image before the next image in the stream is sent over the USB cable, a situation that leads to dropped frames and a lower frame rate. Ideally, I would picture using a 640x480 30fps RGB-output video camera which adhears to the UVC standard, so I have raw RGB frames to work with, and also don't need to worry about installing extra drivers (thanks to the camera using the UVC standard). This would allow me to have an application that could process the video in real time, so that the frame rate from the camera to my program is 30fps, and the output from my program to the monitor is also 30fps. I don't like the look of things here with UVC though, that it doesn't appear to handle RGB.

    Can somebody here, who's familiar enough with the UVC standard, tell me definitively whether or not UVC actually allows the sending of RGB frames?
    Quote Quote  
  7. Originally Posted by Videogamer555 View Post
    When I think of video, I think of a stream of frames, each one being its own single RGB image.
    As noted, video is usually YUV.

    Originally Posted by Videogamer555 View Post
    I think of it this way, because I want to actually be able to process the data (for example, motion detection), and for that one will need to handle all 3 color channels or R, G, and B. I was hoping that a UVC camera, could present the software using it with a stream of RGB images, ready for processing, machine vision, motion detection, etc applications.
    All of that can be performed just as well in YUV. Including sending the the frames to the graphics card for display.

    Originally Posted by Videogamer555 View Post
    Can somebody here, who's familiar enough with the UVC standard, tell me definitively whether or not UVC actually allows the sending of RGB frames?
    You can download the spec and see for yourself. Wikipedia has a link. See References near the bottom of the page:

    https://en.wikipedia.org/wiki/USB_video_device_class

    I saw no support for RGB. Only yuy2, nv12, m420 and i420. I've seen other places that RGB is not supported. Though I used to (15 years ago) work with a lot of USB webcams under windows (though not at the USB transport level) and many could deliver RGB. But that may simply be because the drivers converted the raw YUV data for you.
    Quote Quote  



Similar Threads