How can I subtract one image from another using openCV?
Ps.: I coudn't use the python implementation because I'll have to do it in C++
#include <cv.h>
#include <highgui.h>
using namespace cv;
Mat im = imread("cameraman.tif");
Mat im2 = imread("lena.tif");
Mat diff_im = im - im2;
Change the image names. Also make sure they have the same size.