OpenCV for Unity 2.6.5
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
Class for ContourFitting algorithms. ContourFitting match two contours \($ z_a \)$ and \($ z_b \)$ minimizing distance. More...
Public Member Functions | |
void | estimateTransformation (Mat src, Mat dst, Mat alphaPhiST, double[] dist) |
Fit two closed curves using fourier descriptors. More details in [PersoonFu1977] and [BergerRaghunathan1998]. | |
void | estimateTransformation (Mat src, Mat dst, Mat alphaPhiST, double[] dist, bool fdContour) |
Fit two closed curves using fourier descriptors. More details in [PersoonFu1977] and [BergerRaghunathan1998]. | |
int | getCtrSize () |
int | getFDSize () |
void | setCtrSize (int n) |
set number of Fourier descriptors used in estimateTransformation | |
void | setFDSize (int n) |
set number of Fourier descriptors when estimateTransformation used vector<Point> | |
Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
virtual void | clear () |
Clears the algorithm state. | |
virtual bool | empty () |
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. | |
virtual string | getDefaultName () |
IntPtr | getNativeObjAddr () |
void | save (string filename) |
Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
void | Dispose () |
void | ThrowIfDisposed () |
Static Public Member Functions | |
static new ContourFitting | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
static Algorithm | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject | |
DisposableOpenCVObject () | |
DisposableOpenCVObject (bool isEnabledDispose) | |
DisposableOpenCVObject (IntPtr ptr) | |
DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose) | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.DisposableObject | |
DisposableObject () | |
DisposableObject (bool isEnabledDispose) | |
Additional Inherited Members | |
Package Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject | |
Properties inherited from OpenCVForUnity.DisposableObject | |
bool | IsDisposed [get, protected set] |
bool | IsEnabledDispose [get, set] |
Class for ContourFitting algorithms. ContourFitting match two contours \($ z_a \)$ and \($ z_b \)$ minimizing distance.
\[ d(z_a,z_b)=\sum (a_n - s b_n e^{j(n \alpha +\phi )})^2 \]
where \($ a_n \)$ and \($ b_n \)$ are Fourier descriptors of \($ z_a \)$ and \($ z_b \)$ and s is a scaling factor and \($ \phi \)$ is angle rotation and \($ \alpha \)$ is starting point factor adjustement
|
static |
|
protectedvirtual |
Reimplemented from OpenCVForUnity.CoreModule.Algorithm.
void OpenCVForUnity.XimgprocModule.ContourFitting.estimateTransformation | ( | Mat | src, |
Mat | dst, | ||
Mat | alphaPhiST, | ||
double[] | dist ) |
Fit two closed curves using fourier descriptors. More details in [PersoonFu1977] and [BergerRaghunathan1998].
src | Contour defining first shape. |
dst | Contour defining second shape (Target). |
alphaPhiST | : \( \alpha \)=alphaPhiST(0,0), \( \phi \)=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center |
dist | distance between src and dst after matching. |
fdContour | false then src and dst are contours and true src and dst are fourier descriptors. |
void OpenCVForUnity.XimgprocModule.ContourFitting.estimateTransformation | ( | Mat | src, |
Mat | dst, | ||
Mat | alphaPhiST, | ||
double[] | dist, | ||
bool | fdContour ) |
Fit two closed curves using fourier descriptors. More details in [PersoonFu1977] and [BergerRaghunathan1998].
src | Contour defining first shape. |
dst | Contour defining second shape (Target). |
alphaPhiST | : \( \alpha \)=alphaPhiST(0,0), \( \phi \)=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center |
dist | distance between src and dst after matching. |
fdContour | false then src and dst are contours and true src and dst are fourier descriptors. |
int OpenCVForUnity.XimgprocModule.ContourFitting.getCtrSize | ( | ) |
int OpenCVForUnity.XimgprocModule.ContourFitting.getFDSize | ( | ) |
void OpenCVForUnity.XimgprocModule.ContourFitting.setCtrSize | ( | int | n | ) |
set number of Fourier descriptors used in estimateTransformation
n | number of Fourier descriptors equal to number of contour points after resampling. |
void OpenCVForUnity.XimgprocModule.ContourFitting.setFDSize | ( | int | n | ) |
set number of Fourier descriptors when estimateTransformation used vector<Point>
n | number of fourier descriptors used for optimal curve matching. |