You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Compute corners using the Harris corner detector approach. For each pixel, a small window is
189
+
/// used to calculate the determinant and trace of such a window, from which a response is
190
+
/// calculated. Pixels are considered corners if they are local maximas and have a high positive
191
+
/// response.
192
+
///
193
+
/// # Parameters
194
+
///
195
+
/// - `input` is the array containing a grayscale image (color images are not supported)
196
+
/// - `max_corners` is the maximum number of corners to keep, only retains those with highest Harris responses
197
+
/// - `min_response` is the minimum response in order for a corner to be retained, only used if max_corners = 0
198
+
/// - `sigma` is the standard deviation of a circular window (its dimensions will be calculated according to the standard deviation), the covariation matrix will be calculated to a circular neighborhood of this standard deviation (only used when block_size == 0, must be >= 0.5f and <= 5.0f)
199
+
/// - `block_size` is square window size, the covariation matrix will be calculated to a square neighborhood of this size (must be >= 3 and <= 31)
200
+
/// - `k_thr` is the Harris constant, usually set empirically to 0.04f (must be >= 0.01f)
201
+
///
202
+
/// # Return Values
203
+
///
204
+
/// This function returns an object of struct [Features](./struct.Features.html) containing Arrays
205
+
/// for x and y coordinates and score, while array oreientation & size are set to 0 & 1,
206
+
/// respectively, since harris doesn't compute that information
/// Calculates nearest distances between two 2-dimensional arrays containing features based on the
311
+
/// type of distance computation chosen. Currently, AF_SAD (sum of absolute differences), AF_SSD
312
+
/// (sum of squared differences) and AF_SHD (hamming distance) are supported. One of the arrays
313
+
/// containing the training data and the other the query data. One of the dimensions of the both
314
+
/// arrays must be equal among them, identifying the length of each feature. The other dimension
315
+
/// indicates the total number of features in each of the training and query arrays. Two
316
+
/// 1-dimensional arrays are created as results, one containg the smallest N distances of the query
317
+
/// array and another containing the indices of these distances in the training array. The resulting
318
+
/// 1-dimensional arrays have length equal to the number of features contained in the query array.
319
+
///
320
+
/// # Parameters
321
+
///
322
+
/// - `query` is the array containing the data to be queried
323
+
/// - `train` is the array containing the data used as training data
324
+
/// - `dist_dim` indicates the dimension to analyze for distance (the dimension indicated here must be of equal length for both query and train arrays)
325
+
/// - `n_dist` is the number of smallest distances to return (currently, only 1 is supported)
326
+
/// - `dist_type` is the distance computation type. Currently [`MatchType::SAD`](./enum.MatchType.html), [`MatchType::SSD`](./enum.MatchType.html), and [`MatchType::SHD`](./enum.MatchType.html) are supported.
327
+
///
328
+
/// # Return Values
329
+
///
330
+
/// A tuple of Arrays.
331
+
///
332
+
/// The first Array is is an array of MxN size, where M is equal to the number of query features
333
+
/// and N is equal to `n_dist`. The value at position IxJ indicates the index of the Jth smallest
334
+
/// distance to the Ith query value in the train data array. the index of the Ith smallest distance
335
+
/// of the Mth query.
336
+
///
337
+
/// The second Array is is an array of MxN size, where M is equal to the number of query features
338
+
/// and N is equal to `n_dist`. The value at position IxJ indicates the distance of the Jth smallest
339
+
/// distance to the Ith query value in the train data array based on the `dist_type` chosen.
0 commit comments