View Source Evision.Bioinspired.TransientAreasSegmentationModule (Evision v0.2.9)

Summary

Types

t()

Type that represents an Bioinspired.TransientAreasSegmentationModule struct.

Functions

Clears the algorithm state

cleans all the buffers of the instance

allocator

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

access function return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose

access function return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose

return the sze of the manage input and output images

parameters setup display method

Reads algorithm parameters from a file storage

main processing method, get result using methods getSegmentationPicture()

main processing method, get result using methods getSegmentationPicture()

try to open an XML segmentation parameters file to adjust current segmentation instance setup

try to open an XML segmentation parameters file to adjust current segmentation instance setup

write xml/yml formated parameters information

Types

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

Type that represents an Bioinspired.TransientAreasSegmentationModule struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()

Python prototype (for reference only):

clear() -> None
Link to this function

clearAllBuffers(named_args)

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

cleans all the buffers of the instance

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()

Python prototype (for reference only):

clearAllBuffers() -> None
@spec create(Keyword.t()) :: any() | {:error, String.t()}
@spec create({number(), number()}) :: t() | {:error, String.t()}

allocator

Positional Arguments
  • inputSize: Size.

    : size of the images input to segment (output will be the same size)

Return
  • retval: TransientAreasSegmentationModule

Python prototype (for reference only):

create(inputSize) -> retval
@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.Bioinspired.TransientAreasSegmentationModule.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
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.Bioinspired.TransientAreasSegmentationModule.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

getSegmentationPicture(named_args)

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

access function return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()
Return
  • transientAreas: Evision.Mat.t().

Python prototype (for reference only):

getSegmentationPicture([, transientAreas]) -> transientAreas
Link to this function

getSegmentationPicture(self, opts)

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

access function return the last segmentation result: a boolean picture which is resampled between 0 and 255 for a display purpose

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()
Return
  • transientAreas: Evision.Mat.t().

Python prototype (for reference only):

getSegmentationPicture([, transientAreas]) -> transientAreas
@spec getSize(Keyword.t()) :: any() | {:error, String.t()}
@spec getSize(t()) :: {number(), number()} | {:error, String.t()}

return the sze of the manage input and output images

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()
Return
  • retval: Size

Python prototype (for reference only):

getSize() -> retval
@spec printSetup(Keyword.t()) :: any() | {:error, String.t()}
@spec printSetup(t()) :: binary() | {:error, String.t()}

parameters setup display method

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()
Return

@return a string which contains formatted parameters information

Python prototype (for reference only):

printSetup() -> 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
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()
  • func: Evision.FileNode

Python prototype (for reference only):

read(fn) -> None
@spec run(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

run(self, inputToSegment)

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

main processing method, get result using methods getSegmentationPicture()

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()

  • inputToSegment: Evision.Mat.

    : the image to process, it must match the instance buffer size !

Keyword Arguments
  • channelIndex: integer().

    : the channel to process in case of multichannel images

Python prototype (for reference only):

run(inputToSegment[, channelIndex]) -> None
Link to this function

run(self, inputToSegment, opts)

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

main processing method, get result using methods getSegmentationPicture()

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()

  • inputToSegment: Evision.Mat.

    : the image to process, it must match the instance buffer size !

Keyword Arguments
  • channelIndex: integer().

    : the channel to process in case of multichannel images

Python prototype (for reference only):

run(inputToSegment[, channelIndex]) -> None
@spec save(Keyword.t()) :: any() | {:error, String.t()}
@spec save(t(), binary()) :: t() | {:error, String.t()}

save

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.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
@spec setup(Keyword.t()) :: any() | {:error, String.t()}
@spec setup(t()) :: t() | {:error, String.t()}

try to open an XML segmentation parameters file to adjust current segmentation instance setup

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()
Keyword Arguments
  • segmentationParameterFile: String.

    : the parameters filename

  • applyDefaultSetupOnFailure: bool.

    : set to true if an error must be thrown on error

  • if the xml file does not exist, then default setup is applied

  • warning, Exceptions are thrown if read XML file is not valid

Python prototype (for reference only):

setup([, segmentationParameterFile[, applyDefaultSetupOnFailure]]) -> None
@spec setup(
  t(),
  [applyDefaultSetupOnFailure: term(), segmentationParameterFile: term()] | nil
) ::
  t() | {:error, String.t()}

try to open an XML segmentation parameters file to adjust current segmentation instance setup

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()
Keyword Arguments
  • segmentationParameterFile: String.

    : the parameters filename

  • applyDefaultSetupOnFailure: bool.

    : set to true if an error must be thrown on error

  • if the xml file does not exist, then default setup is applied

  • warning, Exceptions are thrown if read XML file is not valid

Python prototype (for reference only):

setup([, segmentationParameterFile[, applyDefaultSetupOnFailure]]) -> None
@spec write(Keyword.t()) :: any() | {:error, String.t()}
@spec write(t(), binary()) :: t() | {:error, String.t()}

write xml/yml formated parameters information

Positional Arguments
  • self: Evision.Bioinspired.TransientAreasSegmentationModule.t()

  • fs: String.

    : the filename of the xml file that will be open and writen with formatted parameters information

Python prototype (for reference only):

write(fs) -> None