View Source Evision.XImgProc.Segmentation.GraphSegmentation (Evision v0.1.38)

Summary

Types

t()

Type that represents an XImgProc.Segmentation.GraphSegmentation struct.

Functions

Clears the algorithm state

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

getDefaultName

getK

getMinSize

getSigma

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.Segmentation.GraphSegmentation{ref: reference()}

Type that represents an XImgProc.Segmentation.GraphSegmentation struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec clear(Evision.XImgProc.GraphSegmentation.t()) ::
  Evision.XImgProc.GraphSegmentation.t() | {:error, String.t()}

Clears the algorithm state

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

Python prototype (for reference only):

clear() -> None
@spec empty(Evision.XImgProc.GraphSegmentation.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.Segmentation.GraphSegmentation.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
@spec getDefaultName(Evision.XImgProc.GraphSegmentation.t()) ::
  binary() | {:error, String.t()}

getDefaultName

Positional Arguments
  • self: Evision.XImgProc.Segmentation.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(Evision.XImgProc.GraphSegmentation.t()) :: number() | {:error, String.t()}

getK

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

Python prototype (for reference only):

getK() -> retval
@spec getMinSize(Evision.XImgProc.GraphSegmentation.t()) ::
  integer() | {:error, String.t()}

getMinSize

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

Python prototype (for reference only):

getMinSize() -> retval
@spec getSigma(Evision.XImgProc.GraphSegmentation.t()) ::
  number() | {:error, String.t()}

getSigma

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

Python prototype (for reference only):

getSigma() -> retval
@spec processImage(Evision.XImgProc.GraphSegmentation.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.Segmentation.GraphSegmentation.t()

  • src: Evision.Mat.t().

    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(
  Evision.XImgProc.GraphSegmentation.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.Segmentation.GraphSegmentation.t()

  • src: Evision.Mat.t().

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

Reads algorithm parameters from a file storage

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

Python prototype (for reference only):

read(fn_) -> None
@spec save(Evision.XImgProc.GraphSegmentation.t(), binary()) ::
  Evision.XImgProc.GraphSegmentation.t() | {:error, String.t()}

save

Positional Arguments
  • self: Evision.XImgProc.Segmentation.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(Evision.XImgProc.GraphSegmentation.t(), number()) ::
  Evision.XImgProc.GraphSegmentation.t() | {:error, String.t()}

setK

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

Python prototype (for reference only):

setK(k) -> None
Link to this function

setMinSize(self, min_size)

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

setMinSize

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

Python prototype (for reference only):

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

setSigma

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

Python prototype (for reference only):

setSigma(sigma) -> None
@spec write(Evision.XImgProc.GraphSegmentation.t(), Evision.FileStorage.t()) ::
  Evision.XImgProc.GraphSegmentation.t() | {:error, String.t()}

Stores algorithm parameters in a file storage

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

Python prototype (for reference only):

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

write

Positional Arguments
  • self: Evision.XImgProc.Segmentation.GraphSegmentation.t()
  • fs: Evision.FileStorage.t()
  • name: String

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None