lrgb_combine
Merges a grayscale luminance view into an RGB image to sharpen detail while preserving its original colors, with optional linear fit for consistency.
Instructions
Replace the lightness of an RGB view with a grayscale L view using LRGBCombination, in place on the RGB view. Only the L channel is enabled, so the RGB view keeps its own color channels. lightness and saturation are LRGBCombination's transfer-function midtones balances mL and mc (0.5 leaves that component unchanged). When linear_fit_reject_high is given, the call also runs LinearFit on the L view (modified in place, ahead of the combination) against a temporary luminance image 0.2126 R + 0.7152 G + 0.0722 B of the RGB view; when it is omitted, no LinearFit runs. Chrominance noise reduction and highlight clipping are left at PixInsight's defaults.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| l_id | Yes | Grayscale luminance view ID with the same dimensions as rgb_id | |
| rgb_id | Yes | RGB color view ID (modified in place) | |
| lightness | Yes | Midtones balance of the lightness transfer function (LRGBCombination mL), 0 to 1 | |
| saturation | Yes | Midtones balance of the saturation transfer function (LRGBCombination mc), 0 to 1 | |
| linear_fit_reject_high | No | LinearFit rejectHigh for the fit of L to the RGB luminance; omitted = no LinearFit |