CLION调用opencv库报错:OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV Error: Assertion failed (!_src.empty()) in GaussianBlur, file D:\CPPair\opencv\opencv3\sources\modu
les\imgproc\src\smooth.dispatch.cpp, line 617
// OPENCV源代码:
void GaussianBlur(InputArray _src, OutputArray _dst, Size ksize,
double sigma1, double sigma2,
int borderType)
{
CV_INSTRUMENT_REGION();
CV_Assert(!_src.empty()); // 617行报错位置
int type = _src.type();
Size size = _src.size();
_dst.create( size, type );
if( (borderType & ~BORDER_ISOLATED) != BORDER_CONSTANT &&
((borderType & BORDER_ISOLATED) != 0 || !_src.getMat().isSubmatrix()) )
{
if( size.height == 1 )
ksize.height = 1;
if( size.width == 1 )
ksize.width = 1;
}
if( ksize.width == 1 && ksize.height == 1 )
{
_src.copyTo(_dst);
return;
}