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

Link to this section 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

getDefaultName

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

Link to this section Types

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

Type that represents an Bioinspired.TransientAreasSegmentationModule struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

@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
@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({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(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
@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(self)

View Source
@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(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(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(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

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

Python prototype (for reference only):

read(fn_) -> None
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.t().

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

Keyword Arguments
  • channelIndex: int.

    : 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(), [{atom(), term()}, ...] | nil) ::
  t() | {:error, String.t()}

main processing method, get result using methods getSegmentationPicture()

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

  • inputToSegment: Evision.Mat.t().

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

Keyword Arguments
  • channelIndex: int.

    : the channel to process in case of multichannel images

Python prototype (for reference only):

run(inputToSegment[, channelIndex]) -> None
@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(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(), [{atom(), 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(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