@Namespace(value="cv::bgsegm") @Properties(inherit=opencv_bgsegm.class) public class BackgroundSubtractorMOG extends BackgroundSubtractor
/** \brief Gaussian Mixture-based Background/Foreground Segmentation Algorithm.
The class implements the algorithm described in \cite KB2001 .
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
BackgroundSubtractorMOG(Algorithm pointer)
Downcast constructor.
|
BackgroundSubtractorMOG(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(GpuMat image,
GpuMat fgmask) |
void |
apply(GpuMat image,
GpuMat fgmask,
double learningRate) |
void |
apply(GpuMat image,
GpuMat knownForegroundMask,
GpuMat fgmask) |
void |
apply(GpuMat image,
GpuMat knownForegroundMask,
GpuMat fgmask,
double learningRate) |
void |
apply(Mat image,
Mat fgmask) |
void |
apply(Mat image,
Mat fgmask,
double learningRate)
\brief Computes a foreground mask.
|
void |
apply(Mat image,
Mat knownForegroundMask,
Mat fgmask) |
void |
apply(Mat image,
Mat knownForegroundMask,
Mat fgmask,
double learningRate)
\brief Computes a foreground mask and skips known foreground in evaluation.
|
void |
apply(UMat image,
UMat fgmask) |
void |
apply(UMat image,
UMat fgmask,
double learningRate) |
void |
apply(UMat image,
UMat knownForegroundMask,
UMat fgmask) |
void |
apply(UMat image,
UMat knownForegroundMask,
UMat fgmask,
double learningRate) |
double |
getBackgroundRatio() |
int |
getHistory() |
int |
getNMixtures() |
double |
getNoiseSigma() |
void |
setBackgroundRatio(double backgroundRatio) |
void |
setHistory(int nframes) |
void |
setNMixtures(int nmix) |
void |
setNoiseSigma(double noiseSigma) |
asAlgorithm, asAlgorithm, getBackgroundImage, getBackgroundImage, getBackgroundImageclear, empty, getDefaultName, getPointer, position, read, save, save, write, write, writeaddress, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, trimMemory, withDeallocator, zeropublic BackgroundSubtractorMOG(Pointer p)
Pointer(Pointer).public BackgroundSubtractorMOG(Algorithm pointer)
public void apply(@ByVal Mat image, @ByVal Mat fgmask, double learningRate)
apply in class BackgroundSubtractorimage - Next video frame of type CV_8UC(n),CV_8SC(n),CV_16UC(n),CV_16SC(n),CV_32SC(n),CV_32FC(n),CV_64FC(n), where n is 1,2,3,4.fgmask - The output foreground mask as an 8-bit binary image.learningRate - The value between 0 and 1 that indicates how fast the background model is
learnt. Negative parameter value makes the algorithm to use some automatically chosen learning
rate. 0 means that the background model is not updated at all, 1 means that the background model
is completely reinitialized from the last frame.public void apply(@ByVal Mat image, @ByVal Mat fgmask)
apply in class BackgroundSubtractorpublic void apply(@ByVal UMat image, @ByVal UMat fgmask, double learningRate)
apply in class BackgroundSubtractorpublic void apply(@ByVal UMat image, @ByVal UMat fgmask)
apply in class BackgroundSubtractorpublic void apply(@ByVal GpuMat image, @ByVal GpuMat fgmask, double learningRate)
apply in class BackgroundSubtractorpublic void apply(@ByVal GpuMat image, @ByVal GpuMat fgmask)
apply in class BackgroundSubtractorpublic void apply(@ByVal Mat image, @ByVal Mat knownForegroundMask, @ByVal Mat fgmask, double learningRate)
apply in class BackgroundSubtractorimage - Next video frame of type CV_8UC(n),CV_8SC(n),CV_16UC(n),CV_16SC(n),CV_32SC(n),CV_32FC(n),CV_64FC(n), where n is 1,2,3,4.fgmask - The output foreground mask as an 8-bit binary image.knownForegroundMask - The mask for inputting already known foreground, allows model to ignore learning known pixels.learningRate - The value between 0 and 1 that indicates how fast the background model is
learnt. Negative parameter value makes the algorithm to use some automatically chosen learning
rate. 0 means that the background model is not updated at all, 1 means that the background model
is completely reinitialized from the last frame.public void apply(@ByVal Mat image, @ByVal Mat knownForegroundMask, @ByVal Mat fgmask)
apply in class BackgroundSubtractorpublic void apply(@ByVal UMat image, @ByVal UMat knownForegroundMask, @ByVal UMat fgmask, double learningRate)
apply in class BackgroundSubtractorpublic void apply(@ByVal UMat image, @ByVal UMat knownForegroundMask, @ByVal UMat fgmask)
apply in class BackgroundSubtractorpublic void apply(@ByVal GpuMat image, @ByVal GpuMat knownForegroundMask, @ByVal GpuMat fgmask, double learningRate)
apply in class BackgroundSubtractorpublic void apply(@ByVal GpuMat image, @ByVal GpuMat knownForegroundMask, @ByVal GpuMat fgmask)
apply in class BackgroundSubtractorpublic int getHistory()
public void setHistory(int nframes)
public int getNMixtures()
public void setNMixtures(int nmix)
public double getBackgroundRatio()
public void setBackgroundRatio(double backgroundRatio)
public double getNoiseSigma()
public void setNoiseSigma(double noiseSigma)
Copyright © 2026. All rights reserved.