Created
September 17, 2023 08:43
-
-
Save komakai/d1b1d14e876720cfe3584ffd195e6f21 to your computer and use it in GitHub Desktop.
Compare OpenCV Mat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void compareMats(const Mat& a, const Mat& b) { | |
Mat diff = abs(a - b); | |
double maxVal; | |
Point maxLoc; | |
minMaxLoc( diff, nullptr, &maxVal, nullptr, &maxLoc ); | |
if (maxVal > DBL_EPSILON) { | |
std::cout << "Max " << maxVal; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment