Files
opencv-MIRROR/modules/photo/test
Kari Pikkarainen 3d0d984fb4 photo: weight the CalibrateDebevec gauge equation like the data equations
The Debevec response curve g is defined only up to an additive constant,
which CalibrateDebevec fixes with one equation g(128) = 0 of weight 1
(as in Debevec and Malik's gsolve.m), while the data and smoothness
equations are weighted by the hat function (up to 127) and lambda times
it (up to 1270). The offset is therefore weakly constrained in the
float32 least-squares solve, and rounding differences between builds
shift the whole curve: depending on the build, response(128) is between
0.86 and 1.07 instead of 1. This is most likely the cause of the
intermittent Photo_CalibrateDebevec.regression failure on Windows x64
(0.2147 > 0.15, see #30063).

Weight the gauge equation with the hat weight of the middle value. The
exact least-squares solution is unchanged; the float32 result now
matches a float64 solve to 3e-4.

Add a test that the middle value is fixed and drop the ARM-only and
non-IPP relaxed thresholds of the regression test.

Photo_CalibrateDebevec.bug_24966 now prints max_diff 1.31 and 1.15 on
every build: the values of an exact float64 solve. The earlier,
build-dependent values (0.98 to 1.25) included the offset noise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 08:42:45 +05:30
..
2018-02-03 19:39:47 +00:00
2026-07-29 14:47:06 +05:30