🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.bgsegm
クラス BackgroundSubtractorGMG
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.video.BackgroundSubtractor
-
- org.opencv.bgsegm.BackgroundSubtractorGMG
public class BackgroundSubtractorGMG extends BackgroundSubtractor
CITE: Gold2012 で与えられたアルゴリズムに基づく背景差分モジュール。一連の画像を受け取り、同じサイズのマスク (8UC1) 画像の系列を返す。マスクでは 255 が前景を示し、0 が背景を表す。このクラスは、「Visual Tracking of Human Visitors under Variable-Lighting Conditions for a Responsive Audio Art Installation」, A. Godbehere, A. Matsukawa, K. Goldberg, American Control Conference, Montreal, June 2012 で説明されているアルゴリズムを実装する。
-
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description protectedBackgroundSubtractorGMG​(long addr)
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static BackgroundSubtractorGMG__fromPtr__​(long addr)voidapply​(Mat image, Mat fgmask)Computes a foreground mask.voidapply​(Mat image, Mat fgmask, double learningRate)Computes a foreground mask.voidapply​(Mat image, Mat knownForegroundMask, Mat fgmask)Computes a foreground mask with known foreground mask input.voidapply​(Mat image, Mat knownForegroundMask, Mat fgmask, double learningRate)Computes a foreground mask with known foreground mask input.voidgetBackgroundImage​(Mat backgroundImage)Computes a background image.doublegetBackgroundPrior()Returns the prior probability that each individual pixel is a background pixel.doublegetDecisionThreshold()Returns the value of decision threshold.doublegetDefaultLearningRate()Returns the learning rate of the algorithm.intgetMaxFeatures()Returns total number of distinct colors to maintain in histogram.doublegetMaxVal()Returns the maximum value taken on by pixels in image sequence.doublegetMinVal()Returns the minimum value taken on by pixels in image sequence.intgetNumFrames()Returns the number of frames used to initialize background model.intgetQuantizationLevels()Returns the parameter used for quantization of color-space.intgetSmoothingRadius()Returns the kernel radius used for morphological operationsbooleangetUpdateBackgroundModel()Returns the status of background model updatevoidsetBackgroundPrior​(double bgprior)Sets the prior probability that each individual pixel is a background pixel.voidsetDecisionThreshold​(double thresh)Sets the value of decision threshold.voidsetDefaultLearningRate​(double lr)Sets the learning rate of the algorithm.voidsetMaxFeatures​(int maxFeatures)Sets total number of distinct colors to maintain in histogram.voidsetMaxVal​(double val)Sets the maximum value taken on by pixels in image sequence.voidsetMinVal​(double val)Sets the minimum value taken on by pixels in image sequence.voidsetNumFrames​(int nframes)Sets the number of frames used to initialize background model.voidsetQuantizationLevels​(int nlevels)Sets the parameter used for quantization of color-spacevoidsetSmoothingRadius​(int radius)Sets the kernel radius used for morphological operationsvoidsetUpdateBackgroundModel​(boolean update)Sets the status of background model update-
クラス org.opencv.core.Algorithm から継承されたメソッド
clear, empty, getDefaultName, getNativeObjAddr, save
-
-
-
-
メソッドの詳細
-
__fromPtr__
public static BackgroundSubtractorGMG __fromPtr__​(long addr)
-
apply
public void apply​(Mat image, Mat fgmask, double learningRate)
Computes a foreground mask.- オーバーライド:
- クラス
BackgroundSubtractor内のapply - 引数:
image- CV_8UC(n),CV_8SC(n),CV_16UC(n),CV_16SC(n),CV_32SC(n),CV_32FC(n),CV_64FC(n) 型の次の動画フレーム。ここで n は 1,2,3,4 のいずれか。fgmask- 8ビットのバイナリ画像としての出力前景マスク。learningRate- 背景モデルがどれだけ速く学習されるかを示す0から1の間の値。負のパラメータ値を指定すると、アルゴリズムは自動的に選択された学習率を使用する。0 は背景モデルがまったく更新されないことを意味し、1 は背景モデルが最後のフレームから完全に再初期化されることを意味する。
-
apply
public void apply​(Mat image, Mat fgmask)
Computes a foreground mask.- オーバーライド:
- クラス
BackgroundSubtractor内のapply - 引数:
image- CV_8UC(n),CV_8SC(n),CV_16UC(n),CV_16SC(n),CV_32SC(n),CV_32FC(n),CV_64FC(n) 型の次の動画フレーム。ここで n は 1,2,3,4 のいずれか。fgmask- 8ビットのバイナリ画像としての出力前景マスク。学習される。負のパラメータ値を指定すると、アルゴリズムは自動的に選択された学習率を使用する。0 は背景モデルがまったく更新されないことを意味し、1 は背景モデルが最後のフレームから完全に再初期化されることを意味する。
-
apply
public void apply​(Mat image, Mat knownForegroundMask, Mat fgmask, double learningRate)
Computes a foreground mask with known foreground mask input.- オーバーライド:
- クラス
BackgroundSubtractor内のapply - 引数:
image- 次の動画フレーム。fgmask- 8ビットのバイナリ画像としての出力前景マスク。knownForegroundMask- 既知の前景を入力するためのマスク。learningRate- 背景モデルがどれだけ速く学習されるかを示す0から1の間の値。負のパラメータ値を指定すると、アルゴリズムは自動的に選択された学習率を使用する。0 は背景モデルがまったく更新されないことを意味し、1 は背景モデルが最後のフレームから完全に再初期化されることを意味する。覚え書き: このメソッドには、「not implemented」エラーを送出するデフォルトの仮想実装がある。前景マスキングはすべての背景差分器でサポートされているとは限らない。
-
apply
public void apply​(Mat image, Mat knownForegroundMask, Mat fgmask)
Computes a foreground mask with known foreground mask input.- オーバーライド:
- クラス
BackgroundSubtractor内のapply - 引数:
image- 次の動画フレーム。fgmask- 8ビットのバイナリ画像としての出力前景マスク。knownForegroundMask- 既知の前景を入力するためのマスク。学習される。負のパラメータ値を指定すると、アルゴリズムは自動的に選択された学習率を使用する。0 は背景モデルがまったく更新されないことを意味し、1 は背景モデルが最後のフレームから完全に再初期化されることを意味する。覚え書き: このメソッドには、「not implemented」エラーを送出するデフォルトの仮想実装がある。前景マスキングはすべての背景差分器でサポートされているとは限らない。
-
getBackgroundImage
public void getBackgroundImage​(Mat backgroundImage)
Description copied from class:BackgroundSubtractorComputes a background image.- オーバーライド:
- クラス
BackgroundSubtractor内のgetBackgroundImage - 引数:
backgroundImage- 出力背景画像。覚え書き: 背景画像は平均的な背景統計量を含むため、非常にぼやけて見えることがある。
-
getMaxFeatures
public int getMaxFeatures()
Returns total number of distinct colors to maintain in histogram.- 戻り値:
- 自動生成
-
setMaxFeatures
public void setMaxFeatures​(int maxFeatures)
Sets total number of distinct colors to maintain in histogram.- 引数:
maxFeatures- 自動生成
-
getDefaultLearningRate
public double getDefaultLearningRate()
Returns the learning rate of the algorithm. It lies between 0.0 and 1.0. It determines how quickly features are "forgotten" from histograms.- 戻り値:
- 自動生成
-
setDefaultLearningRate
public void setDefaultLearningRate​(double lr)
Sets the learning rate of the algorithm.- 引数:
lr- 自動生成
-
getNumFrames
public int getNumFrames()
Returns the number of frames used to initialize background model.- 戻り値:
- 自動生成
-
setNumFrames
public void setNumFrames​(int nframes)
Sets the number of frames used to initialize background model.- 引数:
nframes- 自動生成
-
getQuantizationLevels
public int getQuantizationLevels()
Returns the parameter used for quantization of color-space. It is the number of discrete levels in each channel to be used in histograms.- 戻り値:
- 自動生成
-
setQuantizationLevels
public void setQuantizationLevels​(int nlevels)
Sets the parameter used for quantization of color-space- 引数:
nlevels- 自動生成
-
getBackgroundPrior
public double getBackgroundPrior()
Returns the prior probability that each individual pixel is a background pixel.- 戻り値:
- 自動生成
-
setBackgroundPrior
public void setBackgroundPrior​(double bgprior)
Sets the prior probability that each individual pixel is a background pixel.- 引数:
bgprior- 自動生成
-
getSmoothingRadius
public int getSmoothingRadius()
Returns the kernel radius used for morphological operations- 戻り値:
- 自動生成
-
setSmoothingRadius
public void setSmoothingRadius​(int radius)
Sets the kernel radius used for morphological operations- 引数:
radius- 自動生成
-
getDecisionThreshold
public double getDecisionThreshold()
Returns the value of decision threshold. Decision value is the value above which pixel is determined to be FG.- 戻り値:
- 自動生成
-
setDecisionThreshold
public void setDecisionThreshold​(double thresh)
Sets the value of decision threshold.- 引数:
thresh- 自動生成
-
getUpdateBackgroundModel
public boolean getUpdateBackgroundModel()
Returns the status of background model update- 戻り値:
- 自動生成
-
setUpdateBackgroundModel
public void setUpdateBackgroundModel​(boolean update)
Sets the status of background model update- 引数:
update- 自動生成
-
getMinVal
public double getMinVal()
Returns the minimum value taken on by pixels in image sequence. Usually 0.- 戻り値:
- 自動生成
-
setMinVal
public void setMinVal​(double val)
Sets the minimum value taken on by pixels in image sequence.- 引数:
val- 自動生成
-
getMaxVal
public double getMaxVal()
Returns the maximum value taken on by pixels in image sequence. e.g. 1.0 or 255.- 戻り値:
- 自動生成
-
setMaxVal
public void setMaxVal​(double val)
Sets the maximum value taken on by pixels in image sequence.- 引数:
val- 自動生成
-
-