| 27 | |
| 28 | template<typename T, typename convAccT> |
| 29 | static af_features harris(af_array const &in, const unsigned max_corners, |
| 30 | const float min_response, const float sigma, |
| 31 | const unsigned filter_len, const float k_thr) { |
| 32 | Array<float> x = createEmptyArray<float>(dim4()); |
| 33 | Array<float> y = createEmptyArray<float>(dim4()); |
| 34 | Array<float> score = createEmptyArray<float>(dim4()); |
| 35 | |
| 36 | af_features_t feat; |
| 37 | feat.n = harris<T, convAccT>(x, y, score, getArray<T>(in), max_corners, |
| 38 | min_response, sigma, filter_len, k_thr); |
| 39 | |
| 40 | Array<float> orientation = createValueArray<float>(feat.n, 0.0); |
| 41 | Array<float> size = createValueArray<float>(feat.n, 1.0); |
| 42 | |
| 43 | feat.x = getHandle(x); |
| 44 | feat.y = getHandle(y); |
| 45 | feat.score = getHandle(score); |
| 46 | feat.orientation = getHandle(orientation); |
| 47 | feat.size = getHandle(size); |
| 48 | |
| 49 | return getFeaturesHandle(feat); |
| 50 | } |
| 51 | |
| 52 | af_err af_harris(af_features *out, const af_array in, |
| 53 | const unsigned max_corners, const float min_response, |
no test coverage detected