A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

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
13 typedef void * af_features;
14
15#ifdef __cplusplus
16 namespace af
17{
18 class array;
19
24 class AFAPI features {
25 private:
26 af_features feat;
27
28 public:
30 features();
31
33 features(const size_t n);
34
36 features(af_features f);
37
38 ~features();
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
69 array getOrientation() const;
70
72 array getSize() const;
73
75 af_features get() const;
76 };
77
78}
79#endif
80
81#ifdef __cplusplus
82 extern "C" {
83#endif
84
92 AFAPI af_err af_create_features(af_features *feat, dim_t num);
93
102 AFAPI af_err af_retain_features(af_features *out, const af_features feat);
103
109 AFAPI af_err af_get_features_num(dim_t *num, const af_features feat);
110
116 AFAPI af_err af_get_features_xpos(af_array *out, const af_features feat);
117
123 AFAPI af_err af_get_features_ypos(af_array *out, const af_features feat);
124
130 AFAPI af_err af_get_features_score(af_array *score, const af_features feat);
131
137 AFAPI af_err af_get_features_orientation(af_array *orientation, const af_features feat);
138
144 AFAPI af_err af_get_features_size(af_array *size, const af_features feat);
145
151 AFAPI af_err af_release_features(af_features feat);
152
153#ifdef __cplusplus
154}
155#endif
af::array
A multi dimensional data container.
Definition array.h:37
af::features
Represents a feature returned by a feature detector.
Definition features.h:24
af::features::features
features(const features &other)
Copy constructor.
af::features::getOrientation
array getOrientation() const
Returns an array with the orientations of the features.
af::features::~features
~features()
af::features::getScore
array getScore() const
Returns an array with the score of the features.
af::features::features
features(af_features f)
Creates a features object from a C af_features object.
af::features::getSize
array getSize() const
Returns an array that represents the size of the features.
af::features::features
features()
Default constructor. Creates a features object with new features.
af::features::features
features(const size_t n)
Creates a features object with n features with undefined locations.
af::features::get
af_features get() const
Returns the underlying C af_features object.
af::features::getY
array getY() const
Returns an af::array which represents the y locations of a feature.
af::features::getNumFeatures
size_t getNumFeatures() const
Returns the number of features represented by this object.
af::features::getX
array getX() const
Returns an af::array which represents the x locations of a feature.
defines.h
dim_t
long long dim_t
Definition defines.h:56
af_err
af_err
Definition defines.h:71
af_array
void * af_array
Definition defines.h:240
AFAPI
#define AFAPI
Definition defines.h:38
af_features
void * af_features
Definition features.h:13
af_get_features_ypos
AFAPI af_err af_get_features_ypos(af_array *out, const af_features feat)
Returns the y positions of the features.
af_get_features_size
AFAPI af_err af_get_features_size(af_array *size, const af_features feat)
Returns the size of the features.
af_retain_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.
af_get_features_orientation
AFAPI af_err af_get_features_orientation(af_array *orientation, const af_features feat)
Returns the orientations of the features.
af_get_features_score
AFAPI af_err af_get_features_score(af_array *score, const af_features feat)
Returns the scores of the features.
af_release_features
AFAPI af_err af_release_features(af_features feat)
Reduces the reference count of each of the features.
af_get_features_num
AFAPI af_err af_get_features_num(dim_t *num, const af_features feat)
Returns the number of features associated with this object.
af_create_features
AFAPI af_err af_create_features(af_features *feat, dim_t num)
Creates a new af_feature object with num features.
af_get_features_xpos
AFAPI af_err af_get_features_xpos(af_array *out, const af_features feat)
Returns the x positions of the features.
af
Definition algorithm.h:15