public class GradientVector
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
GradientVector(Dataset input)
Computes the gradient vector from the input data
|
GradientVector(Dataset dx,
Dataset dy)
Computes the gradient vector from the horizontal and vertical gradients
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
calc(Dataset input)
Calculates the magnitude and direction of the gradient vectors for the given input.
|
(package private) void |
calc(Dataset dx,
Dataset dy)
Calculates the magnitude and direction of the gradient vectors for the given horizontal and
vertical gradients.
|
Dataset |
getAngles()
Angles of gradient vectors
|
double[][] |
gethKernel()
Horizontal gradient kernel
|
Dataset |
getMagnitudes()
Magnitudes of gradient vectors
|
double[][] |
getvKernel()
Vertical gradient kernel
|
Dataset |
hGrad(Dataset input)
Calculates the horizontal gradient of the input
|
void |
sethKernel(double[][] hKernel)
Sets the kernel for calculating horizontal gradient
|
void |
setvKernel(double[][] vKernel)
Sets the kernel for calculating vertical gradient
|
Dataset |
vGrad(Dataset input)
Calculates the vertical gradient of the input
|
public GradientVector(Dataset input)
input
- input datapublic Dataset hGrad(Dataset input)
input
- input Datasetpublic Dataset vGrad(Dataset input)
input
- input Datasetvoid calc(Dataset input)
input
- input Datasetvoid calc(Dataset dx, Dataset dy)
dx
- horizontal gradientdy
- vertical gradientpublic Dataset getMagnitudes()
public Dataset getAngles()
public double[][] gethKernel()
public void sethKernel(double[][] hKernel)
hKernel
- new kernelpublic double[][] getvKernel()
public void setvKernel(double[][] vKernel)
vKernel
- new kernel