mirror of
https://github.com/opencv/opencv.git
synced 2026-11-16 14:27:47 -06:00
* imgproc: do not read pixels outside a sub-matrix in CLAHE padding When the size is not a multiple of the tile grid, CLAHE pads the source on the right and bottom with BORDER_REFLECT_101. This padding is internal (CLAHE has no borderType). Without BORDER_ISOLATED, copyMakeBorder takes those rows and columns from the parent matrix when the source is a region of a larger image, so the histograms of the last tiles and the result depended on pixels outside the region. Same pattern as the phaseCorrelate fix in #30725. * imgproc: extend CLAHE_Padding to cover interior ROIs Move the ROI regression into CLAHE_Padding: the ROI now has parent pixels to its right and bottom, and the reference padding is isolated.