Package boofcv.alg.background.stationary
Class BackgroundStationaryBasic<T extends ImageBase<T>>
java.lang.Object
boofcv.alg.background.BackgroundModel<T>
boofcv.alg.background.BackgroundModelStationary<T>
boofcv.alg.background.stationary.BackgroundStationaryBasic<T>
- All Implemented Interfaces:
BackgroundAlgorithmBasic
- Direct Known Subclasses:
BackgroundStationaryBasic_IL
,BackgroundStationaryBasic_IL_MT
,BackgroundStationaryBasic_PL
,BackgroundStationaryBasic_PL_MT
,BackgroundStationaryBasic_SB
,BackgroundStationaryBasic_SB_MT
public abstract class BackgroundStationaryBasic<T extends ImageBase<T>>
extends BackgroundModelStationary<T>
implements BackgroundAlgorithmBasic
Implementation of BackgroundAlgorithmBasic
for stationary images.
-
Field Summary
Modifier and TypeFieldDescriptionprotected float
Specifies how fast it will adapt.protected float
Threshold for classifying a pixel as background or not.Fields inherited from class boofcv.alg.background.BackgroundModel
imageType, unknownValue
-
Constructor Summary
ModifierConstructorDescriptionprotected
BackgroundStationaryBasic
(float learnRate, float threshold, ImageType<T> imageType) Configures background model -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the learning rate.float
Returns the threshold for background/moving object.void
setLearnRate
(float learnRate) Specifies the learning ratevoid
setThreshold
(float threshold) Sets the threshold for background/moving objectMethods inherited from class boofcv.alg.background.BackgroundModelStationary
segment, updateBackground, updateBackground
Methods inherited from class boofcv.alg.background.BackgroundModel
getImageType, getUnknownValue, reset, setUnknownValue
-
Field Details
-
learnRate
protected float learnRateSpecifies how fast it will adapt. 0 to 1, inclusive. 0 = static 1.0 = instant. -
threshold
protected float thresholdThreshold for classifying a pixel as background or not. If euclidean distance less than or equal to this value it is background.
-
-
Constructor Details
-
BackgroundStationaryBasic
Configures background model- Parameters:
learnRate
- learning rate, 0 to 1. 0 = fastest and 1 = slowest.threshold
- Euclidean distance threshold. Background is ≤ this valueimageType
- Type of input image
-
-
Method Details
-
getLearnRate
public float getLearnRate()Description copied from interface:BackgroundAlgorithmBasic
Returns the learning rate.- Specified by:
getLearnRate
in interfaceBackgroundAlgorithmBasic
- Returns:
- 0 (slow) to 1 (fast)
-
setLearnRate
public void setLearnRate(float learnRate) Description copied from interface:BackgroundAlgorithmBasic
Specifies the learning rate- Specified by:
setLearnRate
in interfaceBackgroundAlgorithmBasic
- Parameters:
learnRate
- 0 (slow) to 1 (fast)
-
getThreshold
public float getThreshold()Description copied from interface:BackgroundAlgorithmBasic
Returns the threshold for background/moving object.- Specified by:
getThreshold
in interfaceBackgroundAlgorithmBasic
- Returns:
- background threshold
-
setThreshold
public void setThreshold(float threshold) Description copied from interface:BackgroundAlgorithmBasic
Sets the threshold for background/moving object- Specified by:
setThreshold
in interfaceBackgroundAlgorithmBasic
- Parameters:
threshold
- background threshold
-