mirror of
https://github.com/opencv/opencv.git
synced 2024-12-12 23:49:36 +08:00
threshold comparison made more obvious
This commit is contained in:
parent
d4e28f27b7
commit
7bdacb8098
@ -565,8 +565,8 @@ TEST_P(WarpFrameInputs, checkTypes)
|
|||||||
double l2threshold = depthType == CV_16U ? shortl2diff : floatl2diff;
|
double l2threshold = depthType == CV_16U ? shortl2diff : floatl2diff;
|
||||||
double lithreshold = depthType == CV_16U ? shortlidiff : floatlidiff;
|
double lithreshold = depthType == CV_16U ? shortlidiff : floatlidiff;
|
||||||
|
|
||||||
EXPECT_GE(l2threshold, l2diff);
|
EXPECT_LE(l2diff, l2threshold);
|
||||||
EXPECT_GE(lithreshold, lidiff);
|
EXPECT_LE(lidiff, lithreshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(RGBD_Odometry, WarpFrameInputs, ::testing::Values(
|
INSTANTIATE_TEST_CASE_P(RGBD_Odometry, WarpFrameInputs, ::testing::Values(
|
||||||
@ -590,7 +590,7 @@ TEST(RGBD_Odometry_WarpFrame, identity)
|
|||||||
|
|
||||||
double depthDiff = cv::norm(w.dstDepth, w.warpedDepth, NORM_L2, w.dstMask);
|
double depthDiff = cv::norm(w.dstDepth, w.warpedDepth, NORM_L2, w.dstMask);
|
||||||
|
|
||||||
ASSERT_GE(DBL_EPSILON, depthDiff);
|
ASSERT_LE(depthDiff, DBL_EPSILON);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(RGBD_Odometry_WarpFrame, noRgb)
|
TEST(RGBD_Odometry_WarpFrame, noRgb)
|
||||||
@ -604,8 +604,8 @@ TEST(RGBD_Odometry_WarpFrame, noRgb)
|
|||||||
double l2diff = cv::norm(w.dstDepth, w.warpedDepth, NORM_L2, w.warpedMask);
|
double l2diff = cv::norm(w.dstDepth, w.warpedDepth, NORM_L2, w.warpedMask);
|
||||||
double lidiff = cv::norm(w.dstDepth, w.warpedDepth, NORM_INF, w.warpedMask);
|
double lidiff = cv::norm(w.dstDepth, w.warpedDepth, NORM_INF, w.warpedMask);
|
||||||
|
|
||||||
ASSERT_GE(0.038209, l2diff);
|
ASSERT_LE(l2diff, 0.038209);
|
||||||
ASSERT_GE(0.00020004, lidiff);
|
ASSERT_LE(lidiff, 0.00020004);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(RGBD_Odometry_WarpFrame, nansAreMasked)
|
TEST(RGBD_Odometry_WarpFrame, nansAreMasked)
|
||||||
@ -622,8 +622,8 @@ TEST(RGBD_Odometry_WarpFrame, nansAreMasked)
|
|||||||
double l2diff = cv::norm(w.dstDepth, w.warpedDepth, NORM_L2, goodVals);
|
double l2diff = cv::norm(w.dstDepth, w.warpedDepth, NORM_L2, goodVals);
|
||||||
double lidiff = cv::norm(w.dstDepth, w.warpedDepth, NORM_INF, goodVals);
|
double lidiff = cv::norm(w.dstDepth, w.warpedDepth, NORM_INF, goodVals);
|
||||||
|
|
||||||
ASSERT_GE(0.038209, l2diff);
|
ASSERT_LE(l2diff, 0.038209);
|
||||||
ASSERT_GE(0.00020004, lidiff);
|
ASSERT_LE(lidiff, 0.00020004);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(RGBD_Odometry_WarpFrame, bigScale)
|
TEST(RGBD_Odometry_WarpFrame, bigScale)
|
||||||
@ -640,8 +640,8 @@ TEST(RGBD_Odometry_WarpFrame, bigScale)
|
|||||||
double l2diff = cv::norm(w.dstDepth, w.warpedDepth, NORM_L2, w.warpedMask);
|
double l2diff = cv::norm(w.dstDepth, w.warpedDepth, NORM_L2, w.warpedMask);
|
||||||
double lidiff = cv::norm(w.dstDepth, w.warpedDepth, NORM_INF, w.warpedMask);
|
double lidiff = cv::norm(w.dstDepth, w.warpedDepth, NORM_INF, w.warpedMask);
|
||||||
|
|
||||||
ASSERT_GE(191.026565, l2diff);
|
ASSERT_LE(l2diff, 191.026565);
|
||||||
ASSERT_GE(0.99951172, lidiff);
|
ASSERT_LE(lidiff, 0.99951172);
|
||||||
}
|
}
|
||||||
|
|
||||||
}} // namespace
|
}} // namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user