$darkmode
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 
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 
37 
38  ~features();
39 
41  features& operator= (const features& other);
42 
43 #if AF_API_VERSION >= 38
44  features(const features &other);
46 
47 #if AF_COMPILER_CXX_RVALUE_REFERENCES
48  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 
93 
103 
110 
117 
124 
131 
137  AFAPI af_err af_get_features_orientation(af_array *orientation, const af_features feat);
138 
145 
152 
153 #ifdef __cplusplus
154 }
155 #endif
AFAPI af_err af_get_features_orientation(af_array *orientation, const af_features feat)
Returns the orientations of the features.
Definition: algorithm.h:14
AFAPI af_err af_get_features_score(af_array *score, const af_features feat)
Returns the scores of the features.
AFAPI af_err af_get_features_xpos(af_array *out, const af_features feat)
Returns the x positions of the features.
void * af_features
Definition: features.h:13
A multi dimensional data container.
Definition: array.h:37
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_num(dim_t *num, const af_features feat)
Returns the number of features associated with this object.
af_err
Definition: defines.h:71
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_ypos(af_array *out, const af_features feat)
Returns the y positions of the features.
long long dim_t
Definition: defines.h:56
#define AFAPI
Definition: defines.h:38
static af::array array(af::dim4 idims, cl_mem buf, af::dtype type, bool retain=false)
Create an af::array object from an OpenCL cl_mem buffer
Definition: opencl.h:330
Represents a feature returned by a feature detector.
Definition: features.h:24
void * af_array
Definition: defines.h:240
AFAPI af_err af_release_features(af_features feat)
Reduces the reference count of each of the features.