asked 2018-05-01 13:45:20 -0600
I want to compare two images.
Check out their absolute difference, with the function absdiff:
absdiff
#include <opencv2/opencv.hpp> using namespace cv; #pragma comment(lib, "opencv_world331.lib") // or whatever version you're using... #include <iostream> using namespace std; int main(void) { Mat master = imread("frame1.png"); Mat current = imread("frame2.png"); if (master.empty() || current.empty()) { cout << "Read error" << endl; return -1; } Mat a; absdiff(master, current, a); imshow("a", a); waitKey(); return 0; }
Official site
GitHub
Wiki
Documentation
subscribe to rss feed
Asked: 2018-05-01 13:45:20 -0600
Seen: 5,525 times
Last updated: May 01 '18
OpenCV DescriptorMatcher matches
Conversion between IplImage and MxArray
Video On Label OpenCV Qt :: hide cvNamedWindows
Problems using the math.h class with OpenCV (c++, VS2012)
How to reduce false positives for face detection
Area of a single pixel object in OpenCV
build problems for android_binary_package - Eclipse Indigo, Ubuntu 12.04
Can't compile .cu file when including opencv.hpp
Using OpenCV's stitching module, strange error when compositing images
videofacerec.py example help
Check out their absolute difference, with the function
absdiff
: