View Source Evision.XImgProc.ContourFitting (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
Fit two closed curves using fourier descriptors. More details in @cite PersoonFu1977 and @cite BergerRaghunathan1998
Fit two closed curves using fourier descriptors. More details in @cite PersoonFu1977 and @cite BergerRaghunathan1998
getCtrSize
getDefaultName
getFDSize
Reads algorithm parameters from a file storage
save
set number of Fourier descriptors used in estimateTransformation
set number of Fourier descriptors when estimateTransformation used vector<Point>
Stores algorithm parameters in a file storage
write
Types
@type t() :: %Evision.XImgProc.ContourFitting{ref: reference()}
Type that represents an XImgProc.ContourFitting
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.ContourFitting.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.ContourFitting.t()
Return
- retval:
bool
Python prototype (for reference only):
empty() -> retval
@spec estimateTransformation( t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in() ) :: {Evision.Mat.t(), number()} | {:error, String.t()}
Fit two closed curves using fourier descriptors. More details in @cite PersoonFu1977 and @cite BergerRaghunathan1998
Positional Arguments
self:
Evision.XImgProc.ContourFitting.t()
src:
Evision.Mat
.Contour defining first shape.
dst:
Evision.Mat
.Contour defining second shape (Target).
Keyword Arguments
fdContour:
bool
.false then src and dst are contours and true src and dst are fourier descriptors.
Return
alphaPhiST:
Evision.Mat.t()
.: \f$ \alpha \f$=alphaPhiST(0,0), \f$ \phi \f$=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center
dist:
double
.distance between src and dst after matching.
Python prototype (for reference only):
estimateTransformation(src, dst[, alphaPhiST[, fdContour]]) -> alphaPhiST, dist
@spec estimateTransformation( t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in(), [{:fdContour, term()}] | nil ) :: {Evision.Mat.t(), number()} | {:error, String.t()}
Fit two closed curves using fourier descriptors. More details in @cite PersoonFu1977 and @cite BergerRaghunathan1998
Positional Arguments
self:
Evision.XImgProc.ContourFitting.t()
src:
Evision.Mat
.Contour defining first shape.
dst:
Evision.Mat
.Contour defining second shape (Target).
Keyword Arguments
fdContour:
bool
.false then src and dst are contours and true src and dst are fourier descriptors.
Return
alphaPhiST:
Evision.Mat.t()
.: \f$ \alpha \f$=alphaPhiST(0,0), \f$ \phi \f$=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center
dist:
double
.distance between src and dst after matching.
Python prototype (for reference only):
estimateTransformation(src, dst[, alphaPhiST[, fdContour]]) -> alphaPhiST, dist
@spec getCtrSize(Keyword.t()) :: any() | {:error, String.t()}
@spec getCtrSize(t()) :: integer() | {:error, String.t()}
getCtrSize
Positional Arguments
- self:
Evision.XImgProc.ContourFitting.t()
Return
- retval:
integer()
@returns number of fourier descriptors
Python prototype (for reference only):
getCtrSize() -> retval
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}
getDefaultName
Positional Arguments
- self:
Evision.XImgProc.ContourFitting.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 getFDSize(Keyword.t()) :: any() | {:error, String.t()}
@spec getFDSize(t()) :: integer() | {:error, String.t()}
getFDSize
Positional Arguments
- self:
Evision.XImgProc.ContourFitting.t()
Return
- retval:
integer()
@returns number of fourier descriptors used for optimal curve matching
Python prototype (for reference only):
getFDSize() -> retval
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}
Reads algorithm parameters from a file storage
Positional Arguments
- self:
Evision.XImgProc.ContourFitting.t()
- func:
Evision.FileNode
Python prototype (for reference only):
read(fn) -> None
save
Positional Arguments
- self:
Evision.XImgProc.ContourFitting.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
set number of Fourier descriptors used in estimateTransformation
Positional Arguments
self:
Evision.XImgProc.ContourFitting.t()
n:
integer()
.number of Fourier descriptors equal to number of contour points after resampling.
Python prototype (for reference only):
setCtrSize(n) -> None
set number of Fourier descriptors when estimateTransformation used vector<Point>
Positional Arguments
self:
Evision.XImgProc.ContourFitting.t()
n:
integer()
.number of fourier descriptors used for optimal curve matching.
Python prototype (for reference only):
setFDSize(n) -> None
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}
Stores algorithm parameters in a file storage
Positional Arguments
- self:
Evision.XImgProc.ContourFitting.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.ContourFitting.t()
- fs:
Evision.FileStorage
- name:
String
Has overloading in C++
Python prototype (for reference only):
write(fs, name) -> None