DirectShow library. How to capture an image using the directshow library without showing live webcam images in a PictureBox or panel.

I use a WPF application that uses the DirectShow library and works great for capturing images or recording in real time, but I want the end user to not be able to see that any webcam is taking its photo, i.e. I want an image block or a panel that transmits an image from a webcam, should not be visible to the user, and I should be able to capture images or record a live channel.

Please provide me with any link or suggestion as I am new to DirectShow library.

thanks

+2
source share
1 answer

DirectShow does not need a visual component to capture snapshots or videos. This is just one of the popular ways to display live video and take pictures from a video presenter.

Read about using Sample Grabber to capture frames, and the DxSnap sample from DirectShow.NET shows you how.

Use DirectShow to create snapshots from the pins of the Still device. Note that MS recommends you use WIA for this, but if you want to do with DirectShow and C #, here's how.

Note that this example will only work with devices that output uncompressed video as RBG24. This will include most webcams, but probably with a null TV tuner.

See also: Best DirectShow way to capture image from webcam preview? SampleGrabber is deprecated

+2
source

All Articles