Ask Your Question

Revision history [back]

try this:

normalize(src1,dst1,0,255,NORM_MINMAX,CV_8UC1);
normalize(src2,dst2,0,255,NORM_MINMAX,CV_8UC1);

dst1.convertTo(dst1, CV_32FC1);
dst2.convertTo(dst2, CV_32FC1);

subtract(dst1,dst2,finaldestination);