wpf DirectShow 库-如何使用 DirectShow 库捕获图像而不在 PictureBox 或 Panel 上显示网络摄像头实时图像

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13295667/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-13 06:07:47  来源:igfitidea点击:

DirectShow Library-How to capture image using directshow library without showing the webcam live images on the PictureBox or Panel

c#wpfwinformsdirectshowdirectshow.net

提问by user1301587

I am using WPF application which is using DirectShow library and it is working fine for grabbing images or recording the live feed,but i wants that end user should not be able to see that any web cam is taking their picture i.e. i wants picture box or panel which is rendering the feed from the webcam should not be visible to the user and i should be able to capture the images or record the live feed.

我正在使用使用 DirectShow 库的 WPF 应用程序,它可以很好地抓取图像或录制实时供稿,但我希望最终用户不应该看到任何网络摄像头正在拍摄他们的照片,即我想要图片框或用户应该看不到正在渲染来自网络摄像头的提要的面板,我应该能够捕获图像或记录实时提要。

Please provide me any link or suggestion as i am beginner for the DirectShow library.

请为我提供任何链接或建议,因为我是 DirectShow 库的初学者。

Thanks

谢谢

采纳答案by Roman R.

DirectShow does not need any visual component to grab snapshots or video. It is just one of the popular methods to display video live and grabs snapshots off the video presenter.

DirectShow 不需要任何视觉组件来抓取快照或视频。它只是实时显示视频和从视频演示者那里抓取快照的流行方法之一。

Read on using Sample Grabber to capture frames, and DxSnapsample from DirectShow.NET shows you how.

继续阅读使用 Sample Grabber 捕获帧,DxSnap来自 DirectShow.NET 的示例向您展示了如何。

Use DirectShow to take snapshots from the Still pin of a capture device. Note the MS encourages you to use WIA for this, but if you want to do in with DirectShow and C#, here's how.

Note that this sample will only work with devices that output uncompressed video as RBG24. This will include most webcams, but probably zero tv tuners.

使用 DirectShow 从捕获设备的 Still 引脚拍摄快照。请注意,MS 鼓励您为此使用 WIA,但如果您想使用 DirectShow 和 C#,方法如下。

请注意,此示例仅适用于将未压缩视频输出为 RBG24 的设备。这将包括大多数网络摄像头,但可能包括零电视调谐器。

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

另请参阅:从网络摄像头预览捕获图像的最佳 DirectShow 方式?SampleGrabber 已弃用