sift
- arrayfire.sift(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]
Extracts SIFT features and their descriptors from an image using the ArrayFire library.
Parameters
- imageArray
The input image as a 2D ArrayFire array on which SIFT features are to be detected.
- n_layersint, default=3
The number of layers per octave in the SIFT algorithm. The number of octaves is calculated based on the image size.
- 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. Higher values mean fewer features rejected based on edge-like characteristics.
- initial_sigmafloat, default=1.6
The initial sigma (standard deviation) for the Gaussian blur applied to the image before feature detection.
- dobule_inputbool, default=True
If True, the input image will be upscaled by a factor of 2 before processing, which helps in detecting features at larger scales.
- intensity_scalefloat, default=1.0 / 255
The scale factor applied to the image intensities. Typically used to normalize the image intensities.
- feature_ratiofloat, default=0.05
The maximum number of features to be detected, expressed as a ratio of the total number of image pixels.
Returns
- tuple[Features, Array]
A tuple containing: - An ArrayFire Features object encapsulating the detected keypoints. - An ArrayFire Array containing the corresponding descriptors for each keypoint.
The descriptors are 128-dimensional vectors describing the local appearance around each keypoint.
Note
The SIFT algorithm is a patented technique, and its use in commercial applications may require licensing. In academic and research settings, it remains a popular choice due to its robustness and reliability.