OpenCV 5.0.0
Open Source Computer Vision
読み込み中...
検索中...
見つかりません
🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。

Scale Invariant Feature Transform (SIFT) アルゴリズムを用いてキーポイントを抽出し記述子を計算するクラス。D. Lowe による [180]続きを読む...

#include <opencv2/features.hpp>

Collaboration diagram for cv::SIFT:

公開メンバ関数

virtual double getContrastThreshold () const =0
 
virtual String getDefaultName () const CV_OVERRIDE
 
virtual double getEdgeThreshold () const =0
 
virtual int getNFeatures () const =0
 
virtual int getNOctaveLayers () const =0
 
virtual double getSigma () const =0
 
virtual void setContrastThreshold (double contrastThreshold)=0
 
virtual void setEdgeThreshold (double edgeThreshold)=0
 
virtual void setNFeatures (int maxFeatures)=0
 
virtual void setNOctaveLayers (int nOctaveLayers)=0
 
virtual void setSigma (double sigma)=0
 
- Public Member Functions inherited from cv::Feature2D
virtual ~Feature2D ()
 
virtual void compute (InputArray image, std::vector< KeyPoint > &keypoints, OutputArray descriptors)
 画像(1番目のバリアント)または画像集合(2番目のバリアント)で検出されたキーポイントの集合について記述子を計算する。
 
virtual void compute (InputArrayOfArrays images, std::vector< std::vector< KeyPoint > > &keypoints, OutputArrayOfArrays descriptors)
 
virtual int defaultNorm () const
 
virtual int descriptorSize () const
 
virtual int descriptorType () const
 
virtual void detect (InputArray image, std::vector< KeyPoint > &keypoints, InputArray mask=noArray())
 画像(1番目のバリアント)または画像集合(2番目のバリアント)からキーポイントを検出する。
 
virtual void detect (InputArrayOfArrays images, std::vector< std::vector< KeyPoint > > &keypoints, InputArrayOfArrays masks=noArray())
 
virtual void detectAndCompute (InputArray image, InputArray mask, std::vector< KeyPoint > &keypoints, OutputArray descriptors, bool useProvidedKeypoints=false)
 
virtual bool empty () const CV_OVERRIDE
 検出器オブジェクトが空の場合に true を返す。
 
virtual void read (const FileNode &) CV_OVERRIDE
 ファイルストレージからアルゴリズムの引数を読み込む。
 
void read (const String &fileName)
 
void write (const String &fileName) const
 
virtual void write (FileStorage &) const CV_OVERRIDE
 アルゴリズムの引数をファイルストレージに保存する。
 
void write (FileStorage &fs, const String &name) const
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 アルゴリズムの状態をクリアする。
 
virtual void save (const String &filename) const
 
void write (FileStorage &fs, const String &name) const
 

静的公開メンバ関数

static Ptr< SIFTcreate (int nfeatures, int nOctaveLayers, double contrastThreshold, double edgeThreshold, double sigma, int descriptorType, bool enable_precise_upscale=false)
 指定した descriptorType で SIFT を生成する。
 
static Ptr< SIFTcreate (int nfeatures=0, int nOctaveLayers=3, double contrastThreshold=0.04, double edgeThreshold=10, double sigma=1.6, bool enable_precise_upscale=false)
 
- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tpload (const String &filename, const String &objname=String())
 ファイルからアルゴリズムを読み込む。
 
template<typename _Tp >
static Ptr< _TploadFromString (const String &strModel, const String &objname=String())
 文字列からアルゴリズムを読み込む。
 
template<typename _Tp >
static Ptr< _Tpread (const FileNode &fn)
 ファイルノードからアルゴリズムを読み込む。
 

Additional Inherited Members

- Protected Member Functions inherited from cv::Algorithm
void writeFormat (FileStorage &fs) const
 

詳細説明

Scale Invariant Feature Transform (SIFT) アルゴリズムを用いてキーポイントを抽出し記述子を計算するクラス。D. Lowe による [180]

メンバ関数詳解

◆ create() [1/2]

static Ptr< SIFT > cv::SIFT::create ( int nfeatures,
int nOctaveLayers,
double contrastThreshold,
double edgeThreshold,
double sigma,
int descriptorType,
bool enable_precise_upscale = false )
static
Python:
cv.SIFT.create([, nfeatures[, nOctaveLayers[, contrastThreshold[, edgeThreshold[, sigma[, enable_precise_upscale]]]]]]) -> retval
cv.SIFT.create(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma, descriptorType[, enable_precise_upscale]) -> retval
cv.SIFT_create([, nfeatures[, nOctaveLayers[, contrastThreshold[, edgeThreshold[, sigma[, enable_precise_upscale]]]]]]) -> retval
cv.SIFT_create(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma, descriptorType[, enable_precise_upscale]) -> retval

指定した descriptorType で SIFT を生成する。

