diff --git a/rtengine/histmatching.cc b/rtengine/histmatching.cc index e496f6f82..e326a3f7d 100644 --- a/rtengine/histmatching.cc +++ b/rtengine/histmatching.cc @@ -189,7 +189,7 @@ void RawImageSource::getAutoMatchedToneCurve(std::vector &outCurve) int fw, fh; getFullSize(fw, fh, TR_NONE); - int skip = 10; + int skip = 3; if (settings->verbose) { std::cout << "histogram matching: full raw image size is " << fw << "x" << fh << std::endl; @@ -213,6 +213,7 @@ void RawImageSource::getAutoMatchedToneCurve(std::vector &outCurve) histMatchingCache = outCurve; return; } + skip = LIM(5, skip * fh / h, 10); // adjust the skip factor -- the larger the thumbnail, the less we should skip to get a good match source.reset(thumb->quickProcessImage(neutral, fh / skip, TI_Nearest)); if (settings->verbose) {