public class BoofMiscOps
extends java.lang.Object
| Constructor and Description |
|---|
BoofMiscOps() |
| Modifier and Type | Method and Description |
|---|---|
static void |
boundRectangleInside(ImageBase b,
ImageRectangle r)
Bounds the provided rectangle to be inside the image.
|
static boolean |
checkInside(ImageBase b,
double x,
double y) |
static boolean |
checkInside(ImageBase b,
double x,
double y,
double radius)
Returns true if the point is contained inside the image and 'radius' away from the image border.
|
static boolean |
checkInside(ImageBase b,
float x,
float y) |
static boolean |
checkInside(ImageBase b,
float x,
float y,
float radius)
Returns true if the point is contained inside the image and 'radius' away from the image border.
|
static boolean |
checkInside(ImageBase b,
ImageRectangle r) |
static boolean |
checkInside(ImageBase b,
int x,
int y,
int radius)
Returns true if the point is contained inside the image and 'radius' away from the image border.
|
static boolean |
checkInside(ImageBase b,
int c_x,
int c_y,
int radius,
double theta) |
static boolean |
checkInside(ImageBase b,
int x,
int y,
int radiusWidth,
int radiusHeight) |
static boolean |
checkInside(int width,
int height,
double x,
double y) |
static boolean |
checkInside(int width,
int height,
float x,
float y) |
static float[] |
convertArray(double[] input,
float[] output) |
static int[] |
convertArray(double[] input,
int[] output) |
static long[] |
convertArray(double[] input,
long[] output) |
static double[] |
convertArray(float[] input,
double[] output) |
static int[] |
convertArray(float[] input,
int[] output) |
static float[] |
convertArray(int[] input,
float[] output) |
static float[] |
convertTo_F32(double[] a,
float[] ret) |
static double[] |
convertTo_F64(int[] a) |
static int[] |
convertTo_I32(double[] a,
int[] ret) |
static int |
countNotZero(int[] a,
int size) |
static java.util.List<java.lang.String> |
directoryList(java.lang.String directory,
java.lang.String prefix)
Loads a list of files with the specified prefix.
|
static java.io.File[] |
findMatches(java.io.File directory,
java.lang.String regex)
Looks for file names which match the regex in the directory.
|
static java.io.File[] |
findMatches(java.lang.String pathRegex)
Looks up all files which are in the specified directory and match the regex.
Example: path/to/input/image\d*.jpg |
static void |
pause(long milli)
Invokes wait until the elapsed time has passed.
|
static void |
print(ImageFloat32 a) |
static void |
print(ImageFloat64 a) |
static void |
print(ImageInteger a) |
static void |
print(ImageSingleBand a) |
static void |
print(InterleavedF32 a) |
static java.lang.String |
toString(java.io.Reader r) |
public static java.lang.String toString(java.io.Reader r)
public static int countNotZero(int[] a,
int size)
public static double[] convertTo_F64(int[] a)
public static float[] convertTo_F32(double[] a,
float[] ret)
public static int[] convertTo_I32(double[] a,
int[] ret)
public static void boundRectangleInside(ImageBase b, ImageRectangle r)
b - An image.r - Rectanglepublic static boolean checkInside(ImageBase b, ImageRectangle r)
public static boolean checkInside(ImageBase b, int x, int y, int radius)
b - Imagex - x-coordinate of pointy - y-coordinate of pointradius - How many pixels away from the border it needs to be to be considered insidepublic static boolean checkInside(ImageBase b, float x, float y, float radius)
b - Imagex - x-coordinate of pointy - y-coordinate of pointradius - How many pixels away from the border it needs to be to be considered insidepublic static boolean checkInside(ImageBase b, double x, double y, double radius)
b - Imagex - x-coordinate of pointy - y-coordinate of pointradius - How many pixels away from the border it needs to be to be considered insidepublic static boolean checkInside(ImageBase b, int x, int y, int radiusWidth, int radiusHeight)
public static boolean checkInside(ImageBase b, int c_x, int c_y, int radius, double theta)
public static boolean checkInside(ImageBase b, float x, float y)
public static boolean checkInside(ImageBase b, double x, double y)
public static boolean checkInside(int width,
int height,
float x,
float y)
public static boolean checkInside(int width,
int height,
double x,
double y)
public static void pause(long milli)
milli - Length of desired pause in milliseconds.public static void print(ImageSingleBand a)
public static void print(ImageFloat64 a)
public static void print(ImageFloat32 a)
public static void print(InterleavedF32 a)
public static void print(ImageInteger a)
public static java.util.List<java.lang.String> directoryList(java.lang.String directory,
java.lang.String prefix)
directory - Directory it looks inside ofprefix - Prefix that the file must havepublic static java.io.File[] findMatches(java.io.File directory,
java.lang.String regex)
Looks for file names which match the regex in the directory.
Example:
BoofMiscOps.findMatches(new File("/path/to/directory"), ".+jpg");
directory - directoryregex - file name regexpublic static java.io.File[] findMatches(java.lang.String pathRegex)
pathRegex - regexpublic static int[] convertArray(double[] input,
int[] output)
public static long[] convertArray(double[] input,
long[] output)
public static float[] convertArray(double[] input,
float[] output)
public static double[] convertArray(float[] input,
double[] output)
public static int[] convertArray(float[] input,
int[] output)
public static float[] convertArray(int[] input,
float[] output)