[−][src]Struct opencv::features2d::SIFT
Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) algorithm by D. Lowe Lowe04 .
Implementations
impl SIFT
[src]
pub fn as_raw_SIFT(&self) -> *const c_void
[src]
pub fn as_raw_mut_SIFT(&mut self) -> *mut c_void
[src]
impl SIFT
[src]
pub fn create(
nfeatures: i32,
n_octave_layers: i32,
contrast_threshold: f64,
edge_threshold: f64,
sigma: f64
) -> Result<Ptr<SIFT>>
[src]
nfeatures: i32,
n_octave_layers: i32,
contrast_threshold: f64,
edge_threshold: f64,
sigma: f64
) -> 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.
C++ default parameters
- nfeatures: 0
- n_octave_layers: 3
- contrast_threshold: 0.04
- edge_threshold: 10
- sigma: 1.6
pub fn create_1(
nfeatures: i32,
n_octave_layers: i32,
contrast_threshold: f64,
edge_threshold: f64,
sigma: f64,
descriptor_type: i32
) -> Result<Ptr<SIFT>>
[src]
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.
Trait Implementations
impl AlgorithmTrait for SIFT
[src]
fn as_raw_Algorithm(&self) -> *const c_void
[src]
fn as_raw_mut_Algorithm(&mut self) -> *mut c_void
[src]
fn clear(&mut self) -> Result<()>
[src]
fn write(&self, fs: &mut FileStorage) -> Result<()>
[src]
fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
[src]
fn read(&mut self, fn_: &FileNode) -> Result<()>
[src]
fn empty(&self) -> Result<bool>
[src]
fn save(&self, filename: &str) -> Result<()>
[src]
fn get_default_name(&self) -> Result<String>
[src]
impl Boxed for SIFT
[src]
unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
fn into_raw(self) -> *mut c_void
[src]
fn as_raw(&self) -> *const c_void
[src]
fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Drop for SIFT
[src]
impl Feature2DTrait for SIFT
[src]
fn as_raw_Feature2D(&self) -> *const c_void
[src]
fn as_raw_mut_Feature2D(&mut self) -> *mut c_void
[src]
fn detect(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
mask: &dyn ToInputArray
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
mask: &dyn ToInputArray
) -> Result<()>
fn detect_multiple(
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
masks: &dyn ToInputArray
) -> Result<()>
[src]
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
masks: &dyn ToInputArray
) -> Result<()>
fn compute(
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
fn compute_multiple(
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
[src]
&mut self,
images: &dyn ToInputArray,
keypoints: &mut Vector<Vector<KeyPoint>>,
descriptors: &mut dyn ToOutputArray
) -> Result<()>
fn detect_and_compute(
&mut self,
image: &dyn ToInputArray,
mask: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray,
use_provided_keypoints: bool
) -> Result<()>
[src]
&mut self,
image: &dyn ToInputArray,
mask: &dyn ToInputArray,
keypoints: &mut Vector<KeyPoint>,
descriptors: &mut dyn ToOutputArray,
use_provided_keypoints: bool
) -> Result<()>
fn descriptor_size(&self) -> Result<i32>
[src]
fn descriptor_type(&self) -> Result<i32>
[src]
fn default_norm(&self) -> Result<i32>
[src]
fn write(&self, file_name: &str) -> Result<()>
[src]
fn read(&mut self, file_name: &str) -> Result<()>
[src]
fn write_1(&self, unnamed: &mut FileStorage) -> Result<()>
[src]
fn read_1(&mut self, unnamed: &FileNode) -> Result<()>
[src]
fn empty(&self) -> Result<bool>
[src]
fn get_default_name(&self) -> Result<String>
[src]
fn write_2(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
[src]
impl SIFTTrait for SIFT
[src]
fn as_raw_SIFT(&self) -> *const c_void
[src]
fn as_raw_mut_SIFT(&mut self) -> *mut c_void
[src]
fn get_default_name(&self) -> Result<String>
[src]
impl Send for SIFT
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,