ocl: show diff
This commit is contained in:
parent
6dda2652cd
commit
133d889e33
@ -231,4 +231,21 @@ double checkRectSimilarity(Size sz, std::vector<Rect>& ob1, std::vector<Rect>& o
|
|||||||
return final_test_result;
|
return final_test_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void showDiff(const Mat& gold, const Mat& actual, double eps)
|
||||||
|
{
|
||||||
|
Mat diff;
|
||||||
|
absdiff(gold, actual, diff);
|
||||||
|
threshold(diff, diff, eps, 255.0, cv::THRESH_BINARY);
|
||||||
|
|
||||||
|
namedWindow("gold", WINDOW_NORMAL);
|
||||||
|
namedWindow("actual", WINDOW_NORMAL);
|
||||||
|
namedWindow("diff", WINDOW_NORMAL);
|
||||||
|
|
||||||
|
imshow("gold", gold);
|
||||||
|
imshow("actual", actual);
|
||||||
|
imshow("diff", diff);
|
||||||
|
|
||||||
|
waitKey();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace cvtest
|
} // namespace cvtest
|
||||||
|
@ -52,7 +52,7 @@ extern int LOOP_TIMES;
|
|||||||
|
|
||||||
namespace cvtest {
|
namespace cvtest {
|
||||||
|
|
||||||
//void showDiff(cv::InputArray gold, cv::InputArray actual, double eps);
|
void showDiff(const Mat& gold, const Mat& actual, double eps);
|
||||||
|
|
||||||
cv::ocl::oclMat createMat_ocl(cv::RNG& rng, Size size, int type, bool useRoi);
|
cv::ocl::oclMat createMat_ocl(cv::RNG& rng, Size size, int type, bool useRoi);
|
||||||
cv::ocl::oclMat loadMat_ocl(cv::RNG& rng, const Mat& m, bool useRoi);
|
cv::ocl::oclMat loadMat_ocl(cv::RNG& rng, const Mat& m, bool useRoi);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user