@@ -84,12 +84,39 @@ AFAPI void orb(features& feat, array& desc, const array& image, const float fast
8484 \param[in] n_dist is the number of smallest distances to return (currently, only 1
8585 is supported)
8686
87+ \note Note: This is a special case of the \ref nearestNeighbour function with AF_SHD
88+ as dist_type
89+
8790 \ingroup cv_func_hamming_matcher
8891 */
8992AFAPI void hammingMatcher (array& idx, array& dist,
9093 const array& query, const array& train,
9194 const dim_t dist_dim=0 , const unsigned n_dist=1 );
9295
96+ /* *
97+ C++ Interface wrapper for Nearest Neighbour
98+
99+ \param[out] idx is an array of MxN size, where M is equal to the number of query
100+ features and N is equal to n_dist. The value at position IxJ indicates
101+ the index of the Jth smallest distance to the Ith query value in the
102+ train data array.
103+ the index of the Ith smallest distance of the Mth query.
104+ \param[out] dist is an array of MxN size, where M is equal to the number of query
105+ features and N is equal to n_dist. The value at position IxJ indicates
106+ the distance of the Jth smallest distance to the Ith query value in the
107+ train data array based on the dist_type chosen.
108+ \param[in] query is the array containing the data to be queried
109+ \param[in] train is the array containing the data used as training data
110+ \param[in] dist_dim indicates the dimension to analyze for distance (the dimension
111+ indicated here must be of equal length for both query and train arrays)
112+ \param[in] n_dist is the number of smallest distances to return (currently, only 1
113+ is supported)
114+ \param[in] dist_type is the distance computation type. Currently \ref AF_SAD (sum
115+ of absolute differences), \ref AF_SSD (sum of squared differences), and
116+ \ref AF_SHD (hamming distances) are supported.
117+
118+ \ingroup cv_func_nearest_neighbour
119+ */
93120AFAPI void nearestNeighbour (array& idx, array& dist,
94121 const array& query, const array& train,
95122 const dim_t dist_dim=0 , const unsigned n_dist=1 ,
@@ -195,6 +222,30 @@ extern "C" {
195222 const af_array query, const af_array train,
196223 const dim_t dist_dim, const unsigned n_dist);
197224
225+ /* *
226+ C Interface wrapper for Nearest Neighbour
227+
228+ \param[out] idx is an array of MxN size, where M is equal to the number of query
229+ features and N is equal to n_dist. The value at position IxJ indicates
230+ the index of the Jth smallest distance to the Ith query value in the
231+ train data array.
232+ the index of the Ith smallest distance of the Mth query.
233+ \param[out] dist is an array of MxN size, where M is equal to the number of query
234+ features and N is equal to n_dist. The value at position IxJ indicates
235+ the distance of the Jth smallest distance to the Ith query value in the
236+ train data array based on the dist_type chosen.
237+ \param[in] query is the array containing the data to be queried
238+ \param[in] train is the array containing the data used as training data
239+ \param[in] dist_dim indicates the dimension to analyze for distance (the dimension
240+ indicated here must be of equal length for both query and train arrays)
241+ \param[in] n_dist is the number of smallest distances to return (currently, only 1
242+ is supported)
243+ \param[in] dist_type is the distance computation type. Currently \ref AF_SAD (sum
244+ of absolute differences), \ref AF_SSD (sum of squared differences), and
245+ \ref AF_SHD (hamming distances) are supported.
246+
247+ \ingroup cv_func_nearest_neighbour
248+ */
198249 AFAPI af_err af_nearest_neighbour (af_array* idx, af_array* dist,
199250 const af_array query, const af_array train,
200251 const dim_t dist_dim, const unsigned n_dist,
0 commit comments