Java - Mat subtract returns all black image
In OpenCV Java, When I perform Core.subtract(next.clone(), previous.clone(), result);
, My result is an all black image. Both the next Mat and the previous Mat have been converted to grayscale and also thresholded prior to the subtract operation. Why is this happening?
what is the
type
of those Mat's ? (possible truncation)Both are CV_8UC1, they are both Mats taken from the same video; where there is a heart rate like monitor for which I am trying to subtract every identical pixel and leave only the different pixels in the result mat.