Recent

Author Topic: read and set webcam device settings  (Read 697 times)

Rik

  • Jr. Member
  • **
  • Posts: 67
read and set webcam device settings
« on: November 29, 2022, 02:10:17 pm »
Is there a way to read and set the webcam device settings (brightness, contrast, hue, saturation, ...)?
I am using VFW to access the webcam in Lazarus.
With the capDlgVideoSource function I can access and change the device setting, but there seems to be no way (or at least I didn't find it) to save and restore these setting in VFW.

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: read and set webcam device settings
« Reply #1 on: November 29, 2022, 02:25:16 pm »
I did not know VFW is still supported? Compliments to Ms!
I have some very complex code that handles such things in a more modern way on Windows...
Are you prepared to dive in the deep? The example is much larger than appropriate on this forum. Even as attachment, because of video content must be included.
Specialize a type, not a var.

Rik

  • Jr. Member
  • **
  • Posts: 67
Re: read and set webcam device settings
« Reply #2 on: November 29, 2022, 03:02:35 pm »
I have been using VFW for the past 10 years, so far no problems encountered.
But maybe it is time to move forward ...

All I need to do is:
- being able to open the webcam device and adjust the settings
- take a "snapshot" from the webcam every so many milliseconds and save it as a bmp file
- save the webcam device settings when closing the app and restore them the next time the app is opened

I am very interested to have a look at your example.

 

TinyPortal © 2005-2018