Files
opencv-MIRROR/modules/imgproc
Mohammad Sohail Shaikh 0dd4bf367e imgproc: do not read pixels outside a sub-matrix in CLAHE padding (#30782)
* 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.
2026-11-13 20:23:23 +05:30
..
2025-03-19 21:38:08 +05:30