First time here? Check out the FAQ!
answered 2019-06-13 23:51:29 -0600
cv::subtract() saturates the result, negative numbers will be truncated to 0.
0
to avoid this, try one of:
subtract(src,dst,result, CV_16S);