引数
nfeatures保持する最良特徴の数。特徴は (SIFT アルゴリズムにおける局所コントラストとして測定される) スコアによって順位付けされる
nOctaveLayers各オクターブ内のレイヤー数。3 は D. Lowe の論文で使用されている値である。オクターブ数は画像の解像度から自動的に計算される。
contrastThreshold準一様な (低コントラストの) 領域で弱い特徴をフィルタリングして除外するために使用するコントラストのしきい値。しきい値が大きいほど、検出器が生成する特徴は少なくなる。
覚え書き
フィルタリングを適用する際、コントラストのしきい値は nOctaveLayers で除算される。nOctaveLayers がデフォルトに設定されており、D. Lowe の論文で使用されている値 0.03 を使いたい場合は、この引数を 0.09 に設定する。
引数
edgeThresholdエッジ状の特徴をフィルタリングして除外するために使用するしきい値。その意味は contrastThreshold とは異なる点に注意。すなわち、edgeThreshold が大きいほど、除外される特徴は少なくなる (より多くの特徴が保持される)。
sigmaオクターブ #0 において入力画像に適用されるガウシアンのシグマ。柔らかいレンズを備えた性能の低いカメラで撮影された画像の場合、この値を小さくするとよい。
descriptorType記述子の型。CV_32F と CV_8U のみがサポートされている。
enable_precise_upscaleスケールピラミッドにおいて、インデックス \(\texttt{x}\) を \(\texttt{2x}\) に対応付ける精密なアップスケーリングを有効にするかどうか。これにより位置の偏りが防止される。このオプションはデフォルトでは無効である。

◆ create() [2/2]

static Ptr< SIFT > cv::SIFT::create ( int nfeatures = 0,
int nOctaveLayers = 3,
double contrastThreshold = 0.04,
double edgeThreshold = 10,
double sigma = 1.6,
bool enable_precise_upscale = false )
static
Python:
cv.SIFT.create([, nfeatures[, nOctaveLayers[, contrastThreshold[, edgeThreshold[, sigma[, enable_precise_upscale]]]]]]) -> retval
cv.SIFT.create(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma, descriptorType[, enable_precise_upscale]) -> retval
cv.SIFT_create([, nfeatures[, nOctaveLayers[, contrastThreshold[, edgeThreshold[, sigma[, enable_precise_upscale]]]]]]) -> retval
cv.SIFT_create(nfeatures, nOctaveLayers, contrastThreshold, edgeThreshold, sigma, descriptorType[, enable_precise_upscale]) -> retval
引数
nfeatures保持する最良特徴の数。特徴は (SIFT アルゴリズムにおける局所コントラストとして測定される) スコアによって順位付けされる
nOctaveLayers各オクターブ内のレイヤー数。3 は D. Lowe の論文で使用されている値である。オクターブ数は画像の解像度から自動的に計算される。
contrastThreshold準一様な (低コントラストの) 領域で弱い特徴をフィルタリングして除外するために使用するコントラストのしきい値。しきい値が大きいほど、検出器が生成する特徴は少なくなる。
覚え書き
フィルタリングを適用する際、コントラストのしきい値は nOctaveLayers で除算される。nOctaveLayers がデフォルトに設定されており、D. Lowe の論文で使用されている値 0.03 を使いたい場合は、この引数を 0.09 に設定する。
引数
edgeThresholdエッジ状の特徴をフィルタリングして除外するために使用するしきい値。その意味は contrastThreshold とは異なる点に注意。すなわち、edgeThreshold が大きいほど、除外される特徴は少なくなる (より多くの特徴が保持される)。
sigmaオクターブ #0 において入力画像に適用されるガウシアンのシグマ。柔らかいレンズを備えた性能の低いカメラで撮影された画像の場合、この値を小さくするとよい。
enable_precise_upscaleスケールピラミッドにおいて、インデックス \(\texttt{x}\) を \(\texttt{2x}\) に対応付ける精密なアップスケーリングを有効にするかどうか。これにより位置の偏りが防止される。このオプションはデフォルトでは無効である。

◆ getContrastThreshold()

virtual double cv::SIFT::getContrastThreshold ( ) const
pure virtual
Python:
cv.SIFT.getContrastThreshold() -> retval

◆ getDefaultName()

virtual String cv::SIFT::getDefaultName ( ) const
virtual
Python:
cv.SIFT.getDefaultName() -> retval

アルゴリズムの文字列識別子を返す。この文字列は、オブジェクトをファイルまたは文字列に保存する際に、最上位の xml/yml ノードタグとして使用される。

cv::Feature2D から再実装されている。

◆ getEdgeThreshold()

virtual double cv::SIFT::getEdgeThreshold ( ) const
pure virtual
Python:
cv.SIFT.getEdgeThreshold() -> retval

◆ getNFeatures()

virtual int cv::SIFT::getNFeatures ( ) const
pure virtual
Python:
cv.SIFT.getNFeatures() -> retval

◆ getNOctaveLayers()

virtual int cv::SIFT::getNOctaveLayers ( ) const
pure virtual
Python:
cv.SIFT.getNOctaveLayers() -> retval

◆ getSigma()

virtual double cv::SIFT::getSigma ( ) const
pure virtual
Python:
cv.SIFT.getSigma() -> retval

◆ setContrastThreshold()

virtual void cv::SIFT::setContrastThreshold ( double contrastThreshold)
pure virtual
Python:
cv.SIFT.setContrastThreshold(contrastThreshold) -> None

◆ setEdgeThreshold()

virtual void cv::SIFT::setEdgeThreshold ( double edgeThreshold)
pure virtual
Python:
cv.SIFT.setEdgeThreshold(edgeThreshold) -> None

◆ setNFeatures()

virtual void cv::SIFT::setNFeatures ( int maxFeatures)
pure virtual
Python:
cv.SIFT.setNFeatures(maxFeatures) -> None

◆ setNOctaveLayers()

virtual void cv::SIFT::setNOctaveLayers ( int nOctaveLayers)
pure virtual
Python:
cv.SIFT.setNOctaveLayers(nOctaveLayers) -> None

◆ setSigma()

virtual void cv::SIFT::setSigma ( double sigma)
pure virtual
Python:
cv.SIFT.setSigma(sigma) -> None

このクラス詳解は次のファイルから抽出されました: