locked
Interlaced UVC Camera RRS feed

  • General discussion

  • Hi,

    I'm in the late stages of developing a UVC camera which uses and interlaced PAL resolution sensor (768 x 756 @ 25fps). I don't have enough ram in the hardware to buffer entire frames and weave the two fields together in hardware, so I would prefer to use windows to do a weave deinterlace (we actually want to use the jagged edges as an easy method of movement detection).

    My hardware is working with the uvcvideo.sys driver just fine, I'm currently developing on Windows 7 x64.

    I'm streaming the video as one field per frame, so I get a half height picture at twice the frame rate but have not been able to get a deinterlaced picture using amcap or with graphedit using any of the built in renderers (The two video renderors, the VMR9, the enhanced video renderer).

    I have all the interlaced flags in the UVC descriptor set correctly afaik, although I've tried many other combinations on these settings to no avail:

     

    ===>Video Streaming Uncompressed Format Type Descriptor<===

    bLength:                           0x1B

    bDescriptorType:                   0x24

    bDescriptorSubtype:                0x04

    bFormatIndex:                      0x01

    bNumFrameDescriptors:              0x01

    guidFormat:                        {32595559-0000-0010-8000-00AA00389B71} = YUY2 Format

    bBitsPerPixel:                     0x10

    bDefaultFrameIndex:                0x01

    bAspectRatioX:                     0x04

    bAspectRatioY:                     0x03  -> Aspect Ratio is set for a 4:3 display

    bmInterlaceFlags:                  0x67

         D0    = 0x01 Interlaced stream or variable: Yes

         D1    = 0x01 Fields per frame: 1 field

         D2    = 0x01 Field 1 first: Yes

         D3    = 0x00 Reserved

         D4..5 = 0x02 Field patterns  -> Regular Pattern of fields 1 and 2

         D6..7 = 0x01 Display Mode  -> Weave only

     

    Under linux it doens't deinterlace automatically either, but using mplayer with the weave deinterlacer manually enabled the picture is displayed correctly.

    Does anyone know if it's possible to automatically enable a deinterlacer on a UVC device in windows?

     

    Thanks,

    Andrew

    • Changed type The March Hare Tuesday, September 28, 2010 4:12 PM see new thread
    Thursday, September 2, 2010 11:52 PM

All replies

  • AndrewLeech wrote:
    >
    >I'm in the late stages of developing a UVC camera which uses and
    >interlaced PAL resolution sensor (768 x 756 @ 25fps).
    >...
    >I'm streaming the video as one field per frame, so I get a half height
    >picture at twice the frame rate
     
    Why would you do that? Your video stream has 2 fields per frame. That's
    what you need to report.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, DDK MVP
    Friday, September 3, 2010 5:44 AM
  • Hi Tim,

    I was under the impression that as each frame that comes through to the computer is only one of the two fields, that I'd picked the right setting. I read two fields per frame as meaning that both fields are transmitted in each frame that's sent to the computer. Either way, changing it to two fields per frame doesn't help.

    I've got the 3rd party version of amcap as well now that has extra features added, so I can explicitly select VMR9 as the renderer which gives a deinterlacing option in the menus, but it's grey'd out, so there's something else between my hardware and the uvc driver that's not passing any interlaced flags through.

     

    Thanks,

    Andrew

    Sunday, September 5, 2010 11:20 PM
  • See follow up in this thread:

     

    http://social.msdn.microsoft.com/Forums/en-US/windowsdirectshowdevelopment/thread/cae891ac-9d23-4f40-9c96-efbc7ffbd832


    Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    My dshow site is http://tmhare.mvps.org.
    Tuesday, September 21, 2010 3:28 PM