[−][src]Function arrayfire::harris
pub fn harris<T>(
input: &Array<T>,
max_corners: u32,
min_response: f32,
sigma: f32,
block_size: u32,
k_thr: f32
) -> Features where
T: HasAfEnum + RealFloating,
Harris corner detector.
Compute corners using the Harris corner detector approach. For each pixel, a small window is used to calculate the determinant and trace of such a window, from which a response is calculated. Pixels are considered corners if they are local maximas and have a high positive response.
Parameters
input
is the array containing a grayscale image (color images are not supported)max_corners
is the maximum number of corners to keep, only retains those with highest Harris responsesmin_response
is the minimum response in order for a corner to be retained, only used if max_corners = 0sigma
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)block_size
is square window size, the covariation matrix will be calculated to a square neighborhood of this size (must be >= 3 and <= 31)k_thr
is the Harris constant, usually set empirically to 0.04f (must be >= 0.01f)
Return Values
This function returns an object of struct Features containing Arrays for x and y coordinates and score, while array oreientation & size are set to 0 & 1, respectively, since harris doesn't compute that information