Boundary Padding Strategy for Asymmetric Gaussian Blur on Non‑Square Images
0 reputation · 04 Feb 2022, 13:09 UTC
Goal
Investigate how OpenCV’s GaussianBlur handles boundary padding when an asymmetric kernel (e.g., 5×7) is applied to a non‑square image.
Context
The GaussianBlur function supports various depths (CV_8U, CV_16U, CV_16S, CV_32F, CV_64F) and automatically calculates kernel size when zero is specified. While the implementation uses separable filters for efficiency, the exact padding strategy for asymmetric kernels on rectangular images remains undocumented.
Questions
- What padding strategy does OpenCV use internally when the kernel is asymmetric and the image is non‑square?
- Does the default border type (e.g., BORDER_DEFAULT) apply uniformly to all sides, or is it adapted per dimension?
- Can the padding behavior be overridden or queried programmatically, and if so, what API calls expose this?