A high-performance general-purpose compute library

SIFT feature detector and descriptor extractor. More...

Functions

AFAPI void sift (features &feat, array &desc, const array &in, const unsigned n_layers=3, const float contrast_thr=0.04f, const float edge_thr=10.f, const float init_sigma=1.6f, const bool double_input=true, const float intensity_scale=0.00390625f, const float feature_ratio=0.05f)
 C++ Interface for SIFT feature detector and descriptor. More...
 
AFAPI void gloh (features &feat, array &desc, const array &in, const unsigned n_layers=3, const float contrast_thr=0.04f, const float edge_thr=10.f, const float init_sigma=1.6f, const bool double_input=true, const float intensity_scale=0.00390625f, const float feature_ratio=0.05f)
 C++ Interface for SIFT feature detector and GLOH descriptor. More...
 
AFAPI af_err af_sift (af_features *feat, af_array *desc, const af_array in, const unsigned n_layers, const float contrast_thr, const float edge_thr, const float init_sigma, const bool double_input, const float intensity_scale, const float feature_ratio)
 C++ Interface for SIFT feature detector and descriptor. More...
 
AFAPI af_err af_gloh (af_features *feat, af_array *desc, const af_array in, const unsigned n_layers, const float contrast_thr, const float edge_thr, const float init_sigma, const bool double_input, const float intensity_scale, const float feature_ratio)
 C++ Interface for SIFT feature detector and GLOH descriptor. More...
 

Detailed Description

SIFT feature detector and descriptor extractor.

Detects features and extract descriptors using the Scale Invariant Feature Transform (SIFT), by David Lowe.

Lowe, D. G., "Distinctive Image Features from Scale-Invariant Keypoints", International Journal of Computer Vision, 60, 2, pp. 91-110, 2004.


Function Documentation

◆ af_gloh()

AFAPI af_err af_gloh ( af_features feat,
af_array desc,
const af_array  in,
const unsigned  n_layers,
const float  contrast_thr,
const float  edge_thr,
const float  init_sigma,
const bool  double_input,
const float  intensity_scale,
const float  feature_ratio 
)

C++ Interface for SIFT feature detector and GLOH descriptor.

Parameters
[out]feataf_features object composed of arrays for x and y coordinates, score, orientation and size of selected features
[out]descNx272 array containing extracted GLOH descriptors, where N is the number of features found by SIFT
[in]inarray containing a grayscale image (color images are not supported)
[in]n_layersnumber of layers per octave, the number of octaves is computed automatically according to the input image dimensions, the original SIFT paper suggests 3
[in]contrast_thrthreshold used to filter out features that have low contrast, the original SIFT paper suggests 0.04
[in]edge_thrthreshold used to filter out features that are too edge-like, the original SIFT paper suggests 10.0
[in]init_sigmathe sigma value used to filter the input image at the first octave, the original SIFT paper suggests 1.6
[in]double_inputif true, the input image dimensions will be doubled and the doubled image will be used for the first octave
[in]intensity_scalethe inverse of the difference between the minimum and maximum grayscale intensity value, e.g.: if the ranges are 0-256, the proper intensity_scale value is 1/256, if the ranges are 0-1, the proper intensity-scale value is 1/1
[in]feature_ratiomaximum ratio of features to detect, the maximum number of features is calculated by feature_ratio * in.elements(). The maximum number of features is not based on the score, instead, features detected after the limit is reached are discarded

◆ af_sift()

AFAPI af_err af_sift ( af_features feat,
af_array desc,
const af_array  in,
const unsigned  n_layers,
const float  contrast_thr,
const float  edge_thr,
const float  init_sigma,
const bool  double_input,
const float  intensity_scale,
const float  feature_ratio 
)

C++ Interface for SIFT feature detector and descriptor.

