C# grab stills from webcam without preview

2013-06-13
2013-06-26
  • Tom Bradshaw

    Tom Bradshaw - 2013-06-13

    Hi,
    I am trying to record stills from a video source (webcam) without a preview window, eventually the app should be a windows service.
    I have been searching the web but not having much luck, I am looking at the dx snap example. Think I should be doing something with SampleGrabber but I am stuck, does anybody have an example?

    Thanks
    Tom

     
  • snarfle

    snarfle - 2013-06-14

    Have you looked at the DxWebCam sample? It's a bit lame, but it might get you started.

     
  • Tom Bradshaw

    Tom Bradshaw - 2013-06-25

    Hi,
    Thanks! that got me quite a long way, still working out setting resolutions and frame rates.
    Main issue I have now is the stills are interlaced, I only need 1 field.
    I have removed the field myself by copying alternate rows from the raw data. is it possible to do this another way? I have seen VIDEOINFOHEADER2 but can't get that to work.
    Thanks
    Tom

     
  • snarfle

    snarfle - 2013-06-26

    The place to start (probably for all of this) is by finding out what formats the device is able to output. Check out IAMStreamConfig.

    You can use the dumpvcap program at http://www.LimeGreenSocks.com/dshow/. It creates a file named capinfo.txt that gives a view of what your attached video devices support. Viewing the file with a spreadsheet program tends to show the tab-delimited data better than using notepad. There is a pre-built version included as well as the source.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks