View Source Evision.XImgProc.GraphSegmentation (Evision v0.2.9)
Summary
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
save
setK
setMinSize
setSigma
Stores algorithm parameters in a file storage
write
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
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}
getDefaultName
Positional Arguments
- self:
Evision.XImgProc.GraphSegmentation.t()
Return
- retval:
String
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
@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
@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(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}
Reads algorithm parameters from a file storage
Positional Arguments
- self:
Evision.XImgProc.GraphSegmentation.t()
- func:
Evision.FileNode
Python prototype (for reference only):
read(fn) -> None
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
setK
Positional Arguments
- self:
Evision.XImgProc.GraphSegmentation.t()
- k:
float
Python prototype (for reference only):
setK(k) -> None
setMinSize
Positional Arguments
- self:
Evision.XImgProc.GraphSegmentation.t()
- min_size:
integer()
Python prototype (for reference only):
setMinSize(min_size) -> None
setSigma
Positional Arguments
- self:
Evision.XImgProc.GraphSegmentation.t()
- sigma:
double
Python prototype (for reference only):
setSigma(sigma) -> None
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}
Stores algorithm parameters in a file storage
Positional Arguments
- self:
Evision.XImgProc.GraphSegmentation.t()
- fs:
Evision.FileStorage
Python prototype (for reference only):
write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}
write
Positional Arguments
- self:
Evision.XImgProc.GraphSegmentation.t()
- fs:
Evision.FileStorage
- name:
String
Has overloading in C++
Python prototype (for reference only):
write(fs, name) -> None