[arrayfire] 242/408: Added C++ API for SIFT

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:06 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 efe1331a1261b081cc9d09cd03599c30fba07a78
Author: Peter Andreas Entschev <peter at arrayfire.com>
Date:   Thu Aug 13 10:26:54 2015 -0400

    Added C++ API for SIFT
---
 src/api/cpp/sift.cpp | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/src/api/cpp/sift.cpp b/src/api/cpp/sift.cpp
new file mode 100644
index 0000000..74036dc
--- /dev/null
+++ b/src/api/cpp/sift.cpp
@@ -0,0 +1,34 @@
+/*******************************************************
+ * Copyright (c) 2015, ArrayFire
+ * All rights reserved.
+ *
+ * This file is distributed under 3-clause BSD license.
+ * The complete license agreement can be obtained at:
+ * http://arrayfire.com/licenses/BSD-3-Clause
+ ********************************************************/
+
+#include <af/vision.h>
+#include <af/array.h>
+#include "error.hpp"
+
+namespace af
+{
+
+void sift(features& feat, array& desc, const 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)
+{
+    af_features temp_feat;
+    af_array temp_desc = 0;
+    AF_THROW(af_sift(&temp_feat, &temp_desc, in.get(), n_layers, contrast_thr,
+                     edge_thr, init_sigma, double_input, img_scale, feature_ratio));
+
+    dim_t num = 0;
+    AF_THROW(af_get_features_num(&num, temp_feat));
+    feat = features(temp_feat);
+    desc = array(temp_desc);
+}
+
+}

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