Package boofcv.alg.background.stationary
Class BackgroundStationaryGmm<T extends ImageBase<T>>
java.lang.Object
boofcv.alg.background.BackgroundModel<T>
boofcv.alg.background.BackgroundModelStationary<T>
boofcv.alg.background.stationary.BackgroundStationaryGmm<T>
- All Implemented Interfaces:
BackgroundAlgorithmGmm
- Direct Known Subclasses:
BackgroundStationaryGmm_MB
,BackgroundStationaryGmm_MB_MT
,BackgroundStationaryGmm_SB
,BackgroundStationaryGmm_SB_MT
public abstract class BackgroundStationaryGmm<T extends ImageBase<T>>
extends BackgroundModelStationary<T>
implements BackgroundAlgorithmGmm
Implementation of BackgroundAlgorithmGmm
for stationary images.
- See Also:
-
Field Summary
Fields inherited from class boofcv.alg.background.BackgroundModel
imageType, unknownValue
-
Constructor Summary
ModifierConstructorDescriptionprotected
BackgroundStationaryGmm
(float learningPeriod, float decayCoef, int maxGaussians, ImageType<T> imageType) -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the initial variance assigned to a pixelfloat
Returns the learning period.float
void
reset()
Resets model to its original statevoid
setInitialVariance
(float initialVariance) Sets the initial variance assigned to a pixelvoid
setLearningPeriod
(float period) Specifies the learning ratevoid
setMaxDistance
(float maxDistance) void
setSignificantWeight
(float value) Minimum value of a Gaussian's weight to be considered part of the backgroundvoid
updateBackground
(T frame) Updates the background with new image information.void
updateBackground
(T frame, @Nullable GrayU8 mask) Updates the background and segments it at the same time.Methods inherited from class boofcv.alg.background.BackgroundModelStationary
segment
Methods inherited from class boofcv.alg.background.BackgroundModel
getImageType, getUnknownValue, setUnknownValue
-
Constructor Details
-
BackgroundStationaryGmm
-
-
Method Details
-
reset
public void reset()Description copied from class:BackgroundModel
Resets model to its original state- Specified by:
reset
in classBackgroundModel<T extends ImageBase<T>>
-
updateBackground
Description copied from class:BackgroundModelStationary
Updates the background with new image information.- Specified by:
updateBackground
in classBackgroundModelStationary<T extends ImageBase<T>>
-
updateBackground
Description copied from class:BackgroundModelStationary
Updates the background and segments it at the same time. In some implementations this can be significantly faster than doing it with separate function calls. Segmentation is performed using the model which it has prior to the update.- Overrides:
updateBackground
in classBackgroundModelStationary<T extends ImageBase<T>>
- Parameters:
mask
- If null then the background mask is ignored
-
getInitialVariance
public float getInitialVariance()Description copied from interface:BackgroundAlgorithmGmm
Returns the initial variance assigned to a pixel- Specified by:
getInitialVariance
in interfaceBackgroundAlgorithmGmm
- Returns:
- initial variance
-
setInitialVariance
public void setInitialVariance(float initialVariance) Description copied from interface:BackgroundAlgorithmGmm
Sets the initial variance assigned to a pixel- Specified by:
setInitialVariance
in interfaceBackgroundAlgorithmGmm
- Parameters:
initialVariance
- initial variance
-
getLearningPeriod
public float getLearningPeriod()Description copied from interface:BackgroundAlgorithmGmm
Returns the learning period.- Specified by:
getLearningPeriod
in interfaceBackgroundAlgorithmGmm
-
setLearningPeriod
public void setLearningPeriod(float period) Description copied from interface:BackgroundAlgorithmGmm
Specifies the learning rate- Specified by:
setLearningPeriod
in interfaceBackgroundAlgorithmGmm
- Parameters:
period
- Must be more than 0.
-
setSignificantWeight
public void setSignificantWeight(float value) Description copied from interface:BackgroundAlgorithmGmm
Minimum value of a Gaussian's weight to be considered part of the background- Specified by:
setSignificantWeight
in interfaceBackgroundAlgorithmGmm
-
getMaxDistance
public float getMaxDistance() -
setMaxDistance
public void setMaxDistance(float maxDistance)
-