Background Handling
The background handling feature can remove, replace and balance the background of a portrait.
Parameters
Parameter | Type | Default | Description |
---|---|---|---|
ReplacePath | String | - | Path to replacement background image |
backgroundR | 0-255 | 255 | Red component for background color replacement |
backgroundG | 0-255 | 255 | Green component for background color replacement |
backgroundB | 0-255 | 255 | Blue component for background color replacement |
balanceH | -1.0 to 1.0 | 0.0 | Hue balance adjustment for background |
balanceS | -1.0 to 1.0 | 0.0 | Saturation balance adjustment for background |
balanceV | -1.0 to 1.0 | 0.0 | Value balance adjustment for background |
Usage Examples
Replace with image file:
ReplacePath="/path/to/background.jpg"
Set solid color background:
backgroundR=128
backgroundG=192
backgroundB=255
Adjust background color balance:
balanceH=0.1 # Slight hue shift
balanceS=-0.2 # Reduce saturation
balanceV=0.05 # Increase brightness
Notes
- When
ReplacePath
is specified, the RGB color values are ignored - Balance adjustments are applied after background replacement or color setting
- HSV balance values range from -1.0 (maximum decrease) to 1.0 (maximum increase)
- Default RGB values (255, 255, 255) create a white background when no replacement path is provided