[英]OpenCV Error: Assertion failed (ksize.width > … for GaussianBlur
when I call Imgproc.GaussianBlur(dst, dst ,new Size(3,3),1); 当我调用Imgproc.GaussianBlur(dst,dst,new Size(3,3),1); in my application it works perfectly fine.
在我的应用程序中,它工作得很好。 As soon as I increase the kernel size to new Size(4,4) or else I get an
一旦我将内核大小增加到新的大小(4,4),否则我得到一个
OpenCV Error: Assertion failed (ksize.width > 0 && ksize.width % 2 == 1 && ksize.height > 0 && ksize.height % 2 == 1) in cv::createGaussianFilter, file
........\\opencv\\modules\\imgproc\\src\\smooth.cpp, line 816 Caused by: CvException [org.opencv.core.CvException: cv::Exception: ........\\opencv\\modules\\imgproc\\src\\smooth.cpp:816: error: (-215) ksize.width > 0 && ksize.width % 2 == 1 && ksize.height
........ \\ opencv \\ modules \\ imgproc \\ src \\ smooth.cpp,第816行引起:CvException [org.opencv.core.CvException:cv :: Exception:........ \\ opencv \\ modules \\ imgproc \\ src \\ smooth.cpp:816:错误:(-215)ksize.width> 0 && ksize.width%2 == 1 && ksize.height
0 && ksize.height % 2 == 1 in function cv::createGaussianFilter ] at org.opencv.imgproc.Imgproc.GaussianBlur_1(Native Method) at org.opencv.imgproc.Imgproc.GaussianBlur(Imgproc.java:533)
函数cv :: createGaussianFilter中的0 && ksize.height%2 == 1 org.opencv.imgproc.Imgproc.GaussianBlur_1(本机方法)org.opencv.imgproc.Imgproc.GaussianBlur(Imgproc.java:533)
Can please someone put me on the right track for this? 可以请有人把我放在正确的轨道上吗? I have no idea where/what to look for this.
我不知道在哪里/什么寻找这个。
Thx. 谢谢。
我从跟踪中了解到,只允许使用new Size(x,y)
,其中x
和y
是奇数
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.