View Source Evision.BgSegm (Evision v0.2.9)

Summary

Types

t()

Type that represents an BgSegm struct.

Functions

Creates a CNT Background Subtractor

Creates a CNT Background Subtractor

Creates a GMG Background Subtractor

Creates a GMG Background Subtractor

Creates an instance of BackgroundSubtractorGSOC algorithm.

Creates an instance of BackgroundSubtractorGSOC algorithm.

Creates an instance of BackgroundSubtractorLSBP algorithm.

Creates an instance of BackgroundSubtractorLSBP algorithm.

Creates mixture-of-gaussian background subtractor

Creates mixture-of-gaussian background subtractor

Creates an instance of SyntheticSequenceGenerator.

Creates an instance of SyntheticSequenceGenerator.

Types

@type t() :: %Evision.BgSegm{ref: reference()}

Type that represents an BgSegm struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

Link to this function

createBackgroundSubtractorCNT()

View Source
@spec createBackgroundSubtractorCNT() ::
  Evision.BgSegm.BackgroundSubtractorCNT.t() | {:error, String.t()}

Creates a CNT Background Subtractor

Keyword Arguments
  • minPixelStability: integer().

    number of frames with same pixel color to consider stable

  • useHistory: bool.

    determines if we're giving a pixel credit for being stable for a long time

  • maxPixelStability: integer().

    maximum allowed credit for a pixel in history

  • isParallel: bool.

    determines if we're parallelizing the algorithm

Return
  • retval: Evision.BgSegm.BackgroundSubtractorCNT.t()

Python prototype (for reference only):

createBackgroundSubtractorCNT([, minPixelStability[, useHistory[, maxPixelStability[, isParallel]]]]) -> retval
Link to this function

createBackgroundSubtractorCNT(named_args)

View Source
@spec createBackgroundSubtractorCNT(Keyword.t()) :: any() | {:error, String.t()}
@spec createBackgroundSubtractorCNT(
  [
    isParallel: term(),
    maxPixelStability: term(),
    minPixelStability: term(),
    useHistory: term()
  ]
  | nil
) :: Evision.BgSegm.BackgroundSubtractorCNT.t() | {:error, String.t()}

Creates a CNT Background Subtractor

Keyword Arguments
  • minPixelStability: integer().

    number of frames with same pixel color to consider stable

  • useHistory: bool.

    determines if we're giving a pixel credit for being stable for a long time

  • maxPixelStability: integer().

    maximum allowed credit for a pixel in history

  • isParallel: bool.

    determines if we're parallelizing the algorithm

Return
  • retval: Evision.BgSegm.BackgroundSubtractorCNT.t()

Python prototype (for reference only):

createBackgroundSubtractorCNT([, minPixelStability[, useHistory[, maxPixelStability[, isParallel]]]]) -> retval
Link to this function

createBackgroundSubtractorGMG()

View Source
@spec createBackgroundSubtractorGMG() ::
  Evision.BgSegm.BackgroundSubtractorGMG.t() | {:error, String.t()}

Creates a GMG Background Subtractor

Keyword Arguments
  • initializationFrames: integer().

    number of frames used to initialize the background models.

  • decisionThreshold: double.

    Threshold value, above which it is marked foreground, else background.

Return
  • retval: Evision.BgSegm.BackgroundSubtractorGMG.t()

Python prototype (for reference only):

createBackgroundSubtractorGMG([, initializationFrames[, decisionThreshold]]) -> retval
Link to this function

createBackgroundSubtractorGMG(named_args)

View Source
@spec createBackgroundSubtractorGMG(Keyword.t()) :: any() | {:error, String.t()}
@spec createBackgroundSubtractorGMG(
  [decisionThreshold: term(), initializationFrames: term()]
  | nil
) ::
  Evision.BgSegm.BackgroundSubtractorGMG.t() | {:error, String.t()}

Creates a GMG Background Subtractor

Keyword Arguments
  • initializationFrames: integer().

    number of frames used to initialize the background models.

  • decisionThreshold: double.

    Threshold value, above which it is marked foreground, else background.

