White Balance Gain Calculator

Actual neutral patch inverse LINEARRGB channel gains relative independent reference, same exposure/black level corrected. Not gammaRGB, color-temperature estimation or sensor-colorimetry/white balance pipeline.

Description

Neutral-patch white-balance gains operate on linear channel values under a consistent exposure and black-level convention.

Neutral-patch white-balance gains operate on linear channel values under a consistent exposure and black-level convention.1

This tool calculates inverse RGB gains relative to a caller-chosen reference without implementing a full color pipeline.

When to use White Balance Gain Calculator

Use this tool to calculate inverse RGB gains relative to a caller-chosen reference without implementing a full color pipeline.

How to use White Balance Gain Calculator and how it works

  1. Prepare actualNeutralPatchLinearRgb, callerChosenNeutralReferenceValue, with the units, conventions and assumptions below.
  2. Enter the required fields and run White Balance Gain Calculator.
  3. Read result.conditionalRgbMultiplicativeGains using the output definitions below.
  4. Correct any rejected inputs and rerun; interpret the result within the stated model and its assumptions.
Input fieldMeaningValue typeRequirement
actualNeutralPatchLinearRgbExactly [R,G,B] positive linear signal measurements of the neutral patch.array of numberRequired; other constraints below
callerChosenNeutralReferenceValueCaller Chosen Neutral Reference Value. Use the units and matching context stated in the calculation below.numberRequired; strictly positive; finite; other constraints below

Require exactly three positive channel measurements in RGB order and a positive target/reference level in matching signal units. Divide the target by each channel and return gains in the same RGB order. This balances the supplied sample but does not perform illuminant estimation, clipping control or image processing.

gains=[reference/R,reference/G,reference/B]

Apply the input ordering, units and branch conditions stated above.

Output fieldMeaningValue type
resultObject containing the calculated or selected fields below.object
result.conditionalRgbMultiplicativeGainsThree dimensionless gains in the input RGB order.array of number
json
{
  "input": {
    "actualNeutralPatchLinearRgb": [
      1,
      2,
      4
    ],
    "callerChosenNeutralReferenceValue": 2
  },
  "output": {
    "result": {
      "conditionalRgbMultiplicativeGains": [
        2,
        1,
        0.5
      ]
    }
  }
}

Limitations and assumptions

The calculation uses the supplied observations and model inputs. It does not collect measurements, select a reference population or coefficient, or establish that the model applies to the actual case. The stated branch conditions and output units remain part of the result.

All fields require explicit values. Unexpected fields, wrong types, nonfinite numbers and sparse arrays are rejected. Alignment, bounds and supported-token rules are explained above; extremely large inputs or nonfinite results can also fail. Input errors differ from successful false comparisons, unavailable-domain flags and empty match lists.

Alternative or Complementary methods

Use CRI Calculation for a complementary operation: General CRI Ra averages the first eight test-color indices after independently completed color adaptation.

Use Color Correction Filter Factor Calculator for a complementary operation: A measured filter factor compares reference and filtered signals under matched illumination and channel conditions.

References

  1. White Balance Gain Calculator — tool.io

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies