[arrayfire] 80/408: Added documentation and function definitions for Harris

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:11:22 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 cfb97cac26e25846a19c908b09f749e8dec6283a
Author: Peter Andreas Entschev <peter at arrayfire.com>
Date:   Thu Jul 2 13:39:58 2015 -0400

    Added documentation and function definitions for Harris
---
 docs/details/vision.dox | 12 +++++++++++
 include/af/vision.h     | 57 ++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/docs/details/vision.dox b/docs/details/vision.dox
index 250c90e..68f13cf 100644
--- a/docs/details/vision.dox
+++ b/docs/details/vision.dox
@@ -18,6 +18,18 @@ discard it if its score is non maximal.
 
 =======================================================================
 
+\defgroup cv_func_harris harris
+\ingroup featdetect_mat
+
+\brief Harris corner detector
+
+Compute corners using the Harris corner detector approach. For each pixel, a
+small window is used to calculate the determinant and trace of such a window,
+from which a response is calculated. Pixels are considered corners if they are
+local maximas and have a high positive response.
+
+=======================================================================
+
 \defgroup cv_func_orb orb
 \ingroup featdescriptor_mat
 
diff --git a/include/af/vision.h b/include/af/vision.h
index 9475014..5c2e0aa 100644
--- a/include/af/vision.h
+++ b/include/af/vision.h
@@ -43,6 +43,34 @@ AFAPI features fast(const array& in, const float thr=20.0f, const unsigned arc_l
 /**
     C++ Interface for ORB feature descriptor
 
+    \param[in] in array containing a grayscale image (color images are not
+               supported)
+    \param[in] max_corners maximum number of corners to keep, only retains
+               those with highest Harris responses
+    \param[in] min_response minimum response in order for a corner to be
+               retained, only used if max_corners = 0
+    \param[in] sigma the standard deviation of a circular window (its
+               dimensions will be calculated according to the standard
+               deviation), the covariation matrix will be calculated to a
+               circular neighborhood of this standard deviation (only used
+               when block_size == 0, must be >= 0.5f and <= 5.0f)
+    \param[in] block_size square window size, the covariation matrix will be
+               calculated to a square neighborhood of this size (must be
+               >= 3 and <= 31)
+    \param[in] k_thr Harris constant, usually set empirically to 0.04f (must
+               be >= 0.01f)
+    \return    features object containing arrays for x and y coordinates and
+               score (Harris response), while arrays orientation and size are
+               set to 0 and 1, respectively, because Harris does not compute
+               that information
+
+    \ingroup cv_func_harris
+ */
+AFAPI features harris(const array& in, const unsigned max_corners=500, const float min_response=1e5f, const float sigma=1.f, const unsigned block_size=0, const float k_thr=0.04f);
+
+/**
+    C++ Interface for ORB feature descriptor
+
     \param[out] feat features object composed of arrays for x and y
                 coordinates, score, orientation and size of selected features
     \param[out] desc Nx8 array containing extracted descriptors, where N is the
@@ -64,7 +92,6 @@ AFAPI features fast(const array& in, const float thr=20.0f, const unsigned arc_l
  */
 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 wrapper for Hamming matcher
 
@@ -174,6 +201,34 @@ 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
+
+        \param[out] out struct containing arrays for x and y
+                    coordinates and score (Harris response), while arrays
+                    orientation and size are set to 0 and 1, respectively,
+                    because Harris does not compute that information
+        \param[in]  in array containing a grayscale image (color images are not
+                    supported)
+        \param[in]  max_corners maximum number of corners to keep, only retains
+                    those with highest Harris responses
+        \param[in]  min_response minimum response in order for a corner to be
+                    retained, only used if max_corners = 0
+        \param[in]  sigma the standard deviation of a circular window (its
+                    dimensions will be calculated according to the standard
+                    deviation), the covariation matrix will be calculated to a
+                    circular neighborhood of this standard deviation (only used
+                    when block_size == 0, must be >= 0.5f and <= 5.0f)
+        \param[in]  block_size square window size, the covariation matrix will be
+                    calculated to a square neighborhood of this size (must be
+                    >= 3 and <= 31)
+        \param[in]  k_thr Harris constant, usually set empirically to 0.04f (must
+                    be >= 0.01f)
+
+        \ingroup cv_func_harris
+    */
+    AFAPI af_err af_harris(af_features *out, const af_array in, const unsigned max_corners, const float min_response, const float sigma, const unsigned block_size, const float k_thr);
+
+    /**
         C Interface for ORB feature descriptor
 
         \param[out] feat af_features struct composed of arrays for x and y

-- 
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