Return
  • retval: Evision.BgSegm.BackgroundSubtractorGMG.t()

Python prototype (for reference only):

createBackgroundSubtractorGMG([, initializationFrames[, decisionThreshold]]) -> retval
Link to this function

createBackgroundSubtractorGSOC()

View Source
@spec createBackgroundSubtractorGSOC() ::
  Evision.BgSegm.BackgroundSubtractorGSOC.t() | {:error, String.t()}

Creates an instance of BackgroundSubtractorGSOC algorithm.

Keyword Arguments
  • mc: integer().

    Whether to use camera motion compensation.

  • nSamples: integer().

    Number of samples to maintain at each point of the frame.

  • replaceRate: float.

    Probability of replacing the old sample - how fast the model will update itself.

  • propagationRate: float.

    Probability of propagating to neighbors.

  • hitsThreshold: integer().

    How many positives the sample must get before it will be considered as a possible replacement.

  • alpha: float.

    Scale coefficient for threshold.

  • beta: float.

    Bias coefficient for threshold.

  • blinkingSupressionDecay: float.

    Blinking supression decay factor.

  • blinkingSupressionMultiplier: float.

    Blinking supression multiplier.

  • noiseRemovalThresholdFacBG: float.

    Strength of the noise removal for background points.

  • noiseRemovalThresholdFacFG: float.

    Strength of the noise removal for foreground points.

Return
  • retval: Evision.BgSegm.BackgroundSubtractorGSOC.t()

Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.

Python prototype (for reference only):

createBackgroundSubtractorGSOC([, mc[, nSamples[, replaceRate[, propagationRate[, hitsThreshold[, alpha[, beta[, blinkingSupressionDecay[, blinkingSupressionMultiplier[, noiseRemovalThresholdFacBG[, noiseRemovalThresholdFacFG]]]]]]]]]]]) -> retval
Link to this function

createBackgroundSubtractorGSOC(named_args)

View Source
@spec createBackgroundSubtractorGSOC(Keyword.t()) :: any() | {:error, String.t()}
@spec createBackgroundSubtractorGSOC(
  [
    alpha: term(),
    beta: term(),
    blinkingSupressionDecay: term(),
    blinkingSupressionMultiplier: term(),
    hitsThreshold: term(),
    mc: term(),
    nSamples: term(),
    noiseRemovalThresholdFacBG: term(),
    noiseRemovalThresholdFacFG: term(),
    propagationRate: term(),
    replaceRate: term()
  ]
  | nil
) :: Evision.BgSegm.BackgroundSubtractorGSOC.t() | {:error, String.t()}

Creates an instance of BackgroundSubtractorGSOC algorithm.

Keyword Arguments
  • mc: integer().

    Whether to use camera motion compensation.

  • nSamples: integer().

    Number of samples to maintain at each point of the frame.

  • replaceRate: float.

    Probability of replacing the old sample - how fast the model will update itself.

  • propagationRate: float.

    Probability of propagating to neighbors.

  • hitsThreshold: integer().

    How many positives the sample must get before it will be considered as a possible replacement.

  • alpha: float.

    Scale coefficient for threshold.

  • beta: float.

    Bias coefficient for threshold.

  • blinkingSupressionDecay: float.

    Blinking supression decay factor.

  • blinkingSupressionMultiplier: float.

    Blinking supression multiplier.

  • noiseRemovalThresholdFacBG: float.

    Strength of the noise removal for background points.

  • noiseRemovalThresholdFacFG: float.

    Strength of the noise removal for foreground points.

Return
  • retval: Evision.BgSegm.BackgroundSubtractorGSOC.t()

Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.

Python prototype (for reference only):

createBackgroundSubtractorGSOC([, mc[, nSamples[, replaceRate[, propagationRate[, hitsThreshold[, alpha[, beta[, blinkingSupressionDecay[, blinkingSupressionMultiplier[, noiseRemovalThresholdFacBG[, noiseRemovalThresholdFacFG]]]]]]]]]]]) -> retval
Link to this function

createBackgroundSubtractorLSBP()

View Source
@spec createBackgroundSubtractorLSBP() ::
  Evision.BgSegm.BackgroundSubtractorLSBP.t() | {:error, String.t()}

