View Source Evision.XImgProc.GraphSegmentation (Evision v0.2.9)

Summary

Types

t()

Type that represents an XImgProc.GraphSegmentation struct.

Functions

Clears the algorithm state

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

Segment an image and store output in dst

Segment an image and store output in dst

Reads algorithm parameters from a file storage

Stores algorithm parameters in a file storage

Types

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

Type that represents an XImgProc.GraphSegmentation 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.XImgProc.GraphSegmentation.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.XImgProc.GraphSegmentation.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.XImgProc.GraphSegmentation.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
@spec getK(Keyword.t()) :: any() | {:error, String.t()}
@spec getK(t()) :: number() | {:error, String.t()}

getK

Positional Arguments
  • self: Evision.XImgProc.GraphSegmentation.t()
Return
  • retval: float

Python prototype (for reference only):

getK() -> retval
@spec getMinSize(Keyword.t()) :: any() | {:error, String.t()}
@spec getMinSize(t()) :: integer() | {:error, String.t()}

getMinSize

Positional Arguments
  • self: Evision.XImgProc.GraphSegmentation.t()
Return
  • retval: integer()

Python prototype (for reference only):

getMinSize() -> retval
@spec getSigma(Keyword.t()) :: any() | {:error, String.t()}
@spec getSigma(t()) :: number() | {:error, String.t()}

getSigma

Positional Arguments
  • self: Evision.XImgProc.GraphSegmentation.t()
Return
  • retval: double

Python prototype (for reference only):

getSigma() -> retval
Link to this function

processImage(named_args)

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

Segment an image and store output in dst

Positional Arguments
  • self: Evision.XImgProc.GraphSegmentation.t()

  • src: Evision.Mat.

    The input image. Any number of channel (1 (Eg: Gray), 3 (Eg: RGB), 4 (Eg: RGB-D)) can be provided

Return
  • dst: Evision.Mat.t().

    The output segmentation. It's a CV_32SC1 Mat with the same number of cols and rows as input image, with an unique, sequential, id for each pixel.

Python prototype (for reference only):

processImage(src[, dst]) -> dst
Link to this function

processImage(self, src, opts)

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

Segment an image and store output in dst

Positional Arguments
  • self: Evision.XImgProc.GraphSegmentation.t()

  • src: Evision.Mat.

    The input image. Any number of channel (1 (Eg: Gray), 3 (Eg: RGB), 4 (Eg: RGB-D)) can be provided

Return
  • dst: Evision.Mat.t().

    The output segmentation. It's a CV_32SC1 Mat with the same number of cols and rows as input image, with an unique, sequential, id for each pixel.

Python prototype (for reference only):

processImage(src[, dst]) -> dst
@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.XImgProc.GraphSegmentation.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 setK(Keyword.t()) :: any() | {:error, String.t()}
@spec setK(t(), number()) :: t() | {:error, String.t()}

setK

Positional Arguments
  • self: Evision.XImgProc.GraphSegmentation.t()
  • k: float

Python prototype (for reference only):

setK(k) -> None
@spec setMinSize(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setMinSize(self, min_size)

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

setMinSize

Positional Arguments
  • self: Evision.XImgProc.GraphSegmentation.t()
  • min_size: integer()

Python prototype (for reference only):

setMinSize(min_size) -> None
@spec setSigma(Keyword.t()) :: any() | {:error, String.t()}
@spec setSigma(t(), number()) :: t() | {:error, String.t()}

setSigma

Positional Arguments
  • self: Evision.XImgProc.GraphSegmentation.t()
  • sigma: double

Python prototype (for reference only):

setSigma(sigma) -> 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