MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / sift

Function sift

src/api/c/sift.cpp:25–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24template<typename T, typename convAccT>
25static void sift(af_features& feat_, af_array& descriptors, const af_array& in,
26 const unsigned n_layers, const float contrast_thr,
27 const float edge_thr, const float init_sigma,
28 const bool double_input, const float img_scale,
29 const float feature_ratio, const bool compute_GLOH) {
30 Array<float> x = createEmptyArray<float>(dim4());
31 Array<float> y = createEmptyArray<float>(dim4());
32 Array<float> score = createEmptyArray<float>(dim4());
33 Array<float> ori = createEmptyArray<float>(dim4());
34 Array<float> size = createEmptyArray<float>(dim4());
35 Array<float> desc = createEmptyArray<float>(dim4());
36
37 af_features_t feat;
38
39 feat.n =
40 sift<T, convAccT>(x, y, score, ori, size, desc, getArray<T>(in),
41 n_layers, contrast_thr, edge_thr, init_sigma,
42 double_input, img_scale, feature_ratio, compute_GLOH);
43
44 feat.x = getHandle(x);
45 feat.y = getHandle(y);
46 feat.score = getHandle(score);
47 feat.orientation = getHandle(ori);
48 feat.size = getHandle(size);
49
50 feat_ = getFeaturesHandle(feat);
51 descriptors = getHandle<float>(desc);
52}
53
54af_err af_sift(af_features* feat, af_array* desc, const af_array in,
55 const unsigned n_layers, const float contrast_thr,

Callers 1

TESTFunction · 0.50

Calls 3

getFeaturesHandleFunction · 0.85
getHandleFunction · 0.70
dim4Class · 0.50

Tested by

no test coverage detected