0

AForge を使用して c# で解像度 640x480 の Logitech Web カメラで画像をキャプチャします。同じカメラを使用して Logitech のプログラムで撮影した画像と比較して、画質の低い画像が得られます。画像には粒子とノイズが含まれており、300kb ではなく約 80kb です。

元の品質で画像をキャプチャする方法はありますか?

前もって感謝します。

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;
}
4

0 に答える 0