31 #include "tests/datasets/ImageFileDatasets.h" 32 #include "tests/datasets/ShapeDatasets.h" 37 #include "tests/validation/fixtures/FastCornersFixture.h" 48 const unsigned int bresenham_radius = 3;
50 const AbsoluteTolerance<float> tolerance(0.5f);
57 framework::dataset::
make("
Format", Format::U8)),
58 framework::dataset::
make("SuppressNonMax", {
false,
true })),
62 std::mt19937 gen(
library->seed());
63 std::uniform_int_distribution<uint8_t> int_dist(0, 255);
64 std::uniform_real_distribution<float> real_dist(0, 255);
66 const uint8_t constant_border_value = int_dist(gen);
76 unsigned int num_corners;
80 fast_corners.
configure(&src, threshold, suppress_nonmax, &corners, &num_corners,
border_mode, constant_border_value);
93 using CLFastCornersFixture = FastCornersValidationFixture<CLTensor, CLAccessor, CLKeyPointArray, CLFastCorners, T>;
FastCornersValidationFixture< CLTensor, CLAccessor, CLKeyPointArray, CLFastCorners, T > CLFastCornersFixture
void set_accessed_elements(int elements)
Set number of accessed elements.
Accessor implementation for CLArray objects.
bool is_resizable() const override
Flag indicating whether the size of the tensor can be changed.
size_t num_values() const override
Number of elements of the tensor.
Basic function to execute fast corners.
1 channel, 1 U8 per channel
PaddingCalculator calculator(shape.x(), 8)
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
PaddingSize padding() const override
Padding of tensor.
void set_border_size(int size)
Set border size.
PaddingSize required_padding() const
Compute the required padding.
TensorInfo * info() const override
Interface to be implemented by the child class to return the tensor's metadata.
This file contains all available output stages for GEMMLowp on OpenCL.
void set_access_offset(int offset)
Set offset of the access relative to the current position.
#define TEST_SUITE(SUITE_NAME)
FIXTURE_DATA_TEST_CASE(RunSmall, CLAbsoluteDifferenceFixture< uint8_t >, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallShapes(), AbsoluteDifferenceU8Dataset))
validate(dst.info() ->valid_region(), dst_valid_region)
DatasetMode
Possible dataset modes.
std::unique_ptr< AssetsLibrary > library
T * buffer() override
Access to the buffer.
ITensorInfo & set_format(Format format) override
Set the format of an already initialized tensor.
Format
Image colour formats.
DataType data_type_from_format(Format format)
Return the data type used by a given single-planar pixel format.
DATA_TEST_CASE(Configuration, framework::DatasetMode::ALL, combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), AbsoluteDifferenceU8Dataset), shape, data_type0, data_type1, output_data_type)
__kernel void fast_corners(__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_offset_first_element_in_bytes, float threshold_value)
Fast corners implementation.
void configure(const ICLImage *input, float threshold, bool nonmax_suppression, ICLKeyPointArray *corners, unsigned int *num_corners, BorderMode border_mode, uint8_t constant_border_value=0)
Initialize the function's source, destination, conv and border_mode.
TEST_SUITE_END() DATA_TEST_CASE(Configuration
ARM_COMPUTE_EXPECT(src.info() ->is_resizable(), framework::LogLevel::ERRORS)
Borders are left undefined.
void validate_keypoints(T target_first, T target_last, U reference_first, U reference_last, V tolerance=AbsoluteTolerance< float >(), float allowed_missing_percentage=5.f, float allowed_mismatch_percentage=5.f)
Validate key points.
combine(combine(combine(concat(datasets::SmallShapes(), datasets::LargeShapes()), framework::dataset::make("DataType",{DataType::U8, DataType::S16})), datasets::BorderModes()), framework::dataset::make("filter_size",{5}))
JoinDataset< T, U > concat(T &&dataset1, U &&dataset2)
Helper function to create a JoinDataset.
SimpleTensor< T > threshold(const SimpleTensor< T > &src, T threshold, T false_value, T true_value, ThresholdType type, T upper)
convolution configure & src
Calculate required padding.
Basic implementation of the OpenCL tensor interface.