harris
- arrayfire.harris(image: Array, /, max_corners: int = 500, min_response: float = 100000.0, sigma: float = 1.0, block_size: int = 0, k_threshold: float = 0) Features
Detects corners in an image using the Harris corner detection algorithm.
Parameters
- imageArray
The input image as a 2D ArrayFire array. The image should be grayscale for optimal results.
- max_cornersint, default=500
The maximum number of corners to return. If there are more corners than max_corners, only the strongest ones (as determined by the Harris response) are returned.
- min_responsefloat, default=1e5
The minimum response value for a corner to be considered. This value helps to filter out weak corners.
- sigmafloat, default=1.0
The standard deviation of the Gaussian filter applied to the input image. This parameter is used only when block_size is 0. Valid ranges are 0.5 to 5.0.
- block_sizeint, default=0
The size of the neighborhood considered for corner detection. A larger value considers a larger neighborhood. If set to 0, a circular window based on sigma is used instead.
- k_thresholdfloat, default=0.04
The Harris detector free parameter in the equation. Common values are between 0.04 to 0.06.
Returns
- Features
An ArrayFire Features object containing the detected corners’ locations and their Harris response scores. Orientation and size are not computed.
Note
The Harris corner detector is particularly sensitive to sigma, block_size, and k_threshold parameters, which should be chosen based on the specific requirements of the application and the characteristics of the input images. It’s recommended to adjust these parameters to balance detection sensitivity and computational efficiency.