gloh
- arrayfire.gloh(image: Array, /, n_layers: int = 3, contrast_threshold: float = 0.04, edge_threshold: float = 10.0, initial_sigma: float = 1.6, dobule_input: bool = True, intensity_scale: float = 0.00392156862745098, feature_ratio: float = 0.05) tuple[Features, Array]
Implements the GLOH (Gradient Location and Orientation Histogram) feature detection and descriptor extraction for images.
Parameters
- imageArray
A 2D ArrayFire array representing the input image.
- n_layersint, default: 3
The number of layers per octave. The number of octaves is calculated based on the image dimensions and initial_sigma.
- contrast_thresholdfloat, default: 0.04
The contrast threshold used to filter out weak features in low-contrast regions of the image.
- edge_thresholdfloat, default: 10.0
The edge threshold used to filter out edge-like features to ensure feature points are from corners.
- initial_sigmafloat, default: 1.6
The initial sigma (scale) for the Gaussian blur applied to the image at the first layer.
- dobule_inputbool, default: True
If True, the image size is doubled before processing to detect features at higher scales.
- intensity_scalefloat, default: 1.0 / 255
The scale factor applied to the image intensities, typically used to normalize the pixel values.
- feature_ratiofloat, default: 0.05
The ratio of the total number of pixels in the image used to limit the number of features detected.
Returns
- tuple[Features, Array]
A tuple containing two elements: - Features: An object holding the detected features, including their locations and scales. - Array: An ArrayFire array containing the GLOH descriptors for the detected features, with each descriptor
having 272 elements.
Note
The gloh function is particularly effective for object recognition and image matching tasks.
The choice of parameters can significantly impact the number and quality of features detected and described.