View Source Evision.XImgProc.Segmentation.GraphSegmentation (Evision v0.1.34)
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.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
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
getDefaultName
Positional Arguments
- self:
Evision.XImgProc.Segmentation.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
getK
Positional Arguments
- self:
Evision.XImgProc.Segmentation.GraphSegmentation.t()
Return
- retval:
float
Python prototype (for reference only):
getK() -> retval
getMinSize
Positional Arguments
- self:
Evision.XImgProc.Segmentation.GraphSegmentation.t()
Return
- retval:
int
Python prototype (for reference only):
getMinSize() -> retval
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
@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
@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