| 29 | |
| 30 | template<typename T> |
| 31 | static af_features fast(af_array const &in, const float thr, |
| 32 | const unsigned arc_length, const bool non_max, |
| 33 | const float feature_ratio, const unsigned edge) { |
| 34 | Array<float> x = createEmptyArray<float>(dim4()); |
| 35 | Array<float> y = createEmptyArray<float>(dim4()); |
| 36 | Array<float> score = createEmptyArray<float>(dim4()); |
| 37 | |
| 38 | af_features_t feat; |
| 39 | feat.n = fast<T>(x, y, score, getArray<T>(in), thr, arc_length, non_max, |
| 40 | feature_ratio, edge); |
| 41 | |
| 42 | Array<float> orientation = createValueArray<float>(feat.n, 0.0); |
| 43 | Array<float> size = createValueArray<float>(feat.n, 1.0); |
| 44 | |
| 45 | feat.x = getHandle(x); |
| 46 | feat.y = getHandle(y); |
| 47 | feat.score = getHandle(score); |
| 48 | feat.orientation = getHandle(orientation); |
| 49 | feat.size = getHandle(size); |
| 50 | |
| 51 | return getFeaturesHandle(feat); |
| 52 | } |
| 53 | |
| 54 | af_err af_fast(af_features *out, const af_array in, const float thr, |
| 55 | const unsigned arc_length, const bool non_max, |
no test coverage detected