mirror of
https://github.com/opencv/opencv.git
synced 2026-11-25 02:38:14 -06:00
docs(imgproc): medianBlur also accepts ksize = 1 - #30662 ## Problem `cv::medianBlur` documents the aperture as > `@param ksize aperture linear size; it must be odd and greater than 1, for example: 3, 5, 7 ...` but the implementation only requires an odd size: the aperture check is `(ksize % 2 == 1) && (_src0.dims() <= 2)`, and `ksize = 1` is accepted and returns the image unchanged (a 1x1 median is the pixel itself). Reproduced with opencv-python-headless 5.0.0: ``` cv2.medianBlur(img, 1) -> OK, output is identical to the input cv2.medianBlur(img, 2) -> error: "(ksize % 2 == 1) && (_src0.dims() <= 2)" in 'medianBlur' ``` ## Change Documentation-only: mention `ksize = 1` so the docs match the implemented behavior. No code change. Signed-off-by: NUAAwqy <162230229@nuaa.edu.cn>