Parameters
[out]feataf_features object composed of arrays for x and y coordinates, score, orientation and size of selected features
[out]descNx128 array containing extracted descriptors, where N is the number of features found by SIFT
[in]inarray containing a grayscale image (color images are not supported)
[in]n_layersnumber of layers per octave, the number of octaves is computed automatically according to the input image dimensions, the original SIFT paper suggests 3
[in]contrast_thrthreshold used to filter out features that have low contrast, the original SIFT paper suggests 0.04
[in]edge_thrthreshold used to filter out features that are too edge-like, the original SIFT paper suggests 10.0
[in]init_sigmathe sigma value used to filter the input image at the first octave, the original SIFT paper suggests 1.6
[in]double_inputif true, the input image dimensions will be doubled and the doubled image will be used for the first octave
[in]intensity_scalethe inverse of the difference between the minimum and maximum grayscale intensity value, e.g.: if the ranges are 0-256, the proper intensity_scale value is 1/256, if the ranges are 0-1, the proper intensity-scale value is 1/1
[in]feature_ratiomaximum ratio of features to detect, the maximum number of features is calculated by feature_ratio * in.elements(). The maximum number of features is not based on the score, instead, features detected after the limit is reached are discarded

◆ gloh()

AFAPI void gloh ( features feat,
array desc,
const array in,
const unsigned  n_layers = 3,
const float  contrast_thr = 0.04f,
const float  edge_thr = 10.f,
const float  init_sigma = 1.6f,
const bool  double_input = true,
const float  intensity_scale = 0.00390625f,
const float  feature_ratio = 0.05f 
)

C++ Interface for SIFT feature detector and GLOH descriptor.

Parameters
[out]featfeatures object composed of arrays for x and y coordinates, score, orientation and size of selected features
[out]descNx272 array containing extracted GLOH descriptors, where N is the number of features found by SIFT
[in]inarray containing a grayscale image (color images are not supported)
[in]n_layersnumber of layers per octave, the number of octaves is computed automatically according to the input image dimensions, the original SIFT paper suggests 3
[in]contrast_thrthreshold used to filter out features that have low contrast, the original SIFT paper suggests 0.04
[in]edge_thrthreshold used to filter out features that are too edge-like, the original SIFT paper suggests 10.0
[in]init_sigmathe sigma value used to filter the input image at the first octave, the original SIFT paper suggests 1.6
[in]double_inputif true, the input image dimensions will be doubled and the doubled image will be used for the first octave
[in]intensity_scalethe inverse of the difference between the minimum and maximum grayscale intensity value, e.g.: if the ranges are 0-256, the proper intensity_scale value is 1/256, if the ranges are 0-1, the proper intensity-scale value is 1/1
[in]feature_ratiomaximum ratio of features to detect, the maximum number of features is calculated by feature_ratio * in.elements(). The maximum number of features is not based on the score, instead, features detected after the limit is reached are discarded

◆ sift()

AFAPI void sift ( features feat,
array desc,
const array in,
const unsigned  n_layers = 3,
const float  contrast_thr = 0.04f,
const float  edge_thr = 10.f,
const float  init_sigma = 1.6f,
const bool  double_input = true,
const float  intensity_scale = 0.00390625f,
const float  feature_ratio = 0.05f 
)

C++ Interface for SIFT feature detector and descriptor.

Parameters
[out]featfeatures object composed of arrays for x and y coordinates, score, orientation and size of selected features
[out]descNx128 array containing extracted descriptors, where N is the number of features found by SIFT
[in]inarray containing a grayscale image (color images are not supported)
[in]n_layersnumber of layers per octave, the number of octaves is computed automatically according to the input image dimensions, the original SIFT paper suggests 3
[in]contrast_thrthreshold used to filter out features that have low contrast, the original SIFT paper suggests 0.04
[in]edge_thrthreshold used to filter out features that are too edge-like, the original SIFT paper suggests 10.0
[in]init_sigmathe sigma value used to filter the input image at the first octave, the original SIFT paper suggests 1.6
[in]double_inputif true, the input image dimensions will be doubled and the doubled image will be used for the first octave
[in]intensity_scalethe inverse of the difference between the minimum and maximum grayscale intensity value, e.g.: if the ranges are 0-256, the proper intensity_scale value is 1/256, if the ranges are 0-1, the proper intensity-scale value is 1/1
[in]feature_ratiomaximum ratio of features to detect, the maximum number of features is calculated by feature_ratio * in.elements(). The maximum number of features is not based on the score, instead, features detected after the limit is reached are discarded