Ask Your Question

Revision history [back]

It's just cv::Mat current, last;

It's just cv::Mat current, last;Here is a list of functions that to similar stuff:

http://docs.opencv.org/modules/core/doc/operations_on_arrays.html

Just adding and scaling can be written as

cv::Mat result = 5* (current_image - last_image)

although this can be probematic e.g. for 8UC1 matrices as some differences can get negative. For that reason, you could use cv::subtract that checks the boundaries of the dataype.