Files
opencv-MIRROR/modules
Pratham Kumar 8f0e25a89d Merge pull request #31129 from pratham-mcw/decolor-opt
Replace the std::pow calls with repeated multiplication (decolorPow), which for exponents 0/1/2 is the exact same arithmetic, not an approximation.
Take row pointers (Mat::ptr) instead of Mat::at in both polynomial loops.
Transpose dest/dest1 once in gradvector and read them row-major instead of walking columns.
Thread the full-resolution pass in grayImContruct with parallel_for_ over image rows, the polynomial terms are gathered once up front and each row accumulates independently, so the result is scheduler-independent. Below the element-count cutoff it runs as a single invocation.
Added a perf test (modules/photo/perf/perf_decolor.cpp).
2026-11-30 22:29:13 +05:30
..