opencv / opencv

Open Source Computer Vision Library
https://opencv.org
Apache License 2.0
75.95k stars 55.62k forks source link

stackBlur caused the program to crash #25498

Closed LiuPeiqiCN closed 2 weeks ago

LiuPeiqiCN commented 2 weeks ago

System Information

OpenCV python version: 4.8.0 Operating System / Platform: Win11

Detailed description

Program crash when the kernel size is too large. Maybe we must limit max kernel size to improve robustness.

Steps to reproduce

cv::Mat test(346, 240, CV_8UC3);
cv::stackBlur(test, test, cv::Size(741, 741));

Issue submission checklist

zihaomu commented 2 weeks ago

@LiuPeiqiCN, thanks for catching this, try to fix it right now.