Colour negatives come out with a cast, cut highlights and no contrast: a better conversion, with more settings by hand #54

Closed
opened 2026-11-22 14:13:06 +01:00 by eliott · 0 comments
Owner

What you'd like to do

Convert a colour negative in the app and get a positive that is ready to use: grey stays grey from the shadows to the highlights, the clouds keep their detail, and the picture has contrast. More settings to set by hand are fine if that's what it takes.

Why

A colour negative comes out with a strong cast in the mid-tones, flat and dark. Black and white is fine; colour is not usable without another program.

A colour negative converted in the app: blue all over, flat cyan clouds

roll_01, a 120 colour negative shot with a Fujifilm X-T5, converted in the app with the base on the gap at the right and the frame drawn.

What was measured on that frame (the RAW shrunk 4 times, through the same steps as src/negative.rs; rollscan convert gives the same levels: black 0.183 / 0.218 / 0.238, white 0.881 / 1.000 / 1.000):

  1. Each dye layer has its own contrast, and nothing evens them out. Against green, red's density range over the frame is 0.81 times green's and blue's 1.33 times (straight-line fit of each channel's density on green's, correlation 0.996 and above). The levels set the two ends of each channel, so black and white come out neutral, but in between blue rises faster than green and red slower: the positive's mean light is B/G 1.86, R/G 0.65. That's the blue cast. docs/negative-conversion.md lists it under "Not done", and the tests' colour wedge (GAMMA = [0.55, 0.65, 0.75]) is only checked for its levels, never for grey mid-tones.
  2. Highlights are cut before the levels see them. encode() holds lin at 1, and lin is scaled by a fixed GAIN measured on one roll. This scan's base reads 0.28 of the sensor's ceiling in green and 0.13 in blue, so the densest parts of the negative go past 1: 6.1 % of the frame in blue and 1.8 % in green are cut flat. The white point of both channels then sits on the cut (1.000), and the clouds go flat cyan-white. The app warns and says to shoot with more exposure, which would help, but the RAW still holds those tones.
  3. No tone curve. After the levels, the only curve is w ^ 1.8, then sRGB. The picture stays dark and flat (picture 3 below). There is no exposure, contrast or curve control, and brightness is a power on the levelled value.
  4. The sensor's colours are written as sRGB. Measured on 3 colour frames (CineStill 800T, X-T5) against their reference conversions: 8.0 to 11.1 / 255 rms with no colour step, 6.8 to 8.2 / 255 with a camera colour profile; colours 26 and 29 % less saturated on two of the three. A plain matrix taken from the RAW file was not better on every frame (8.2 to 12.1 / 255).

A quick prototype on the same frame, outside the repository (same base, frame and levels):

The same frame three times: today, without the cut, and with each channel's contrast evened out

  • 2: lin no longer held at 1 before the levels. The cast swings to yellow: B/G 0.69, R/G 1.10.
  • 3: as 2, with each channel's density scaled to green's contrast (the slopes above) before the inversion: B/G 0.90, R/G 0.94. White clouds, green trees, grey water. Still dark and flat: point 3.

How it compares with the reference conversion

The present conversion was built to match a reference conversion, measured mostly on black-and-white frames (docs/development/2026-11-18-negative-conversion-design.md). Step by step:

Step Reference Rollscan today
Base White balance picked on the base Same
Inversion 0.01 * (1/n - 1/n_sat) in floating point, nothing held at 1 The same times 1.04, held at 1 before the levels
Exposure A control: a gain on the positive, before the curve None
Tone curve The camera's film-like curve, on the square-root encoding None, w ^ 1.8 only
Auto levels Per channel, 0.1 % / 0.01 % of the picture, onto 5 / 255 and 250 / 255 Per channel, 0.5 % / 0.001 %, onto 0.02 / 0.98
Colour balance A power per channel, set by picking a colour Warmth and tint, powers, sliders only
After that Saturation, contrast, brightness, levels, curves (master and per channel), output levels Saturation, brightness
Colour Camera colour profile, last None

The reference doesn't even out the layers' contrast either: it leaves that to its colour balance and per-channel curves, by hand. Matching it would fix points 2 to 4, not point 1. So this asks for more than the reference does.

