View Source Evision.ShapeTransformer (Evision v0.2.9)
Summary
Functions
Apply a transformation, given a pre-estimated transformation parameters.
Apply a transformation, given a pre-estimated transformation parameters.
Clears the algorithm state
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
Estimate the transformation parameters of the current transformer algorithm, based on point matches.
getDefaultName
Reads algorithm parameters from a file storage
save
Apply a transformation, given a pre-estimated transformation parameters, to an Image.
Apply a transformation, given a pre-estimated transformation parameters, to an Image.
Stores algorithm parameters in a file storage
write
Types
@type t() :: %Evision.ShapeTransformer{ref: reference()}
Type that represents an ShapeTransformer
struct.
ref.
reference()
The underlying erlang resource variable.
Functions
@spec applyTransformation(t(), Evision.Mat.maybe_mat_in()) :: {number(), Evision.Mat.t()} | {:error, String.t()}
Apply a transformation, given a pre-estimated transformation parameters.
Positional Arguments
self:
Evision.ShapeTransformer.t()
input:
Evision.Mat
.Contour (set of points) to apply the transformation.
Return
retval:
float
output:
Evision.Mat.t()
.Output contour.
Python prototype (for reference only):
applyTransformation(input[, output]) -> retval, output
@spec applyTransformation( t(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil ) :: {number(), Evision.Mat.t()} | {:error, String.t()}
Apply a transformation, given a pre-estimated transformation parameters.
Positional Arguments
self:
Evision.ShapeTransformer.t()
input:
Evision.Mat
.Contour (set of points) to apply the transformation.
Return
retval:
float
output:
Evision.Mat.t()
.Output contour.
Python prototype (for reference only):
applyTransformation(input[, output]) -> retval, output
@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@spec clear(t()) :: t() | {:error, String.t()}
Clears the algorithm state
Positional Arguments
- self:
Evision.ShapeTransformer.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.ShapeTransformer.t()
Return
- retval:
bool
Python prototype (for reference only):
empty() -> retval
estimateTransformation(self, transformingShape, targetShape, matches)
View Source@spec estimateTransformation( t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in(), [ Evision.DMatch.t() ] ) :: t() | {:error, String.t()}
Estimate the transformation parameters of the current transformer algorithm, based on point matches.
Positional Arguments
self:
Evision.ShapeTransformer.t()
transformingShape:
Evision.Mat
.Contour defining first shape.
targetShape:
Evision.Mat
.Contour defining second shape (Target).
matches:
[Evision.DMatch]
.Standard vector of Matches between points.
Python prototype (for reference only):
estimateTransformation(transformingShape, targetShape, matches) -> None
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}
getDefaultName
Positional Arguments
- self:
Evision.ShapeTransformer.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 read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}
Reads algorithm parameters from a file storage
Positional Arguments
- self:
Evision.ShapeTransformer.t()
- func:
Evision.FileNode
Python prototype (for reference only):
read(fn) -> None
save
Positional Arguments
- self:
Evision.ShapeTransformer.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 warpImage(t(), Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}
Apply a transformation, given a pre-estimated transformation parameters, to an Image.
Positional Arguments
self:
Evision.ShapeTransformer.t()
transformingImage:
Evision.Mat
.Input image.
Keyword Arguments
flags:
integer()
.Image interpolation method.
borderMode:
integer()
.border style.
borderValue:
Evision.scalar()
.border value.
Return
output:
Evision.Mat.t()
.Output image.
Python prototype (for reference only):
warpImage(transformingImage[, output[, flags[, borderMode[, borderValue]]]]) -> output
@spec warpImage( t(), Evision.Mat.maybe_mat_in(), [borderMode: term(), borderValue: term(), flags: term()] | nil ) :: Evision.Mat.t() | {:error, String.t()}
Apply a transformation, given a pre-estimated transformation parameters, to an Image.
Positional Arguments
self:
Evision.ShapeTransformer.t()
transformingImage:
Evision.Mat
.Input image.
Keyword Arguments
flags:
integer()
.Image interpolation method.
borderMode:
integer()
.border style.
borderValue:
Evision.scalar()
.border value.
Return
output:
Evision.Mat.t()
.Output image.
Python prototype (for reference only):
warpImage(transformingImage[, output[, flags[, borderMode[, borderValue]]]]) -> output
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}
Stores algorithm parameters in a file storage
Positional Arguments
- self:
Evision.ShapeTransformer.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.ShapeTransformer.t()
- fs:
Evision.FileStorage
- name:
String
Has overloading in C++
Python prototype (for reference only):
write(fs, name) -> None