Creates an instance of BackgroundSubtractorLSBP algorithm.

Keyword Arguments
  • mc: integer().

    Whether to use camera motion compensation.

  • nSamples: integer().

    Number of samples to maintain at each point of the frame.

  • lSBPRadius: integer().

    LSBP descriptor radius.

  • tlower: float.

    Lower bound for T-values. See @cite LGuo2016 for details.

  • tupper: float.

    Upper bound for T-values. See @cite LGuo2016 for details.

  • tinc: float.

    Increase step for T-values. See @cite LGuo2016 for details.

  • tdec: float.

    Decrease step for T-values. See @cite LGuo2016 for details.

  • rscale: float.

    Scale coefficient for threshold values.

  • rincdec: float.

    Increase/Decrease step for threshold values.

  • noiseRemovalThresholdFacBG: float.

    Strength of the noise removal for background points.

  • noiseRemovalThresholdFacFG: float.

    Strength of the noise removal for foreground points.

  • lSBPthreshold: integer().

    Threshold for LSBP binary string.

  • minCount: integer().

    Minimal number of matches for sample to be considered as foreground.

Return
  • retval: Evision.BgSegm.BackgroundSubtractorLSBP.t()

Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at @cite LGuo2016

Python prototype (for reference only):

createBackgroundSubtractorLSBP([, mc[, nSamples[, LSBPRadius[, Tlower[, Tupper[, Tinc[, Tdec[, Rscale[, Rincdec[, noiseRemovalThresholdFacBG[, noiseRemovalThresholdFacFG[, LSBPthreshold[, minCount]]]]]]]]]]]]]) -> retval
Link to this function

createBackgroundSubtractorLSBP(named_args)

View Source
@spec createBackgroundSubtractorLSBP(Keyword.t()) :: any() | {:error, String.t()}
@spec createBackgroundSubtractorLSBP(
  [
    lSBPRadius: term(),
    lSBPthreshold: term(),
    mc: term(),
    minCount: term(),
    nSamples: term(),
    noiseRemovalThresholdFacBG: term(),
    noiseRemovalThresholdFacFG: term(),
    rincdec: term(),
    rscale: term(),
    tdec: term(),
    tinc: term(),
    tlower: term(),
    tupper: term()
  ]
  | nil
) :: Evision.BgSegm.BackgroundSubtractorLSBP.t() | {:error, String.t()}

Creates an instance of BackgroundSubtractorLSBP algorithm.

Keyword Arguments
  • mc: integer().

    Whether to use camera motion compensation.

  • nSamples: integer().

    Number of samples to maintain at each point of the frame.

  • lSBPRadius: integer().

    LSBP descriptor radius.

  • tlower: float.

    Lower bound for T-values. See @cite LGuo2016 for details.

  • tupper: float.

    Upper bound for T-values. See @cite LGuo2016 for details.

  • tinc: float.

    Increase step for T-values. See @cite LGuo2016 for details.

  • tdec: float.

    Decrease step for T-values. See @cite LGuo2016 for details.

  • rscale: float.

    Scale coefficient for threshold values.

  • rincdec: float.

    Increase/Decrease step for threshold values.

  • noiseRemovalThresholdFacBG: float.

    Strength of the noise removal for background points.

  • noiseRemovalThresholdFacFG: float.

    Strength of the noise removal for foreground points.

  • lSBPthreshold: integer().

    Threshold for LSBP binary string.

  • minCount: integer().

    Minimal number of matches for sample to be considered as foreground.

Return
  • retval: Evision.BgSegm.BackgroundSubtractorLSBP.t()

Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at @cite LGuo2016

Python prototype (for reference only):

createBackgroundSubtractorLSBP([, mc[, nSamples[, LSBPRadius[, Tlower[, Tupper[, Tinc[, Tdec[, Rscale[, Rincdec[, noiseRemovalThresholdFacBG[, noiseRemovalThresholdFacFG[, LSBPthreshold[, minCount]]]]]]]]]]]]]) -> retval
Link to this function

createBackgroundSubtractorMOG()