What to build

In this order; each step is worth having on its own.

  1. Nothing cut before the levels. lin no longer held at 1 (or scaled from the base instead of a fixed GAIN), so the scan's exposure doesn't decide what is lost, and the levels measured on that. Warn when the base reads far below the sensor's ceiling: a brighter scan has less noise in the dense parts.
  2. Each channel's contrast evened out. Measured on the frame (red's and blue's density against green's, as above), shared by the roll like the base, and shown in the panel. Settable by hand too: a contrast for red and for blue, relative to green, and a picker: click one or more things that were grey, and the contrasts are solved from them.
  3. Exposure and a tone curve. An exposure control on the positive, before the curve, then a film-like curve with a contrast control (soft, standard and hard as starting points), on the square-root encoding.
  4. Colour by tone. The colour of the shadows and of the highlights set separately, by hand (each channel's black and white point moved on its own), and the mid-tones by a grey picker as well as warmth and tint. The reference has no such control in its negative mode.
  5. Curves, master and per channel.
  6. The camera's colours. A colour step from the sensor's colours, measured on a colour target shot on the scanner, kept only if it gets closer to the reference on the colour frames. Off until then.

1 to 3 are shared by the roll, like the base; 4 and 5 are per frame, like today's adjustments.

How to check it

  • Tests: the colour wedge (GAMMA = [0.55, 0.65, 0.75]) comes out grey at every step, not only at its ends; the same negative shot 2 stops darker gives the same positive.
  • On roll_01: mean B/G and R/G between 0.9 and 1.1 with the measured contrasts, no channel cut at 1, detail in the clouds.
  • On the colour frames that have a reference conversion: rms against it below today's 8 to 11 / 255.

Setup

Fujifilm X-T5. 120 and 35 mm colour negatives: roll_01 is 120, the reference frames are CineStill 800T in 35 mm.

## What you'd like to do Convert a colour negative in the app and get a positive that is ready to use: grey stays grey from the shadows to the highlights, the clouds keep their detail, and the picture has contrast. More settings to set by hand are fine if that's what it takes. ## Why A colour negative comes out with a strong cast in the mid-tones, flat and dark. Black and white is fine; colour is not usable without another program. ![A colour negative converted in the app: blue all over, flat cyan clouds](https://forgejo.eliottbidault.fr/attachments/1ad2fe91-abd8-42c9-b7db-1ffe6bdbb9f6) *roll_01, a 120 colour negative shot with a Fujifilm X-T5, converted in the app with the base on the gap at the right and the frame drawn.* What was measured on that frame (the RAW shrunk 4 times, through the same steps as `src/negative.rs`; `rollscan convert` gives the same levels: black 0.183 / 0.218 / 0.238, white 0.881 / 1.000 / 1.000): 1. **Each dye layer has its own contrast, and nothing evens them out.** Against green, red's density range over the frame is 0.81 times green's and blue's 1.33 times (straight-line fit of each channel's density on green's, correlation 0.996 and above). The levels set the two ends of each channel, so black and white come out neutral, but in between blue rises faster than green and red slower: the positive's mean light is B/G 1.86, R/G 0.65. That's the blue cast. `docs/negative-conversion.md` lists it under "Not done", and the tests' colour wedge (`GAMMA = [0.55, 0.65, 0.75]`) is only checked for its levels, never for grey mid-tones. 2. **Highlights are cut before the levels see them.** `encode()` holds `lin` at 1, and `lin` is scaled by a fixed `GAIN` measured on one roll. This scan's base reads 0.28 of the sensor's ceiling in green and 0.13 in blue, so the densest parts of the negative go past 1: 6.1 % of the frame in blue and 1.8 % in green are cut flat. The white point of both channels then sits on the cut (1.000), and the clouds go flat cyan-white. The app warns and says to shoot with more exposure, which would help, but the RAW still holds those tones. 3. **No tone curve.** After the levels, the only curve is `w ^ 1.8`, then sRGB. The picture stays dark and flat (picture 3 below). There is no exposure, contrast or curve control, and brightness is a power on the levelled value. 4. **The sensor's colours are written as sRGB.** Measured on 3 colour frames (CineStill 800T, X-T5) against their reference conversions: 8.0 to 11.1 / 255 rms with no colour step, 6.8 to 8.2 / 255 with a camera colour profile; colours 26 and 29 % less saturated on two of the three. A plain matrix taken from the RAW file was not better on every frame (8.2 to 12.1 / 255). A quick prototype on the same frame, outside the repository (same base, frame and levels): ![The same frame three times: today, without the cut, and with each channel's contrast evened out](https://forgejo.eliottbidault.fr/attachments/c81e2298-e5d7-474a-985a-9b79019d5639) - 2: `lin` no longer held at 1 before the levels. The cast swings to yellow: B/G 0.69, R/G 1.10. - 3: as 2, with each channel's density scaled to green's contrast (the slopes above) before the inversion: B/G 0.90, R/G 0.94. White clouds, green trees, grey water. Still dark and flat: point 3. ## How it compares with the reference conversion The present conversion was built to match a reference conversion, measured mostly on black-and-white frames (`docs/development/2026-11-18-negative-conversion-design.md`). Step by step: | Step | Reference | Rollscan today | |---|---|---| | Base | White balance picked on the base | Same | | Inversion | `0.01 * (1/n - 1/n_sat)` in floating point, nothing held at 1 | The same times 1.04, held at 1 before the levels | | Exposure | A control: a gain on the positive, before the curve | None | | Tone curve | The camera's film-like curve, on the square-root encoding | None, `w ^ 1.8` only | | Auto levels | Per channel, 0.1 % / 0.01 % of the picture, onto 5 / 255 and 250 / 255 | Per channel, 0.5 % / 0.001 %, onto 0.02 / 0.98 | | Colour balance | A power per channel, set by picking a colour | Warmth and tint, powers, sliders only | | After that | Saturation, contrast, brightness, levels, curves (master and per channel), output levels | Saturation, brightness | | Colour | Camera colour profile, last | None | The reference doesn't even out the layers' contrast either: it leaves that to its colour balance and per-channel curves, by hand. Matching it would fix points 2 to 4, not point 1. So this asks for more than the reference does. ## What to build In this order; each step is worth having on its own. 1. **Nothing cut before the levels.** `lin` no longer held at 1 (or scaled from the base instead of a fixed `GAIN`), so the scan's exposure doesn't decide what is lost, and the levels measured on that. Warn when the base reads far below the sensor's ceiling: a brighter scan has less noise in the dense parts. 2. **Each channel's contrast evened out.** Measured on the frame (red's and blue's density against green's, as above), shared by the roll like the base, and shown in the panel. Settable by hand too: a contrast for red and for blue, relative to green, and a picker: click one or more things that were grey, and the contrasts are solved from them. 3. **Exposure and a tone curve.** An exposure control on the positive, before the curve, then a film-like curve with a contrast control (soft, standard and hard as starting points), on the square-root encoding. 4. **Colour by tone.** The colour of the shadows and of the highlights set separately, by hand (each channel's black and white point moved on its own), and the mid-tones by a grey picker as well as warmth and tint. The reference has no such control in its negative mode. 5. **Curves**, master and per channel. 6. **The camera's colours.** A colour step from the sensor's colours, measured on a colour target shot on the scanner, kept only if it gets closer to the reference on the colour frames. Off until then. 1 to 3 are shared by the roll, like the base; 4 and 5 are per frame, like today's adjustments. ## How to check it - Tests: the colour wedge (`GAMMA = [0.55, 0.65, 0.75]`) comes out grey at every step, not only at its ends; the same negative shot 2 stops darker gives the same positive. - On roll_01: mean B/G and R/G between 0.9 and 1.1 with the measured contrasts, no channel cut at 1, detail in the clouds. - On the colour frames that have a reference conversion: rms against it below today's 8 to 11 / 255. ## Setup Fujifilm X-T5. 120 and 35 mm colour negatives: roll_01 is 120, the reference frames are CineStill 800T in 35 mm.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
RollNote/rollscan#54
No description provided.