微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

C# AForge Logitech C920 Liveview 滞后

如何解决C# AForge Logitech C920 Liveview 滞后

从昨天开始,我就致力于在 C# 中集成网络摄像头。一般来说,我没有问题。我的罗技 C270 (720p) 也输出平滑的图像。然而,今天我不幸地发现 C920 (1080p) 的实时取景非常滞后。我使用 AForge 的 NuGet 包。

附上我使用的代码

private AForge.Video.DirectShow.VideoCaptureDevice videoSource;
videoSource = new AForge.Video.DirectShow.VideoCaptureDevice(this.videosources[this.dropdown_videosources.Selectedindex].MonikerString);
string highestSolution = "1920;1080";
videoSource.VideoResolution = videoSource.VideoCapabilities[System.Convert.ToInt32(highestSolution.Split(';')[1])];
videoSource.NewFrame += new AForge.Video.NewFrameEventHandler(videoSource_NewFrame);
videoSource.Start();

void videoSource_NewFrame(object sender,AForge.Video.NewFrameEventArgs eventArgs) {
    this.picBox_webcam.BackgroundImage = (Bitmap)eventArgs.Frame.Clone();
}

我的部分代码可能会丢失,因为它分布在多个类/文件中。但是,关键部分应该在那里。 我按照以下说明操作:https://code-bude.net/2011/06/02/webcam-benutzen-in-csharp/

正如我所说,实时图像是可见的,到目前为止一切正常。但不幸的是,C920 的图像以一种无法使用的方式撒谎。

我很感激任何建议。

来自德国的问候

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。