[arrayfire] 240/408: Added SIFT prototypes and parameter documentation

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:05 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.

commit 028960f012488552865f6d75aa9c8ee13d04075a
Author: Peter Andreas Entschev <peter at arrayfire.com>
Date:   Thu Aug 13 10:26:05 2015 -0400

    Added SIFT prototypes and parameter documentation
---
 include/af/vision.h | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 68 insertions(+), 2 deletions(-)

diff --git a/include/af/vision.h b/include/af/vision.h
index 22decc1..a94401a 100644
--- a/include/af/vision.h
+++ b/include/af/vision.h
@@ -41,7 +41,7 @@ class array;
 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 ORB feature descriptor
+    C++ Interface for Harris corner detector
 
     \param[in] in array containing a grayscale image (color images are not
                supported)
@@ -93,6 +93,39 @@ AFAPI features harris(const array& in, const unsigned max_corners=500, const flo
 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 SIFT feature detector and descriptor
+
+    \param[out] feat features object composed of arrays for x and y
+                coordinates, score, orientation and size of selected features
+    \param[out] desc Nx128 array containing extracted descriptors, where N is the
+                number of features found by SIFT
+    \param[in]  in array containing a grayscale image (color images are not
+                supported)
+    \param[in]  n_layers number of layers per octave, the number of octaves is
+                computed automatically according to the input image dimensions,
+                the original SIFT paper suggests 3
+    \param[in]  contrast_thr threshold used to filter out features that have
+                low contrast, the original SIFT paper suggests 0.04
+    \param[in]  edge_thr threshold used to filter out features that are too
+                edge-like, the original SIFT paper suggests 10.0
+    \param[in]  init_sigma the sigma value used to filter the input image at
+                the first octave, the original SIFT paper suggests 1.6
+    \param[in]  double_input if true, the input image dimensions will be
+                doubled and the doubled image will be used for the first octave
+    \param[in]  intensity_scale the inverse of the difference between the minimum
+                and maximum grayscale intensity value, e.g.: if the ranges are
+                0-256, the proper intensity_scale value is 1/256, if the ranges
+                are 0-1, the proper intensity-scale value is 1/1
+    \param[in]  feature_ratio maximum ratio of features to detect, the maximum
+                number of features is calculated by feature_ratio * in.elements().
+                The maximum number of features is not based on the score, instead,
+                features detected after the limit is reached are discarded
+
+    \ingroup cv_func_sift
+ */
+AFAPI void sift(features& feat, array& desc, const array& in, const unsigned n_layers=3, const float contrast_thr=0.04f, const float edge_thr=10.f, const float init_sigma=1.6f, const bool double_input=true, const float img_scale=0.00390625f, const float feature_ratio=0.05f);
+
+/**
    C++ Interface wrapper for Hamming matcher
 
    \param[out] idx is an array of MxN size, where M is equal to the number of query
@@ -224,7 +257,7 @@ extern "C" {
     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 Harris feature descriptor
+        C Interface for Harris corner detector
 
         \param[out] out struct containing arrays for x and y
                     coordinates and score (Harris response), while arrays
@@ -276,6 +309,39 @@ extern "C" {
     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 SIFT feature detector and descriptor
+
+        \param[out] feat af_features object composed of arrays for x and y
+                    coordinates, score, orientation and size of selected features
+        \param[out] desc Nx128 array containing extracted descriptors, where N is the
+                    number of features found by SIFT
+        \param[in]  in array containing a grayscale image (color images are not
+                    supported)
+        \param[in]  n_layers number of layers per octave, the number of octaves is
+                    computed automatically according to the input image dimensions,
+                    the original SIFT paper suggests 3
+        \param[in]  contrast_thr threshold used to filter out features that have
+                    low contrast, the original SIFT paper suggests 0.04
+        \param[in]  edge_thr threshold used to filter out features that are too
+                    edge-like, the original SIFT paper suggests 10.0
+        \param[in]  init_sigma the sigma value used to filter the input image at
+                    the first octave, the original SIFT paper suggests 1.6
+        \param[in]  double_input if true, the input image dimensions will be
+                    doubled and the doubled image will be used for the first octave
+        \param[in]  intensity_scale the inverse of the difference between the minimum
+                    and maximum grayscale intensity value, e.g.: if the ranges are
+                    0-256, the proper intensity_scale value is 1/256, if the ranges
+                    are 0-1, the proper intensity-scale value is 1/1
+        \param[in]  feature_ratio maximum ratio of features to detect, the maximum
+                    number of features is calculated by feature_ratio * in.elements().
+                    The maximum number of features is not based on the score, instead,
+                    features detected after the limit is reached are discarded
+
+        \ingroup cv_func_sift
+    */
+    AFAPI af_err af_sift(af_features *feat, af_array *desc, const af_array in, const unsigned n_layers, const float contrast_thr, const float edge_thr, const float init_sigma, const bool double_input, const float img_scale, const float feature_ratio);
+
+    /**
        C Interface wrapper for Hamming matcher
 
        \param[out] idx is an array of MxN size, where M is equal to the number of query

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git



More information about the debian-science-commits mailing list