Struct opencv::features2d::SIFT
source · pub struct SIFT { /* private fields */ }
Expand description
Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) algorithm by D. Lowe Lowe04 .
Implementations§
source§impl SIFT
impl SIFT
sourcepub fn create(
nfeatures: i32,
n_octave_layers: i32,
contrast_threshold: f64,
edge_threshold: f64,
sigma: f64,
enable_precise_upscale: bool
) -> Result<Ptr<SIFT>>
pub fn create( nfeatures: i32, n_octave_layers: i32, contrast_threshold: f64, edge_threshold: f64, sigma: f64, enable_precise_upscale: bool ) -> Result<Ptr<SIFT>>
Parameters
-
nfeatures: The number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
-
nOctaveLayers: The number of layers in each octave. 3 is the value used in D. Lowe paper. The number of octaves is computed automatically from the image resolution.
-
contrastThreshold: The contrast threshold used to filter out weak features in semi-uniform (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
Note: The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set this argument to 0.09.
-
edgeThreshold: The threshold used to filter out edge-like features. Note that the its meaning is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are filtered out (more features are retained).
-
sigma: The sigma of the Gaussian applied to the input image at the octave #0. If your image is captured with a weak camera with soft lenses, you might want to reduce the number.
-
enable_precise_upscale: Whether to enable precise upscaling in the scale pyramid, which maps index
to
. This prevents localization bias. The option is disabled by default.
C++ default parameters
- nfeatures: 0
- n_octave_layers: 3
- contrast_threshold: 0.04
- edge_threshold: 10
- sigma: 1.6
- enable_precise_upscale: false
sourcepub fn create_def() -> Result<Ptr<SIFT>>
pub fn create_def() -> Result<Ptr<SIFT>>
Parameters
-
nfeatures: The number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
-
nOctaveLayers: The number of layers in each octave. 3 is the value used in D. Lowe paper. The number of octaves is computed automatically from the image resolution.
-
contrastThreshold: The contrast threshold used to filter out weak features in semi-uniform (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
Note: The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set this argument to 0.09.
-
edgeThreshold: The threshold used to filter out edge-like features. Note that the its meaning is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are filtered out (more features are retained).
-
sigma: The sigma of the Gaussian applied to the input image at the octave #0. If your image is captured with a weak camera with soft lenses, you might want to reduce the number.
-
enable_precise_upscale: Whether to enable precise upscaling in the scale pyramid, which maps index
to
. This prevents localization bias. The option is disabled by default.
Note
This alternative version of SIFT::create function uses the following default values for its arguments:
- nfeatures: 0
- n_octave_layers: 3
- contrast_threshold: 0.04
- edge_threshold: 10
- sigma: 1.6
- enable_precise_upscale: false
sourcepub fn create_1(
nfeatures: i32,
n_octave_layers: i32,
contrast_threshold: f64,
edge_threshold: f64,
sigma: f64,
descriptor_type: i32,
enable_precise_upscale: bool
) -> Result<Ptr<SIFT>>
pub fn create_1( nfeatures: i32, n_octave_layers: i32, contrast_threshold: f64, edge_threshold: f64, sigma: f64, descriptor_type: i32, enable_precise_upscale: bool ) -> Result<Ptr<SIFT>>
Create SIFT with specified descriptorType.
Parameters
-
nfeatures: The number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
-
nOctaveLayers: The number of layers in each octave. 3 is the value used in D. Lowe paper. The number of octaves is computed automatically from the image resolution.
-
contrastThreshold: The contrast threshold used to filter out weak features in semi-uniform (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
Note: The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set this argument to 0.09.
-
edgeThreshold: The threshold used to filter out edge-like features. Note that the its meaning is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are filtered out (more features are retained).
-
sigma: The sigma of the Gaussian applied to the input image at the octave #0. If your image is captured with a weak camera with soft lenses, you might want to reduce the number.
-
descriptorType: The type of descriptors. Only CV_32F and CV_8U are supported.
-
enable_precise_upscale: Whether to enable precise upscaling in the scale pyramid, which maps index
to
. This prevents localization bias. The option is disabled by default.
C++ default parameters
- enable_precise_upscale: false
sourcepub fn create_def_1(
nfeatures: i32,
n_octave_layers: i32,
contrast_threshold: f64,
edge_threshold: f64,
sigma: f64,
descriptor_type: i32
) -> Result<Ptr<SIFT>>
pub fn create_def_1( nfeatures: i32, n_octave_layers: i32, contrast_threshold: f64, edge_threshold: f64, sigma: f64, descriptor_type: i32 ) -> Result<Ptr<SIFT>>
Create SIFT with specified descriptorType.
Parameters
-
nfeatures: The number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
-
nOctaveLayers: The number of layers in each octave. 3 is the value used in D. Lowe paper. The number of octaves is computed automatically from the image resolution.
-
contrastThreshold: The contrast threshold used to filter out weak features in semi-uniform (low-contrast) regions. The larger the threshold, the less features are produced by the detector.
Note: The contrast threshold will be divided by nOctaveLayers when the filtering is applied. When nOctaveLayers is set to default and if you want to use the value used in D. Lowe paper, 0.03, set this argument to 0.09.
-
edgeThreshold: The threshold used to filter out edge-like features. Note that the its meaning is different from the contrastThreshold, i.e. the larger the edgeThreshold, the less features are filtered out (more features are retained).
-
sigma: The sigma of the Gaussian applied to the input image at the octave #0. If your image is captured with a weak camera with soft lenses, you might want to reduce the number.
-
descriptorType: The type of descriptors. Only CV_32F and CV_8U are supported.
-
enable_precise_upscale: Whether to enable precise upscaling in the scale pyramid, which maps index
to
. This prevents localization bias. The option is disabled by default.
Note
This alternative version of SIFT::create function uses the following default values for its arguments:
- enable_precise_upscale: false