Subtract operation but in c++ code


Debug Error!

Program: …xtr\Desktop\Toxtrac-Git\toxtrac\x64\ToxTrac\Debug\ToxTrac.exe

abort() has been called

The code is simply what I said:

image1 = Mat::zeros(Size(mapX.cols, mapX.rows), CV_8UC1);
image2 = Mat::zeros(Size(mapX.cols, mapX.rows), CV_8UC1);

Mat imageDiff;
imageDiff = Mat::zeros(Size(mapX.cols, mapX.rows), CV_8UC1);
subtract(arena, arenafondo, imageDiff);