A high-performance general-purpose compute library
features.h
Go to the documentation of this file.
1/*******************************************************
2 * Copyright (c) 2014, ArrayFire
3 * All rights reserved.
4 *
5 * This file is distributed under 3-clause BSD license.
6 * The complete license agreement can be obtained at:
7 * http://arrayfire.com/licenses/BSD-3-Clause
8 ********************************************************/
9
10#pragma once
11#include <af/defines.h>
12
13typedef void * af_features;
14
15#ifdef __cplusplus
16namespace af
17{
18 class array;
19
25 private:
26 af_features feat;
27
28 public:
31
33 features(const size_t n);
34
37
39
41 features& operator= (const features& other);
42
43#if AF_API_VERSION >= 38
45 features(const features &other);
46
47#if AF_COMPILER_CXX_RVALUE_REFERENCES
49 features(features &&other);
50
52 features &operator=(features &&other);
53#endif
54#endif
55
57 size_t getNumFeatures() const;
58
60 array getX() const;
61
63 array getY() const;
64
66 array getScore() const;
67
70
72 array getSize() const;
73
76 };
77
78}
79#endif
80
81#ifdef __cplusplus
82extern "C" {
83#endif
84
93
103
110
117
124
131
138
145
152
153#ifdef __cplusplus
154}
155#endif
A multi dimensional data container.
Definition: array.h:37
Represents a feature returned by a feature detector.
Definition: features.h:24
features(const features &other)
Copy constructor.
array getOrientation() const
Returns an array with the orientations of the features.
array getScore() const
Returns an array with the score of the features.
features(af_features f)
Creates a features object from a C af_features object.
array getSize() const
Returns an array that represents the size of the features.
features()
Default constructor. Creates a features object with new features.
features(const size_t n)
Creates a features object with n features with undefined locations.
af_features get() const
Returns the underlying C af_features object.
array getY() const
Returns an af::array which represents the y locations of a feature.
size_t getNumFeatures() const
Returns the number of features represented by this object.
array getX() const
Returns an af::array which represents the x locations of a feature.
long long dim_t
Definition: defines.h:56
af_err
Definition: defines.h:71
void * af_array
Definition: defines.h:240
#define AFAPI
Definition: defines.h:38
void * af_features
Definition: features.h:13
AFAPI af_err af_get_features_ypos(af_array *out, const af_features feat)
Returns the y positions of the features.
AFAPI af_err af_get_features_size(af_array *size, const af_features feat)
Returns the size of the features.
AFAPI af_err af_retain_features(af_features *out, const af_features feat)
Increases the reference count of the feature and all of its associated arrays.
AFAPI af_err af_get_features_orientation(af_array *orientation, const af_features feat)
Returns the orientations of the features.
AFAPI af_err af_get_features_score(af_array *score, const af_features feat)
Returns the scores of the features.
AFAPI af_err af_release_features(af_features feat)
Reduces the reference count of each of the features.
AFAPI af_err af_get_features_num(dim_t *num, const af_features feat)
Returns the number of features associated with this object.
AFAPI af_err af_create_features(af_features *feat, dim_t num)
Creates a new af_feature object with num features.
AFAPI af_err af_get_features_xpos(af_array *out, const af_features feat)
Returns the x positions of the features.
Definition: algorithm.h:15