AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

change default win10 camera setting

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

change default win10 camera setting

Postby adee85 » Sun Jul 17, 2016 5:09 am

Hi all,

Currently i developing winform(C#.net) application to scan barcode using camera (the OS of my laptop is win7). Everything is working well until i test my software on tablet which running win 10. the problem when using win10 tablet, the camera setting can not be save.i wanted to change the autofocus to manual value. Because the autofocus is taking too long like about 3 to 10 seconds. i have try to set the camera focus to manual using laptop(win7), and it can be saved but the tablet(win10) cant save. After i disconnect and connect the camera again, the camera change back to original setting(focus,brightness...etc).

Btw, i using aforge framework.

i have try 2 solution as below:
1.
private void CameraPropertiesButton_Click(object sender, EventArgs e) { videoDevice.DisplayPropertyPage(IntPtr.Zero); }
this will prompt the camera setting, win 7 camera setting can be saved permanently but win 10 camera can not.

2.
private void devicesCombo_SelectedIndexChanged(object sender, EventArgs e) { if (videoDevices.Count != 0) { videoDevice = new VideoCaptureDevice(videoDevices[devicesCombo.SelectedIndex].MonikerString);

EnumeratedSupportedFrameSizes(videoDevice);

//show camera properties
//videoDevice.DisplayPropertyPage(IntPtr.Zero);
//SetCameraProperties();
videoDevice.SetCameraProperty(CameraControlProperty.Focus, 400, CameraControlFlags.Manual);
}
}
this solution has no effect at all.

Is there any other solution for win10 camera??? Please help...
adee85
 
Posts: 1
Joined: Sun Jul 17, 2016 5:05 am



Return to AForge.NET Framework