View Source Evision.BgSegm.BackgroundSubtractorCNT (Evision v0.2.9)

Summary

Types

t()

Type that represents an BgSegm.BackgroundSubtractorCNT struct.

Functions

Clears the algorithm state

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

getBackgroundImage

getBackgroundImage

Returns if we're parallelizing the algorithm.

Returns maximum allowed credit for a pixel in history.

Returns number of frames with same pixel color to consider stable.

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

Reads algorithm parameters from a file storage

Sets if we're parallelizing the algorithm.

Sets the maximum allowed credit for a pixel in history.

Sets the number of frames with same pixel color to consider stable.

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

Stores algorithm parameters in a file storage

Types

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

Type that represents an BgSegm.BackgroundSubtractorCNT struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec apply(Keyword.t()) :: any() | {:error, String.t()}
@spec apply(t(), Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}

apply

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
  • image: Evision.Mat
Keyword Arguments
  • learningRate: double.
Return
  • fgmask: Evision.Mat.t().

Python prototype (for reference only):

apply(image[, fgmask[, learningRate]]) -> fgmask
Link to this function

apply(self, image, opts)

View Source
@spec apply(t(), Evision.Mat.maybe_mat_in(), [{:learningRate, term()}] | nil) ::
  Evision.Mat.t() | {:error, String.t()}

apply

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
  • image: Evision.Mat
Keyword Arguments
  • learningRate: double.
Return
  • fgmask: Evision.Mat.t().

Python prototype (for reference only):

apply(image[, fgmask[, learningRate]]) -> fgmask
@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()

Python prototype (for reference only):

clear() -> None
@spec empty(Keyword.t()) :: any() | {:error, String.t()}
@spec empty(t()) :: boolean() | {:error, String.t()}

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
Link to this function

getBackgroundImage(named_args)

View Source
@spec getBackgroundImage(Keyword.t()) :: any() | {:error, String.t()}
@spec getBackgroundImage(t()) :: Evision.Mat.t() | {:error, String.t()}

getBackgroundImage

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
Return
  • backgroundImage: Evision.Mat.t().

Python prototype (for reference only):

getBackgroundImage([, backgroundImage]) -> backgroundImage
Link to this function

getBackgroundImage(self, opts)

View Source
@spec getBackgroundImage(t(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | {:error, String.t()}

getBackgroundImage

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
Return
  • backgroundImage: Evision.Mat.t().

Python prototype (for reference only):

getBackgroundImage([, backgroundImage]) -> backgroundImage
Link to this function

getDefaultName(named_args)

View Source
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}

getDefaultName

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
Return

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.

Python prototype (for reference only):

getDefaultName() -> retval
Link to this function

getIsParallel(named_args)

View Source
@spec getIsParallel(Keyword.t()) :: any() | {:error, String.t()}
@spec getIsParallel(t()) :: boolean() | {:error, String.t()}

Returns if we're parallelizing the algorithm.

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
Return
  • retval: bool

Python prototype (for reference only):

getIsParallel() -> retval
Link to this function

getMaxPixelStability(named_args)

View Source
@spec getMaxPixelStability(Keyword.t()) :: any() | {:error, String.t()}
@spec getMaxPixelStability(t()) :: integer() | {:error, String.t()}

Returns maximum allowed credit for a pixel in history.

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
Return
  • retval: integer()

Python prototype (for reference only):

getMaxPixelStability() -> retval
Link to this function

getMinPixelStability(named_args)

View Source
@spec getMinPixelStability(Keyword.t()) :: any() | {:error, String.t()}
@spec getMinPixelStability(t()) :: integer() | {:error, String.t()}

Returns number of frames with same pixel color to consider stable.

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
Return
  • retval: integer()

Python prototype (for reference only):

getMinPixelStability() -> retval
Link to this function

getUseHistory(named_args)

View Source
@spec getUseHistory(Keyword.t()) :: any() | {:error, String.t()}
@spec getUseHistory(t()) :: boolean() | {:error, String.t()}

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

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
Return
  • retval: bool

Python prototype (for reference only):

getUseHistory() -> retval
@spec read(Keyword.t()) :: any() | {:error, String.t()}
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments

Python prototype (for reference only):

read(fn) -> None
@spec save(Keyword.t()) :: any() | {:error, String.t()}
@spec save(t(), binary()) :: t() | {:error, String.t()}

save

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
  • filename: String

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).

Python prototype (for reference only):

save(filename) -> None
Link to this function

setIsParallel(named_args)

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

setIsParallel(self, value)

View Source
@spec setIsParallel(t(), boolean()) :: t() | {:error, String.t()}

Sets if we're parallelizing the algorithm.

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
  • value: bool

Python prototype (for reference only):

setIsParallel(value) -> None
Link to this function

setMaxPixelStability(named_args)

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

setMaxPixelStability(self, value)

View Source
@spec setMaxPixelStability(t(), integer()) :: t() | {:error, String.t()}

Sets the maximum allowed credit for a pixel in history.

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
  • value: integer()

Python prototype (for reference only):

setMaxPixelStability(value) -> None
Link to this function

setMinPixelStability(named_args)

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

setMinPixelStability(self, value)

View Source
@spec setMinPixelStability(t(), integer()) :: t() | {:error, String.t()}

Sets the number of frames with same pixel color to consider stable.

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
  • value: integer()

Python prototype (for reference only):

setMinPixelStability(value) -> None
Link to this function

setUseHistory(named_args)

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

setUseHistory(self, value)

View Source
@spec setUseHistory(t(), boolean()) :: t() | {:error, String.t()}

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

Positional Arguments
  • self: Evision.BgSegm.BackgroundSubtractorCNT.t()
  • value: bool

Python prototype (for reference only):

setUseHistory(value) -> None
@spec write(Keyword.t()) :: any() | {:error, String.t()}
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments

Python prototype (for reference only):

write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}

write

Positional Arguments

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None