Skip to content

Sharpen tuning - #20

Merged
naushir merged 6 commits into
mainfrom
sharpen
Aug 3, 2026
Merged

naushir merged 6 commits into
mainfrom
sharpen

Conversation

@naushir

@naushir naushir commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

naushir added 6 commits August 3, 2026 09:48
Uniform veiling flare on the calibration scene cannot be represented by a
3x3 matrix, so the fit previously distorted the matrix to accommodate it;
measured at 1-2% of full scale on real lightbox captures, costing up to
0.7 mean delta E on the deployed matrix. The offset is fitted alongside the
six matrix coefficients and then discarded - only the matrix is written.
Configurable via ccm.flare_compensation (default on) in the config file,
server API and Run page; the fitted flare is logged, reported in the
metrics (flare_pct, per-patch de_flare) and warned about above 1.5%.
Adds a 'Flare-corrected dE' stat to the colour-accuracy card, scoring the
matrix with the fitted stray-light offset discounted - the raw mean dE is
scored against the flare-contaminated capture and so reads slightly worse
for flare-aware fits. The de_flare/flare_pct metrics are now emitted only
when flare compensation actually ran, so the stat hides for runs without it.
Add a Sharpen tab that sweeps rpi.sharpen threshold candidates over
temporary tunings and measures grey-patch noise amplification on the
Macbeth chart against a sharpening-disabled baseline. The smallest
threshold within tolerance is recommended and can be applied to the
project's generated tuning. Results persist in <project>/sharpen/,
which calibration runs never scan.
Add a strength and limit sweep measuring slanted edges in the processed
output: acutance gain (the CSF-weighted MTF area, which follows
sharpening where optics-pinned MTF50 cannot), MTF peak, and edge halos
as growth over the baseline's own profile, with edge geometry locked
across sweep points. Strength is recommended as the greatest acutance
gain within perceptually calibrated halo (5%) and MTF-peak (1.5) caps;
the limit is then swept at that strength on high-contrast edges,
recommending the largest within the cap and abstaining when the limit
never engages. Also adds a perceptual noise-tolerance default and a
warning when the threshold gates away the detail the sharpener needs.
…ed reference limit

Scored on edge acutance alone, the strength recommendation can collapse
to a weak value that draws crisp edges but soft newsprint and fabric,
so the sweep now auto-selects faint-texture tiles from the baseline,
reports a texture gain per point, and requires candidates to stay
within 5% of the best in-cap point's texture gain. Strength points are
also written with an explicit reference limit of 1.0 rather than
inheriting the base tuning's, so the file's starting state can no
longer steer the recommendation towards its own corner.
The tab's card intros and field hints had grown into full method
descriptions; trim them to what is needed at the point of use and point
at the docs. The ctt-server documentation gains a settings table per
sweep explaining each parameter's default and rationale, plus a note on
the fixed reference limit and texture floor.
@naushir
naushir merged commit ff1f793 into main Aug 3, 2026
2 checks passed
@naushir
naushir deleted the sharpen branch August 3, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant