opencv error: failed assertion

asked 2014-05-29 16:10:13 -0500

Olfa gravatar image

Hi, i try to detect the pupill and corners of eye with opencv et qt but when i choose an image to execute my code. qtcreator display this error "OpenCV Error: Assertion failed (ksize.width > 0 && ksize.width % 2 == 1 && ksize.height > 0 && ksize.height % 2 == 1) in createGaussianFilter, file /../../OpenCV-2.4.1/modules/imgproc/src/smooth.cpp, line 402" can anyone help me please

edit retag flag offensive close merge delete

Comments

1

a gaussian kernel needs to be odd size

berak gravatar imageberak ( 2014-05-29 16:13:24 -0500 )edit

how can i do it. this is my line code where i use gaussian filter cv::GaussianBlur(srcClone, srcClone, cv::Size(gaussianSize, gaussianSize), 6, 6 ); srcClone is a grayscale image and gaussianSize are integer

Olfa gravatar imageOlfa ( 2014-05-30 10:43:56 -0500 )edit

dear, RTFM

so, gaussianSize has to be odd.

berak gravatar imageberak ( 2014-05-30 11:04:54 -0500 )edit

ok thanks

Olfa gravatar imageOlfa ( 2014-05-30 12:10:50 -0500 )edit