我使用AForge通过罗技网络摄像头捕获图像,分辨率为640x480。相对于Logitech程序使用相同相机拍摄的图像,我得到的图像质量较低。图像有颗粒和噪音,大约80kb而不是300kb。
有没有办法拍摄原始质量的图像?
提前致谢。
videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);
videoSource = new VideoCaptureDevice(videoDevices[0].MonikerString);
videoSource.NewFrame += new NewFrameEventHandler(video_NewFrame);
videoSource.VideoResolution = videoSource.VideoCapabilities[0];
videoSource.Start();
private void video_NewFrame(object sender, NewFrameEventArgs eventArgs)
{
img = (Bitmap)eventArgs.Frame.Clone();
CurrentImagePBX.Image = img;
}
private void WebCamFunction(object source, ElapsedEventArgs e) // on timer
{
Bitmap CurrentImage = (Bitmap)img.Clone();
string filename = DateTime.Now.ToString("dd_MM_yyyy_HH_mm_ss") + ".jpg";
CurrentImage.Save(filename, System.Drawing.Imaging.ImageFormat.Jpeg);
SavedImagePBX.Image = CurrentImage;
}