public abstract class Calc
extends java.lang.Object
Constructor and Description |
---|
Calc() |
Modifier and Type | Method and Description |
---|---|
static boolean[][] |
circleMask(int diameter)
Mask of points (x,y) that satisfy x^2 + y^2 < ceil(0.25 * (d^2 + d))
which is equivalent to x^2 + y^2 < 0.25 * (d^2 + d).
|
static boolean[][] |
close(boolean[][] binary_image,
boolean[][] mask) |
static double[][][] |
diagonalize(double[][] matrix)
An implementation of the Jacobi method.
|
static boolean[][] |
dilate(boolean[][] binary_image,
boolean[][] mask) |
static long |
distanceM(java.awt.Point a,
java.awt.Point b) |
static boolean[][] |
erode(boolean[][] binary_image,
boolean[][] mask) |
static double[] |
gaussian1d(int range,
double sigma)
Return a one-dimensional Gaussian mask where the sum of all
entries is 1.
|
static double[] |
gaussian1d(int range,
double sigma,
double scale,
double step)
Returns a one-dimensional Gaussian mask whose center is scaled
to the given value "scale".
|
static double[] |
gaussianDerivative(int range,
double sigma,
double step)
Return a one-dimensional mask of minus the derivative of a Gaussian
where the sum of all entries of the original gaussian is 1.
|
static double[] |
gaussianDerivative2(int range,
double sigma,
double step) |
static double[][] |
gaussianMask(int range,
double sigma) |
static double[][] |
gaussianMask(int range,
double phi,
double sigma_x,
double sigma_y) |
static Misc.Function |
invert(Misc.Function function,
double guess,
double cutoff,
boolean growing)
Invert a monotonic function.
|
static long |
orientation(java.awt.Point a,
java.awt.Point b) |
static long |
pow(int base,
int exp) |
static double |
probit(double x)
Implementation of the probit function with double precision following
"Algorithm AS 241: The Percentage Points of the Normal Distribution"
Michael J.
|
public static long orientation(java.awt.Point a, java.awt.Point b)
public static long distanceM(java.awt.Point a, java.awt.Point b)
public static boolean[][] circleMask(int diameter)
public static double[][] gaussianMask(int range, double phi, double sigma_x, double sigma_y)
public static double[][] gaussianMask(int range, double sigma)
public static double[] gaussian1d(int range, double sigma)
public static double[] gaussian1d(int range, double sigma, double scale, double step)
public static double[] gaussianDerivative(int range, double sigma, double step)
public static double[] gaussianDerivative2(int range, double sigma, double step)
public static long pow(int base, int exp)
public static Misc.Function invert(Misc.Function function, double guess, double cutoff, boolean growing)
function
- A monotonically growing function.guess
- A guess for the values of the inverse function.cutoff
- The maximum result of the inverse function.growing
- This states whether the input function is growing
or shrinking.public static double probit(double x) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static double[][][] diagonalize(double[][] matrix)
public static boolean[][] dilate(boolean[][] binary_image, boolean[][] mask)
public static boolean[][] close(boolean[][] binary_image, boolean[][] mask)
public static boolean[][] erode(boolean[][] binary_image, boolean[][] mask)