How to mirror UVC webcam feed in Windows 7?
I'm developing an application in .NET using DirectShow.NET. It captures and previews a stream simultaneously. The webcam is a Logitech Webcam 9000, but I'm restricted to using the standard UVC driver for it on Windows 7.
I want to mirror the stream, something that is normally quite easy to set when you have the advantage of native Logitech drivers and software, but I don't. I've attempted to add a DirectShow DMO filter that mirrors the image. This works ok on the preview screen but does give it some slow down. When I apply this to the capture stream, my preview stream slows to an unusable frame rate of about 1 frame every 5 seconds.
So I'm hoping there is a way to mirror the video feed at a much lower level at the feed itself, perhaps a setting in Windows, a bit of hacking or even a third party tool. Is there any way to do this with a UVC Camera on Windows 7?
I managed to solve my problem but not through any driver level option for UVC cameras.
I applied a NormalizedRect
to the IVMRMixerControl9
using DirectShow.NET which flipped the left and right coordinates. The performance doesn't appear to be anywhere near as detrimental as using a DMO to achieve the same effect.
NormalizedRect rect = new NormalizedRect();
rect.left = 1;
rect.right = 0;
rect.top = 0;
rect.bottom = 1;
mixer.SetOutputRect(0, ref rect);
精彩评论