mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 22:44:02 +08:00
Removed corners valus from perf tests and better unit tests for corners values
This commit is contained in:
parent
6137383d32
commit
f3d0ef21a7
@ -81,7 +81,6 @@ OCL_PERF_TEST_P(GoodFeaturesToTrackFixture, GoodFeaturesToTrack,
|
||||
minDistance, noArray(), 3, 3, harrisDetector, 0.04, values);
|
||||
|
||||
SANITY_CHECK(dst);
|
||||
SANITY_CHECK(values);
|
||||
}
|
||||
|
||||
} } // namespace opencv_test::ocl
|
||||
|
@ -39,11 +39,7 @@ PERF_TEST_P(Image_MaxCorners_QualityLevel_MinDistance_BlockSize_gradientSize_Use
|
||||
if (corners.size() > 50)
|
||||
corners.erase(corners.begin() + 50, corners.end());
|
||||
|
||||
if (corners_values.size() > 50)
|
||||
corners_values.erase(corners_values.begin() + 50, corners_values.end());
|
||||
|
||||
SANITY_CHECK(corners);
|
||||
SANITY_CHECK(corners_values);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -111,7 +111,9 @@ OCL_TEST_P(GoodFeaturesToTrack, Accuracy)
|
||||
ASSERT_FALSE(uvalues.empty());
|
||||
UMatToVector(upoints, upts);
|
||||
|
||||
ASSERT_EQ(pts.size(), values.size());
|
||||
ASSERT_EQ(upts.size(), pts.size());
|
||||
ASSERT_EQ(uvalues.size(), values.size());
|
||||
|
||||
int mistmatch = 0;
|
||||
for (size_t i = 0; i < pts.size(); ++i)
|
||||
|
@ -391,8 +391,33 @@ int CV_GoodFeatureToTTest::validate_test_results( int test_case_idx )
|
||||
ts->set_failed_test_info(cvtest::TS::FAIL_BAD_ACCURACY);
|
||||
|
||||
for(int i = 0; i < (int)std::min((unsigned int)(corners.size()), (unsigned int)(Refcorners.size())); i++){
|
||||
if ( (corners[i].x != Refcorners[i].x) || (corners[i].y != Refcorners[i].y) || (corners_values[i] != Refcorners_values[i]))
|
||||
printf("i = %i X %2.6f Xref %2.6f Y %2.6f Yref %2.6f Values %2.6f Values ref %2.6f\n",i,corners[i].x,Refcorners[i].x,corners[i].y,Refcorners[i].y,corners_values[i],Refcorners_values[i]);
|
||||
if ( (corners[i].x != Refcorners[i].x) || (corners[i].y != Refcorners[i].y))
|
||||
printf("i = %i X %2.6f Xref %2.6f Y %2.6f Yref %2.6f\n",i,corners[i].x,Refcorners[i].x,corners[i].y,Refcorners[i].y);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TEST_MESSAGEL (" Refcorners = ", Refcorners.size())
|
||||
TEST_MESSAGEL (" TestCorners = ", corners.size())
|
||||
TEST_MESSAGE ("\n")
|
||||
|
||||
ts->set_failed_test_info(cvtest::TS::OK);
|
||||
}
|
||||
|
||||
e = cv::norm(corners_values, Refcorners_values); // TODO cvtest
|
||||
|
||||
if (e > eps)
|
||||
{
|
||||
TEST_MESSAGEL ("Number of features: Refcorners = ", Refcorners.size())
|
||||
TEST_MESSAGEL (" TestCorners = ", corners.size())
|
||||
TEST_MESSAGE ("\n")
|
||||
|
||||
ts->printf(cvtest::TS::CONSOLE, "actual error: %g, expected: %g", e, eps);
|
||||
ts->set_failed_test_info(cvtest::TS::FAIL_BAD_ACCURACY);
|
||||
|
||||
for(int i = 0; i < (int)std::min((unsigned int)(corners_values.size()), (unsigned int)(Refcorners_values.size())); i++){
|
||||
if (corners_values[i] != Refcorners_values[i])
|
||||
printf("Values %2.6f Values ref %2.6f\n",corners_values[i],Refcorners_values[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user