Search code examples
c++imageopencvsubtraction

subtract one image from another using openCV


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++


Solution

  • Use LoadImage to load your images into memory, then use the Sub method.

    This link contains some example code, if that will help: http://permalink.gmane.org/gmane.comp.lib.opencv/36167