vision.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/features.h>
12 
13 #ifdef __cplusplus
14 namespace af
15 {
16 class array;
17 
41 AFAPI features fast(const array& in, const float thr=20.0f, const unsigned arc_length=9, const bool non_max=true, const float feature_ratio=0.05, const unsigned edge=3);
42 
65 AFAPI void orb(features& feat, array& desc, const array& image, const float fast_thr=20.f, const unsigned max_feat=400, const float scl_fctr=1.5f, const unsigned levels=4, const bool blur_img=false);
66 
67 
89 AFAPI void hammingMatcher(array& idx, array& dist,
90  const array& query, const array& train,
91  const dim_t dist_dim=0, const unsigned n_dist=1);
92 
108 AFAPI array matchTemplate(const array &searchImg, const array &templateImg, const matchType mType=AF_SAD);
109 
110 }
111 #endif
112 
113 #ifdef __cplusplus
114 extern "C" {
115 #endif
116 
142  AFAPI af_err af_fast(af_features *out, const af_array in, const float thr, const unsigned arc_length, const bool non_max, const float feature_ratio, const unsigned edge);
143 
166  AFAPI af_err af_orb(af_features *feat, af_array *desc, const af_array in, const float fast_thr, const unsigned max_feat, const float scl_fctr, const unsigned levels, const bool blur_img);
167 
190  const af_array query, const af_array train,
191  const dim_t dist_dim, const unsigned n_dist);
192 
210  AFAPI af_err af_match_template(af_array *out, const af_array search_img, const af_array template_img, const af_match_type m_type);
211 
212 #ifdef __cplusplus
213 }
214 #endif
Definition: algorithm.h:14
AFAPI af_err af_orb(af_features *feat, af_array *desc, const af_array in, const float fast_thr, const unsigned max_feat, const float scl_fctr, const unsigned levels, const bool blur_img)
C Interface for ORB feature descriptor.
AFAPI void orb(features &feat, array &desc, const array &image, const float fast_thr=20.f, const unsigned max_feat=400, const float scl_fctr=1.5f, const unsigned levels=4, const bool blur_img=false)
C++ Interface for ORB feature descriptor.
void * af_features
Definition: features.h:13
af_err
Definition: defines.h:58
AFAPI af_err af_hamming_matcher(af_array *idx, af_array *dist, const af_array query, const af_array train, const dim_t dist_dim, const unsigned n_dist)
C Interface wrapper for Hamming matcher.
long long dim_t
Definition: defines.h:50
AFAPI features fast(const array &in, const float thr=20.0f, const unsigned arc_length=9, const bool non_max=true, const float feature_ratio=0.05, const unsigned edge=3)
C++ Interface for FAST feature detector.
AFAPI af_err af_fast(af_features *out, const af_array in, const float thr, const unsigned arc_length, const bool non_max, const float feature_ratio, const unsigned edge)
C Interface for FAST feature detector.
#define AFAPI
Definition: defines.h:31
Match based on Sum of Absolute Differences (SAD)
Definition: defines.h:225
AFAPI af_err af_match_template(af_array *out, const af_array search_img, const af_array template_img, const af_match_type m_type)
C Interface for image template matching.
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:105
AFAPI void hammingMatcher(array &idx, array &dist, const array &query, const array &train, const dim_t dist_dim=0, const unsigned n_dist=1)
C++ Interface wrapper for Hamming matcher.
void * af_array
Definition: defines.h:172
af_match_type matchType
Definition: defines.h:294
AFAPI array matchTemplate(const array &searchImg, const array &templateImg, const matchType mType=AF_SAD)
C++ Interface for image template matching.
af_match_type
Definition: defines.h:224