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

Function af_create_features

src/api/c/features.cpp:40–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40af_err af_create_features(af_features *featHandle, dim_t num) {
41 try {
42 af_features_t feat;
43 feat.n = num;
44
45 if (num > 0) {
46 dim_t out_dims[4] = {dim_t(num), 1, 1, 1};
47 AF_CHECK(af_create_handle(&feat.x, 4, out_dims, f32));
48 AF_CHECK(af_create_handle(&feat.y, 4, out_dims, f32));
49 AF_CHECK(af_create_handle(&feat.score, 4, out_dims, f32));
50 AF_CHECK(af_create_handle(&feat.orientation, 4, out_dims, f32));
51 AF_CHECK(af_create_handle(&feat.size, 4, out_dims, f32));
52 }
53
54 *featHandle = getFeaturesHandle(feat);
55 }
56 CATCHALL;
57
58 return AF_SUCCESS;
59}
60
61af_features_t getFeatures(const af_features featHandle) {
62 return *static_cast<af_features_t *>(featHandle);

Callers 1

featuresMethod · 0.50

Calls 2

getFeaturesHandleFunction · 0.85
af_create_handleFunction · 0.70

Tested by

no test coverage detected