class KernelFactoryHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
private static double |
DTOL |
private static float |
FTOL |
| Constructor and Description |
|---|
KernelFactoryHelper()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) int |
dcomp(double d1,
double d2)
Compare two double values, allowing for a fixed
round-off tolerance
|
(package private) boolean |
dzero(double d)
Check if a double value is zero, allowing for a fixed
round-off tolerance
|
(package private) int |
fcomp(float f1,
float f2)
Compare to float values allowing for a fixed round-off tolerance
|
(package private) boolean |
feq(float f1,
float f2)
Test if two float values are equal, taking into accont a
round-off tolerance
|
(package private) float[] |
makeCircle(int radius)
Create a new float array with data for a raster circle outline
of specified radius
|
(package private) float[] |
makeRect(int w,
int h)
Create a flat array representing a rectangular grid with
all elements having value 1.0f
|
(package private) float |
normalizeAngle(float angle)
Normalize the input angle to be between -PI and PI
|
(package private) float |
normalizeAnglePositive(float angle)
Normalize the input angle to be between 0 and 2*PI
|
(package private) void |
rowFill(float[] m,
int mwidth,
int mheight)
Takes a float array with data for a closed raster shape
and fills the shape by setting element values to 1
|
private static final float FTOL
private static final double DTOL
KernelFactoryHelper()
float[] makeCircle(int radius)
float[] makeRect(int w,
int h)
w - imgWidthh - imgHeightvoid rowFill(float[] m,
int mwidth,
int mheight)
m - mwidth - mheight - float normalizeAngle(float angle)
angle - input angle (radians)float normalizeAnglePositive(float angle)
angle - input angle (radians)int dcomp(double d1,
double d2)
d1 - first valued2 - second valueboolean dzero(double d)
int fcomp(float f1,
float f2)
f1 - first valuef2 - second valueboolean feq(float f1,
float f2)
f1 - first valuef2 - second valueCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.