OpenCV for Unity  2.6.0
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.9.0/index.html ) for the details of the argument of the method.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OpenCVForUnity.Features2dModule.SIFT Class Reference

Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) algorithm by D. Lowe [Lowe04] . More...

Inheritance diagram for OpenCVForUnity.Features2dModule.SIFT:
OpenCVForUnity.Features2dModule.Feature2D OpenCVForUnity.CoreModule.Algorithm OpenCVForUnity.DisposableOpenCVObject OpenCVForUnity.DisposableObject

Public Member Functions

override string getDefaultName ()
 
void setNFeatures (int maxFeatures)
 
int getNFeatures ()
 
void setNOctaveLayers (int nOctaveLayers)
 
int getNOctaveLayers ()
 
void setContrastThreshold (double contrastThreshold)
 
double getContrastThreshold ()
 
void setEdgeThreshold (double edgeThreshold)
 
double getEdgeThreshold ()
 
void setSigma (double sigma)
 
double getSigma ()
 
- Public Member Functions inherited from OpenCVForUnity.Features2dModule.Feature2D
void detect (Mat image, MatOfKeyPoint keypoints, Mat mask)
 Detects keypoints in an image (first variant) or image set (second variant). More...
 
void detect (Mat image, MatOfKeyPoint keypoints)
 Detects keypoints in an image (first variant) or image set (second variant). More...
 
void detect (List< Mat > images, List< MatOfKeyPoint > keypoints, List< Mat > masks)
 
void detect (List< Mat > images, List< MatOfKeyPoint > keypoints)
 
void compute (Mat image, MatOfKeyPoint keypoints, Mat descriptors)
 Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). More...
 
void compute (List< Mat > images, List< MatOfKeyPoint > keypoints, List< Mat > descriptors)
 
void detectAndCompute (Mat image, Mat mask, MatOfKeyPoint keypoints, Mat descriptors, bool useProvidedKeypoints)
 
void detectAndCompute (Mat image, Mat mask, MatOfKeyPoint keypoints, Mat descriptors)
 
int descriptorSize ()
 
int descriptorType ()
 
int defaultNorm ()
 
void write (string fileName)
 
void read (string fileName)
 
override bool empty ()
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
- Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
IntPtr getNativeObjAddr ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
void save (string filename)
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Static Public Member Functions

static new SIFT __fromPtr__ (IntPtr addr)
 
static SIFT create (int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, bool enable_precise_upscale)
 
static SIFT create (int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma)
 
static SIFT create (int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold)
 
static SIFT create (int nfeatures, int nOctaveLayers, double contrastThreshold)
 
static SIFT create (int nfeatures, int nOctaveLayers)
 
static SIFT create (int nfeatures)
 
static SIFT create ()
 
static SIFT create (int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType, bool enable_precise_upscale)
 Create SIFT with specified descriptorType. More...
 
static SIFT create (int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType)
 Create SIFT with specified descriptorType. More...
 
- Static Public Member Functions inherited from OpenCVForUnity.Features2dModule.Feature2D
static new Feature2D __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
static Algorithm __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 
 DisposableOpenCVObject (IntPtr ptr)
 
 DisposableOpenCVObject (bool isEnabledDispose)
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Class for extracting keypoints and computing descriptors using the Scale Invariant Feature Transform (SIFT) algorithm by D. Lowe [Lowe04] .

Member Function Documentation

◆ __fromPtr__()

static new SIFT OpenCVForUnity.Features2dModule.SIFT.__fromPtr__ ( IntPtr  addr)
static

◆ create() [1/9]

static SIFT OpenCVForUnity.Features2dModule.SIFT.create ( int  nfeatures,
int  nOctaveLayers,
double  contrastThreshold,
double  edgeThreshold,
double  sigma,
bool  enable_precise_upscale 
)
static
Parameters
nfeaturesThe number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
nOctaveLayersThe 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.
contrastThresholdThe 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.
Parameters
edgeThresholdThe 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).
sigmaThe 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_upscaleWhether to enable precise upscaling in the scale pyramid, which maps index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option is disabled by default.

◆ create() [2/9]

static SIFT OpenCVForUnity.Features2dModule.SIFT.create ( int  nfeatures,
int  nOctaveLayers,
double  contrastThreshold,
double  edgeThreshold,
double  sigma 
)
static
Parameters
nfeaturesThe number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
nOctaveLayersThe 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.
contrastThresholdThe 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.
Parameters
edgeThresholdThe 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).
sigmaThe 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_upscaleWhether to enable precise upscaling in the scale pyramid, which maps index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option is disabled by default.

◆ create() [3/9]

static SIFT OpenCVForUnity.Features2dModule.SIFT.create ( int  nfeatures,
int  nOctaveLayers,
double  contrastThreshold,
double  edgeThreshold 
)
static
Parameters
nfeaturesThe number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
nOctaveLayersThe 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.
contrastThresholdThe 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.
Parameters
edgeThresholdThe 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).
sigmaThe 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_upscaleWhether to enable precise upscaling in the scale pyramid, which maps index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option is disabled by default.

◆ create() [4/9]

static SIFT OpenCVForUnity.Features2dModule.SIFT.create ( int  nfeatures,
int  nOctaveLayers,
double  contrastThreshold 
)
static
Parameters
nfeaturesThe number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
nOctaveLayersThe 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.
contrastThresholdThe 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.
Parameters
edgeThresholdThe 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).
sigmaThe 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_upscaleWhether to enable precise upscaling in the scale pyramid, which maps index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option is disabled by default.

◆ create() [5/9]

static SIFT OpenCVForUnity.Features2dModule.SIFT.create ( int  nfeatures,
int  nOctaveLayers 
)
static
Parameters
nfeaturesThe number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
nOctaveLayersThe 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.
contrastThresholdThe 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.
Parameters
edgeThresholdThe 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).
sigmaThe 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_upscaleWhether to enable precise upscaling in the scale pyramid, which maps index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option is disabled by default.

◆ create() [6/9]

static SIFT OpenCVForUnity.Features2dModule.SIFT.create ( int  nfeatures)
static
Parameters
nfeaturesThe number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
nOctaveLayersThe 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.
contrastThresholdThe 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.
Parameters
edgeThresholdThe 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).
sigmaThe 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_upscaleWhether to enable precise upscaling in the scale pyramid, which maps index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option is disabled by default.

◆ create() [7/9]

static SIFT OpenCVForUnity.Features2dModule.SIFT.create ( )
static
Parameters
nfeaturesThe number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
nOctaveLayersThe 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.
contrastThresholdThe 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.
Parameters
edgeThresholdThe 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).
sigmaThe 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_upscaleWhether to enable precise upscaling in the scale pyramid, which maps index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option is disabled by default.

◆ create() [8/9]

static SIFT OpenCVForUnity.Features2dModule.SIFT.create ( int  nfeatures,
int  nOctaveLayers,
double  contrastThreshold,
double  edgeThreshold,
double  sigma,
int  descriptorType,
bool  enable_precise_upscale 
)
static

Create SIFT with specified descriptorType.

Parameters
nfeaturesThe number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
nOctaveLayersThe 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.
contrastThresholdThe 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.
Parameters
edgeThresholdThe 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).
sigmaThe 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.
descriptorTypeThe type of descriptors. Only CV_32F and CV_8U are supported.
enable_precise_upscaleWhether to enable precise upscaling in the scale pyramid, which maps index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option is disabled by default.

◆ create() [9/9]

static SIFT OpenCVForUnity.Features2dModule.SIFT.create ( int  nfeatures,
int  nOctaveLayers,
double  contrastThreshold,
double  edgeThreshold,
double  sigma,
int  descriptorType 
)
static

Create SIFT with specified descriptorType.

Parameters
nfeaturesThe number of best features to retain. The features are ranked by their scores (measured in SIFT algorithm as the local contrast)
nOctaveLayersThe 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.
contrastThresholdThe 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.
Parameters
edgeThresholdThe 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).
sigmaThe 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.
descriptorTypeThe type of descriptors. Only CV_32F and CV_8U are supported.
enable_precise_upscaleWhether to enable precise upscaling in the scale pyramid, which maps index \(\texttt{x}\) to \(\texttt{2x}\). This prevents localization bias. The option is disabled by default.

◆ Dispose()

override void OpenCVForUnity.Features2dModule.SIFT.Dispose ( bool  disposing)
protectedvirtual

◆ getContrastThreshold()

double OpenCVForUnity.Features2dModule.SIFT.getContrastThreshold ( )

◆ getDefaultName()

override string OpenCVForUnity.Features2dModule.SIFT.getDefaultName ( )
virtual

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.

Reimplemented from OpenCVForUnity.Features2dModule.Feature2D.

◆ getEdgeThreshold()

double OpenCVForUnity.Features2dModule.SIFT.getEdgeThreshold ( )

◆ getNFeatures()

int OpenCVForUnity.Features2dModule.SIFT.getNFeatures ( )

◆ getNOctaveLayers()

int OpenCVForUnity.Features2dModule.SIFT.getNOctaveLayers ( )

◆ getSigma()

double OpenCVForUnity.Features2dModule.SIFT.getSigma ( )

◆ setContrastThreshold()

void OpenCVForUnity.Features2dModule.SIFT.setContrastThreshold ( double  contrastThreshold)

◆ setEdgeThreshold()

void OpenCVForUnity.Features2dModule.SIFT.setEdgeThreshold ( double  edgeThreshold)

◆ setNFeatures()

void OpenCVForUnity.Features2dModule.SIFT.setNFeatures ( int  maxFeatures)

◆ setNOctaveLayers()

void OpenCVForUnity.Features2dModule.SIFT.setNOctaveLayers ( int  nOctaveLayers)

◆ setSigma()

void OpenCVForUnity.Features2dModule.SIFT.setSigma ( double  sigma)

The documentation for this class was generated from the following file: