I capture images by a Logitech web camera with the resolution 640x480 in c# using AForge. I get images with low quality relative to the images taken by the Logitech's program with the same camera. The images are with grains and noise and are about 80kb instead of 300kb.
Is there any way to capture images with original quality?
Thanks in advance.
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;
}