Local USB webcams
All the changes explained in this post are for Windows platform. They are not available in Lazarus for Linux.
Changing properties: dialog
We added a new component: TRVWebCamDialog
to its Camera
property, select a web camera in this TRVCamera component, and call Execute
to display a dialog.
- webcam-dialog-vpa.png (8.56 KiB) Viewed 45778 times
As you can see, this dialog has two pages. The first page allows changing video processing amplifier properties:
- color enable (yes/no)
- white balance
- backlight compensation
The second page allows changing camera control properties:
- pan, tilt, roll
- aperture (iris)
For some properties, you can choose between automatic and manual mode.
Of course, the camera must support changing these properties, otherwise the dialog displays it disabled.
You can change UI language of this dialog by assigning Language
Changing properties: assigning values
.Brightness, Contrast, Saturation, Sharpness, Hue
properties now work for local USB webcams too (if the camera supports this property).
Other webcam properties can be accessed in code as well, let me know if you want to know how.
If the camera supports movement (pan and tilt), you can control its movement:
Since this version, TRVCamera decodes video frames of local cameras itself, not relying on a system conversion to RGB format, as it was before.
As a result, more video modes are supported.
As a second result, now we know exactly which video modes can be decoded, so unsupported video modes are not included to a list of video modes