|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mines.jtk.dsp.LocalOrientFilter
public class LocalOrientFilter
Local estimates of orientations of features in images. Methods of this class can compute for each image sample numerous parameters related to orientation. All orientation information is derived from eigenvectors and eigenvalues of the structure tensor (also called the "gradient-squared tensor"). This tensor is equivalent to a matrix of 2nd partial derivatives of an autocorrelation evaluated at zero lag. In other words, orientation is here determined by the (2-D) ellipse or (3-D) ellipsoid that best fits the peak of the autocorrelation of image samples in a local window.
The coordinate system for a 2-D image has two orthogonal axes 1 and 2, which correspond to the 1st and 2nd indices of the array containing image samples. For 2-D images, the eigenvectors are the unit vectors u = (u1,u2) and v = (v1,v2). The 1st eigenvector u is perpendicular to the best fitting line, and the 1st component u1 of u is always non-negative. The 2nd eigenvector v is perpendicular to u such that the cross product u1*v2-u2*v1 = 1; that is, v1 = -u2 and v2 = u1. The angle theta = asin(u2) is the angle measured counter-clockwise between the 1st eigenvector u and axis 1; -pi/2 <= theta <= pi/2.
The coordinate system for a 3-D image has three orthogonal axes 1, 2 and 3, which correspond to the 1st, 2nd and 3rd indices of the array containing image samples. For 3-D images, the eigenvectors are unit vectors u = (u1,u2,u3), v = (v1,v2,v3), and w = (w1,w2,w3). The 1st eigenvector u is orthogonal to the best fitting plane, and the 1st component u1 of u is always non-negative. The 2nd eigenvector v is orthogonal to the best fitting line within the best fitting plane. The 3rd eigenvector w is orthogonal to both u and v and is aligned with the direction in which the images changes least. The dip angle theta = acos(u1) is the angle between the 1st eigenvector u and axis 1; 0 <= theta <= pi/2. The azimuthal angle phi = atan2(u3,u2) is well-defined for only non-zero theta; -pi <= phi <= pi.
The local linearity or planarity of features is determined by the eigenvalues. For 2-D images with eigenvalues eu and ev (corresponding to the eigenvectors u and v), linearity is (eu-ev)/eu. For 3-D images with eigenvalues eu, ev, and ew, planarity is (eu-ev)/eu and linearity is (ev-ew)/eu. Both linearity and planarity are in the range [0,1].
| Constructor Summary | |
|---|---|
LocalOrientFilter(double sigma)
Constructs a filter with an isotropic Gaussian window. |
|
LocalOrientFilter(double sigma1,
double sigma2)
Constructs a filter with a possibly anisotropic Gaussian window. |
|
LocalOrientFilter(double sigma1,
double sigma2,
double sigma3)
Constructs a filter with a possibly anisotropic Gaussian window. |
|
| Method Summary | |
|---|---|
void |
apply(float[][][] x,
float[][][] theta,
float[][][] phi,
float[][][] u1,
float[][][] u2,
float[][][] u3,
float[][][] v1,
float[][][] v2,
float[][][] v3,
float[][][] w1,
float[][][] w2,
float[][][] w3,
float[][][] eu,
float[][][] ev,
float[][][] ew,
float[][][] ep,
float[][][] el)
Applies this filter for the specified image and outputs. |
void |
apply(float[][] x,
float[][] theta,
float[][] u1,
float[][] u2,
float[][] v1,
float[][] v2,
float[][] eu,
float[][] ev,
float[][] el)
Applies this filter for the specified image and outputs. |
void |
applyForInline(float[][][] x,
float[][][] w1,
float[][][] w2,
float[][][] w3)
Applies this filter to estimate inline vectors (3rd eigenvectors). |
void |
applyForInlineLinear(float[][][] x,
float[][][] w1,
float[][][] w2,
float[][][] w3,
float[][][] el)
Applies this filter to estimate inline vectors and linearities. |
void |
applyForNormal(float[][][] x,
float[][][] u1,
float[][][] u2,
float[][][] u3)
Applies this filter to estimate normal vectors (1st eigenvectors). |
void |
applyForNormal(float[][] x,
float[][] u1,
float[][] u2)
Applies this filter to estimate normal vectors (1st eigenvectors). |
void |
applyForNormalLinear(float[][] x,
float[][] u1,
float[][] u2,
float[][] el)
Applies this filter to estimate normal vectors and linearities. |
void |
applyForNormalPlanar(float[][][] x,
float[][][] u1,
float[][][] u2,
float[][][] u3,
float[][][] ep)
Applies this filter to estimate normal vectors and planarities. |
EigenTensors2 |
applyForTensors(float[][] x)
Applies this filter to estimate 2-D structure tensors. |
EigenTensors3 |
applyForTensors(float[][][] x)
Applies this filter to estimate compressed 3-D structure tensors. |
EigenTensors3 |
applyForTensors(float[][][] x,
boolean compressed)
Applies this filter to estimate 3-D structure tensors. |
void |
applyForTheta(float[][] x,
float[][] theta)
Applies this filter to estimate orientation angles. |
void |
applyForThetaPhi(float[][][] x,
float[][][] theta,
float[][][] phi)
Applies this filter to estimate orientation angles. |
void |
setGradientSmoothing(double sigma)
Sets half-width of Gaussian derivative filter used to compute gradients. |
void |
setGradientSmoothing(double sigma1,
double sigma2)
Sets half-widths of Gaussian derivative filters used to compute gradients. |
void |
setGradientSmoothing(double sigma1,
double sigma2,
double sigma3)
Sets half-widths of Gaussian derivative filters used to compute gradients. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalOrientFilter(double sigma)
sigma - half-width of window; same for all dimensions.
public LocalOrientFilter(double sigma1,
double sigma2)
sigma1 - half-width of window in 1st dimension.sigma2 - half-width of window in 2nd and higher dimensions.
public LocalOrientFilter(double sigma1,
double sigma2,
double sigma3)
sigma1 - half-width of window in 1st dimension.sigma2 - half-width of window in 2nd dimension.sigma3 - half-width of window in 3rd and higher dimensions.| Method Detail |
|---|
public void setGradientSmoothing(double sigma)
sigma - half-width of derivatives; same for all dimensions.
public void setGradientSmoothing(double sigma1,
double sigma2)
sigma1 - half-width of derivative in 1st dimension.sigma2 - half-width of derivatives in 2nd and higher dimensions.
public void setGradientSmoothing(double sigma1,
double sigma2,
double sigma3)
sigma1 - half-width of derivative in 1st dimension.sigma2 - half-width of derivative in 2nd dimension.sigma3 - half-width of derivatives in 3rd and higher dimensions.
public void applyForTheta(float[][] x,
float[][] theta)
x - input array for 2-D image.theta - orientation angle; -pi <= theta <= pi
public void applyForNormal(float[][] x,
float[][] u1,
float[][] u2)
x - input array for 2-D image.u1 - 1st component of normal vector.u2 - 2nd component of normal vector.
public void applyForNormalLinear(float[][] x,
float[][] u1,
float[][] u2,
float[][] el)
x - input array for 2-D image.u1 - 1st component of normal vector.u2 - 2nd component of normal vector.el - linearity in range [0,1].public EigenTensors2 applyForTensors(float[][] x)
x - input array for 2-D image.
public void apply(float[][] x,
float[][] theta,
float[][] u1,
float[][] u2,
float[][] v1,
float[][] v2,
float[][] eu,
float[][] ev,
float[][] el)
x - input array for 2-D imagetheta - orientation angle = asin(u2); -pi <= theta <= piu1 - 1st component of 1st eigenvector.u2 - 2nd component of 1st eigenvector.v1 - 1st component of 2nd eigenvector.v2 - 2nd component of 2nd eigenvector.eu - largest eigenvalue corresponding to the eigenvector u.ev - smallest eigenvalue corresponding to the eigenvector v.el - (eu-ev)/eu, a measure of linearity.
public void applyForThetaPhi(float[][][] x,
float[][][] theta,
float[][][] phi)
x - input array for 3-D image.theta - orientation dip angle; 0 <= theta <= pi/2.phi - orientation azimuthal angle; -pi <= phi <= pi.
public void applyForNormal(float[][][] x,
float[][][] u1,
float[][][] u2,
float[][][] u3)
x - input array for 3-D image.u1 - 1st component of normal vector.u2 - 2nd component of normal vector.u3 - 3rd component of normal vector.
public void applyForNormalPlanar(float[][][] x,
float[][][] u1,
float[][][] u2,
float[][][] u3,
float[][][] ep)
x - input array for 3-D image.u1 - 1st component of normal vector.u2 - 2nd component of normal vector.u3 - 3rd component of normal vector.ep - planarity in range [0,1].
public void applyForInline(float[][][] x,
float[][][] w1,
float[][][] w2,
float[][][] w3)
x - input array for 3-D image.w1 - 1st component of inline vector.w2 - 2nd component of inline vector.w3 - 3rd component of inline vector.
public void applyForInlineLinear(float[][][] x,
float[][][] w1,
float[][][] w2,
float[][][] w3,
float[][][] el)
x - input array for 3-D image.w1 - 1st component of inline vector.w2 - 2nd component of inline vector.w3 - 3rd component of inline vector.el - linearity in range [0,1].public EigenTensors3 applyForTensors(float[][][] x)
x - input array for 3-D image.
public EigenTensors3 applyForTensors(float[][][] x,
boolean compressed)
x - input array for 3-D image.compressed - true, for compressed tensors; false, otherwise.
public void apply(float[][][] x,
float[][][] theta,
float[][][] phi,
float[][][] u1,
float[][][] u2,
float[][][] u3,
float[][][] v1,
float[][][] v2,
float[][][] v3,
float[][][] w1,
float[][][] w2,
float[][][] w3,
float[][][] eu,
float[][][] ev,
float[][][] ew,
float[][][] ep,
float[][][] el)
x - input array for 3-D image.theta - orientation dip angle; 0 <= theta <= pi/2.phi - orientation azimuthal angle; -pi <= phi <= pi.u1 - 1st component of 1st eigenvector.u2 - 2nd component of 1st eigenvector.u3 - 3rd component of 1st eigenvector.v1 - 1st component of 2nd eigenvector.v2 - 2nd component of 2nd eigenvector.v3 - 3rd component of 2nd eigenvector.w1 - 1st component of 3rd eigenvector.w2 - 2nd component of 3rd eigenvector.w3 - 3rd component of 3rd eigenvector.eu - largest eigenvalue corresponding to the eigenvector u.ev - middle eigenvalue corresponding to the eigenvector v.ew - smallest eigenvalue corresponding to the eigenvector w.ep - (eu-ev)/eu, a measure of planarity.el - (ev-ew)/eu, a measure of linearity.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||