View Source
@spec createBackgroundSubtractorMOG() ::
  Evision.BgSegm.BackgroundSubtractorMOG.t() | {:error, String.t()}

Creates mixture-of-gaussian background subtractor

Keyword Arguments
  • history: integer().

    Length of the history.

  • nmixtures: integer().

    Number of Gaussian mixtures.

  • backgroundRatio: double.

    Background ratio.

  • noiseSigma: double.

    Noise strength (standard deviation of the brightness or each color channel). 0 means some automatic value.

Return
  • retval: Evision.BgSegm.BackgroundSubtractorMOG.t()

Python prototype (for reference only):

createBackgroundSubtractorMOG([, history[, nmixtures[, backgroundRatio[, noiseSigma]]]]) -> retval
Link to this function

createBackgroundSubtractorMOG(named_args)

View Source
@spec createBackgroundSubtractorMOG(Keyword.t()) :: any() | {:error, String.t()}
@spec createBackgroundSubtractorMOG(
  [
    backgroundRatio: term(),
    history: term(),
    nmixtures: term(),
    noiseSigma: term()
  ]
  | nil
) :: Evision.BgSegm.BackgroundSubtractorMOG.t() | {:error, String.t()}

Creates mixture-of-gaussian background subtractor

Keyword Arguments
  • history: integer().

    Length of the history.

  • nmixtures: integer().

    Number of Gaussian mixtures.

  • backgroundRatio: double.

    Background ratio.

  • noiseSigma: double.

    Noise strength (standard deviation of the brightness or each color channel). 0 means some automatic value.

Return
  • retval: Evision.BgSegm.BackgroundSubtractorMOG.t()

Python prototype (for reference only):

createBackgroundSubtractorMOG([, history[, nmixtures[, backgroundRatio[, noiseSigma]]]]) -> retval
Link to this function

createSyntheticSequenceGenerator(named_args)

View Source
@spec createSyntheticSequenceGenerator(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

createSyntheticSequenceGenerator(background, object)

View Source
@spec createSyntheticSequenceGenerator(
  Evision.Mat.maybe_mat_in(),
  Evision.Mat.maybe_mat_in()
) ::
  Evision.BgSegm.SyntheticSequenceGenerator.t() | {:error, String.t()}

Creates an instance of SyntheticSequenceGenerator.

Positional Arguments
  • background: Evision.Mat.

    Background image for object.

  • object: Evision.Mat.

    Object image which will move slowly over the background.

Keyword Arguments
  • amplitude: double.

    Amplitude of wave distortion applied to background.

  • wavelength: double.

    Length of waves in distortion applied to background.

  • wavespeed: double.

    How fast waves will move.

  • objspeed: double.

    How fast object will fly over background.

Return
  • retval: Evision.BgSegm.SyntheticSequenceGenerator.t()

Python prototype (for reference only):

createSyntheticSequenceGenerator(background, object[, amplitude[, wavelength[, wavespeed[, objspeed]]]]) -> retval
Link to this function

createSyntheticSequenceGenerator(background, object, opts)

View Source
@spec createSyntheticSequenceGenerator(
  Evision.Mat.maybe_mat_in(),
  Evision.Mat.maybe_mat_in(),
  [amplitude: term(), objspeed: term(), wavelength: term(), wavespeed: term()]
  | nil
) :: Evision.BgSegm.SyntheticSequenceGenerator.t() | {:error, String.t()}

Creates an instance of SyntheticSequenceGenerator.

Positional Arguments
  • background: Evision.Mat.

    Background image for object.

  • object: Evision.Mat.

    Object image which will move slowly over the background.

Keyword Arguments
  • amplitude: double.

    Amplitude of wave distortion applied to background.

  • wavelength: double.

    Length of waves in distortion applied to background.

  • wavespeed: double.

    How fast waves will move.

  • objspeed: double.

    How fast object will fly over background.

Return
  • retval: Evision.BgSegm.SyntheticSequenceGenerator.t()

Python prototype (for reference only):

createSyntheticSequenceGenerator(background, object[, amplitude[, wavelength[, wavespeed[, objspeed]]]]) -> retval