Experimenting with camera colour calibration methods, including RPCC (root polynomial colour transform)
- Main code for camera fitting is in camera_fitting/src/bin/camera_fitting.rs
- Spectral data from my SpectralMeasurements camera spectral response measurement repo
- Non linear least squares optimiser taken from my Panorama repo
Example command to run fitting:
cargo run --release --bin camera_fitting "colour/spectral_data/old_camera_measurements_by_me/Canon/EOS 5D Mark III/001/response.dat"
- Improve hue correctness over poor 3x3 matrix profiles
- Fix negative luminance/extreme values
- Find out if non-linear camera colour correction methods can be smooth (promising)
Using the run_on_image binary, I generated the following outputs using this image - 5D3_9253.CR2.
The difference is not immediately apparent in the processed image due to AgX processing which handles strong colours effecively, but if you look closely you will see much smoother colour transitions on the RPCC image, particularly where shadows and colours intersect. The difference is most clear in the Luminance channel of course!
| profile type | Processed image (AgX) | Luminance channel (Y) |
|---|---|---|
| 3x3 Matrix | ![]() |
![]() |
| RPCC4 | ![]() |
![]() |
More examples soon...



