From 562fe0fcedace39735ead089cfdc4e2b07e40aad Mon Sep 17 00:00:00 2001 From: Abe Mbise Date: Fri, 9 Feb 2018 14:13:02 +0000 Subject: COMPMID-578: Faster common keypoint validation routine for FAST and Harris corners Change-Id: I1f3038ccfa6be5e0a19bec11a89af5ed2247c42f Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/119936 Reviewed-by: Anthony Barbier Reviewed-by: Georgios Pinitas Tested-by: Jenkins --- tests/validation/CL/FastCorners.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'tests/validation/CL/FastCorners.cpp') diff --git a/tests/validation/CL/FastCorners.cpp b/tests/validation/CL/FastCorners.cpp index b5086ef75d..93af59d845 100644 --- a/tests/validation/CL/FastCorners.cpp +++ b/tests/validation/CL/FastCorners.cpp @@ -28,11 +28,12 @@ #include "tests/CL/CLAccessor.h" #include "tests/CL/CLArrayAccessor.h" #include "tests/PaddingCalculator.h" +#include "tests/datasets/ImageFileDatasets.h" #include "tests/datasets/ShapeDatasets.h" #include "tests/framework/Asserts.h" #include "tests/framework/Macros.h" #include "tests/framework/datasets/Datasets.h" -#include "tests/validation/FastValidation.h" +#include "tests/validation/Validation.h" #include "tests/validation/fixtures/FastCornersFixture.h" namespace arm_compute @@ -45,10 +46,6 @@ namespace { /* Radius of the Bresenham circle around the candidate point */ const unsigned int bresenham_radius = 3; -/* Allowed percentage of keypoints missing for target */ -const float allowed_missing = 10.f; -/* Allowed percentage of keypoints mismatching between target and reference */ -const float allowed_mismatching = 10.f; /* Tolerance used to compare corner strengths */ const AbsoluteTolerance tolerance(0.5f); } // namespace @@ -95,21 +92,21 @@ DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(combine(combi template using CLFastCornersFixture = FastCornersValidationFixture; -FIXTURE_DATA_TEST_CASE(RunSmall, CLFastCornersFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::Small2DShapes(), framework::dataset::make("Format", Format::U8)), +FIXTURE_DATA_TEST_CASE(RunSmall, CLFastCornersFixture, framework::DatasetMode::PRECOMMIT, combine(combine(combine(datasets::SmallImageFiles(), framework::dataset::make("Format", Format::U8)), framework::dataset::make("SuppressNonMax", { false, true })), framework::dataset::make("BorderMode", BorderMode::UNDEFINED))) { // Validate output CLArrayAccessor array(_target); - fast_validate_keypoints(array.buffer(), array.buffer() + array.num_values(), _reference.begin(), _reference.end(), tolerance, allowed_missing, allowed_mismatching); + validate_keypoints(array.buffer(), array.buffer() + array.num_values(), _reference.begin(), _reference.end(), tolerance); } -FIXTURE_DATA_TEST_CASE(RunLarge, CLFastCornersFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::Large2DShapes(), framework::dataset::make("Format", Format::U8)), +FIXTURE_DATA_TEST_CASE(RunLarge, CLFastCornersFixture, framework::DatasetMode::NIGHTLY, combine(combine(combine(datasets::LargeImageFiles(), framework::dataset::make("Format", Format::U8)), framework::dataset::make("SuppressNonMax", { false, true })), framework::dataset::make("BorderMode", BorderMode::UNDEFINED))) { // Validate output CLArrayAccessor array(_target); - fast_validate_keypoints(array.buffer(), array.buffer() + array.num_values(), _reference.begin(), _reference.end(), tolerance, allowed_missing, allowed_mismatching); + validate_keypoints(array.buffer(), array.buffer() + array.num_values(), _reference.begin(), _reference.end(), tolerance); } TEST_SUITE_END() -- cgit v1.2.1