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.
Assign
TRVCamera 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 53874 times
As you can see, this dialog has two pages. The first page allows changing video processing amplifier properties:
- brightness
- contrast
- hue
- saturation
- sharpness
- gamma
- color enable (yes/no)
- white balance
- backlight compensation
- gain
The second page allows changing camera control properties:
- pan, tilt, roll
- zoom
- exposure
- aperture (iris)
- focus
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 property.
Changing properties: assigning values
TRVCamera.
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.
Movement
If the camera supports movement (pan and tilt), you can control its movement:
Video modes
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.