Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

accumulateWeighted problems

Hello, excuse me for my bad english. I dev on QT and Ubuntu and i have a problem with accumulateWeighted between two images. My program displays images (1 per second) and calculates the difference between each image.

The problem is that I really do not find many OpenCV doc about this problem ...

My code :

Mat ImgDiffT0;
Mat Acc;

ImgDiffT0 = imread("mDiffT0.bmp", CV_LOAD_IMAGE_GRAYSCALE);

Acc = imread("mDiffT1.bmp", CV_LOAD_IMAGE_GRAYSCALE);

accumulateWeighted(ImgDiffT0, Acc, 0.5);

And the error during the execution is :

OpenCV Error: Assertion failed (func != 0) in accumulateWeighted, file /tmp/OpenCV-2.4.3/modules/imgproc/src/accum.cpp, line 435terminate called after throwing an instance of 'cv::Exception' what(): /tmp/OpenCV-2.4.3/modules/imgproc/src/accum.cpp:435: error: (-215) func != 0 in function accumulateWeighted

Thank you in advance for your help. :)