Catalano.Imaging.Tools
Class ZernikeMoments
- java.lang.Object
-
- Catalano.Imaging.Tools.ZernikeMoments
-
public final class ZernikeMoments extends java.lang.ObjectCompute Zernike moments.Zernike polynomials are widely used as basis functions of image moments. Since Zernike polynomials are orthogonal to each other, Zernike moments can represent properties of an image with no redundancy or overlap of information between the moments. Although Zernike moments are significantly dependent on the scaling and the translation of the object in an ROI, their magnitudes are independent of the rotation angle of the object. Thus, they can be utilized to extract features from images that describe the shape characteristics of an object. For instance, Zernike moments are utilized as shape descriptors to classify benign and malignant breast masses.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doubleRadialPolynomial(int n, int m_in, double x, double y)Computes the Zernike radial polynomial, Rnm(p), in the definition of V(n,m,x,y).static ComplexNumberZernikeBasisFunction(int n, int m, double x, double y)Computes the Zernike basis function V(n,m,x,y).static ComplexNumberZernikeMoments(double[] x, double[] y, int nPoints, double w, double h, double cx, double cy, int n, int m)Compute zernike moments at specified order.static ComplexNumberZernikeMoments(double[] x, double[] y, int nPoints, int n, int m)Compute zernike moments at n and m moments order.static ComplexNumber[]ZernikeMoments(int order, double[] x, double[] y, int npoints)Compute the set of Zernike's moments up to the specified order.static ComplexNumber[]ZernikeMoments(int order, double[] x, double[] y, int npoints, double w, double h, double cx, double cy)Compute the set of Zernike's moments up to the specified order.
-
-
-
Method Detail
-
RadialPolynomial
public static double RadialPolynomial(int n, int m_in, double x, double y)Computes the Zernike radial polynomial, Rnm(p), in the definition of V(n,m,x,y).- Parameters:
n- Moment order.m_in- Moment order.x- X axis coordinate.y- Y axis coordinate.- Returns:
- Value of Rnm(p).
-
ZernikeBasisFunction
public static ComplexNumber ZernikeBasisFunction(int n, int m, double x, double y)
Computes the Zernike basis function V(n,m,x,y).- Parameters:
n- Moment order.m- Moment order.x- X axis coordinate.y- Y axis coordinate.- Returns:
- Complex number for V(n,m,x,y).
-
ZernikeMoments
public static ComplexNumber ZernikeMoments(double[] x, double[] y, int nPoints, int n, int m)
Compute zernike moments at n and m moments order. Also compute the width, height, and centroid of the shape.- Parameters:
x- X axis coordinates.y- Y axis coordinates.nPoints- Indicates the total number of points in the digitized shape.n- Moment order.m- Moment order.- Returns:
- Zernike moment.
-
ZernikeMoments
public static ComplexNumber ZernikeMoments(double[] x, double[] y, int nPoints, double w, double h, double cx, double cy, int n, int m)
Compute zernike moments at specified order.- Parameters:
x- X axis coordinates.y- Y axis coordinates.nPoints- Indicates the total number of points in the digitized shape.w- Width of the bounding box of the shape.h- Height of the bounding box of the shape.cx- X axis of centroid point of the shape.cy- Y axis of centroid point of the shape.n- Moment order.m- Moment order.- Returns:
- Zernike moment.
-
ZernikeMoments
public static ComplexNumber[] ZernikeMoments(int order, double[] x, double[] y, int npoints)
Compute the set of Zernike's moments up to the specified order. Also compute the width, height, and centroid of the shape.- Parameters:
order- Order.x- X axis coordinates.y- Y axis coordinates.npoints- Indicates the total number of points in the digitized shape.- Returns:
- Zernike`s moments.
-
ZernikeMoments
public static ComplexNumber[] ZernikeMoments(int order, double[] x, double[] y, int npoints, double w, double h, double cx, double cy)
Compute the set of Zernike's moments up to the specified order.- Parameters:
order- Order.x- X axis coordinate.y- Y axis coordinate.npoints- Indicates the total number of points in the digitized shape.w- Width of the bounding box of the shape.h- Height of the bounding box of the shape.cx- X axis of centroid point of the shape.cy- Y axis of centroid point of the shape.- Returns:
- Set of Zernike's moments.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG