Merge pull request #1744 from liuxing6666:2.4_fix_harris_test
This commit is contained in:
@@ -254,8 +254,28 @@ OCL_TEST_P(CornerMinEigenVal, Mat)
|
||||
}
|
||||
|
||||
////////////////////////////////cornerHarris//////////////////////////////////////////
|
||||
struct CornerHarris :
|
||||
public ImgprocTestBase
|
||||
{
|
||||
void Near(double threshold = 0.0)
|
||||
{
|
||||
Mat whole, roi;
|
||||
gdst_whole.download(whole);
|
||||
gdst_roi.download(roi);
|
||||
|
||||
typedef CornerTestBase CornerHarris;
|
||||
absdiff(whole, dst_whole, whole);
|
||||
absdiff(roi, dst_roi, roi);
|
||||
|
||||
divide(whole, dst_whole, whole);
|
||||
divide(roi, dst_roi, roi);
|
||||
|
||||
absdiff(dst_whole, dst_whole, dst_whole);
|
||||
absdiff(dst_roi, dst_roi, dst_roi);
|
||||
|
||||
EXPECT_MAT_NEAR(dst_whole, whole, threshold);
|
||||
EXPECT_MAT_NEAR(dst_roi, roi, threshold);
|
||||
}
|
||||
};
|
||||
|
||||
OCL_TEST_P(CornerHarris, Mat)
|
||||
{
|
||||
@@ -269,7 +289,7 @@ OCL_TEST_P(CornerHarris, Mat)
|
||||
cornerHarris(src_roi, dst_roi, blockSize, apertureSize, k, borderType);
|
||||
ocl::cornerHarris(gsrc_roi, gdst_roi, blockSize, apertureSize, k, borderType);
|
||||
|
||||
Near(1e-5, true);
|
||||
Near(1e-5);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user