boofcv.misc
Class BoofMiscOps
- java.lang.Object
-
- boofcv.misc.BoofMiscOps
-
public class BoofMiscOps extends java.lang.ObjectMiscellaneous functions which have no better place to go.
-
-
Constructor Summary
Constructors Constructor and Description BoofMiscOps()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidboundRectangleInside(ImageBase b, ImageRectangle r)Bounds the provided rectangle to be inside the image.static booleancheckInside(ImageBase b, double x, double y)static booleancheckInside(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 booleancheckInside(ImageBase b, float x, float y)static booleancheckInside(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 booleancheckInside(ImageBase b, ImageRectangle r)static booleancheckInside(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 booleancheckInside(ImageBase b, int c_x, int c_y, int radius, double theta)static booleancheckInside(ImageBase b, int x, int y, int radiusWidth, int radiusHeight)static booleancheckInside(int width, int height, double x, double y)static booleancheckInside(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 intcountNotZero(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*.jpgstatic voidpause(long milli)Invokes wait until the elapsed time has passed.static voidprint(GrayF32 a)static voidprint(GrayF64 a)static voidprint(GrayI a)static voidprint(ImageGray a)static voidprint(InterleavedF32 a)static java.lang.StringtoString(java.io.Reader r)
-
-
-
Method Detail
-
toString
public static java.lang.String toString(java.io.Reader r)
-
countNotZero
public static int countNotZero(int[] a, int size)
-
convertTo_F64
public static double[] convertTo_F64(int[] a)
-
convertTo_F32
public static float[] convertTo_F32(double[] a, float[] ret)
-
convertTo_I32
public static int[] convertTo_I32(double[] a, int[] ret)
-
boundRectangleInside
public static void boundRectangleInside(ImageBase b, ImageRectangle r)
Bounds the provided rectangle to be inside the image.- Parameters:
b- An image.r- Rectangle
-
checkInside
public static boolean checkInside(ImageBase b, ImageRectangle r)
-
checkInside
public 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.- Parameters:
b- Imagex- x-coordinate of pointy- y-coordinate of pointradius- How many pixels away from the border it needs to be to be considered inside- Returns:
- true if the point is inside and false if it is outside
-
checkInside
public 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.- Parameters:
b- Imagex- x-coordinate of pointy- y-coordinate of pointradius- How many pixels away from the border it needs to be to be considered inside- Returns:
- true if the point is inside and false if it is outside
-
checkInside
public 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.- Parameters:
b- Imagex- x-coordinate of pointy- y-coordinate of pointradius- How many pixels away from the border it needs to be to be considered inside- Returns:
- true if the point is inside and false if it is outside
-
checkInside
public static boolean checkInside(ImageBase b, int x, int y, int radiusWidth, int radiusHeight)
-
checkInside
public static boolean checkInside(ImageBase b, int c_x, int c_y, int radius, double theta)
-
checkInside
public static boolean checkInside(ImageBase b, float x, float y)
-
checkInside
public static boolean checkInside(ImageBase b, double x, double y)
-
checkInside
public static boolean checkInside(int width, int height, float x, float y)
-
checkInside
public static boolean checkInside(int width, int height, double x, double y)
-
pause
public static void pause(long milli)
Invokes wait until the elapsed time has passed. In the thread is interrupted, the interrupt is ignored.- Parameters:
milli- Length of desired pause in milliseconds.
-
print
public static void print(ImageGray a)
-
print
public static void print(GrayF64 a)
-
print
public static void print(GrayF32 a)
-
print
public static void print(InterleavedF32 a)
-
print
public static void print(GrayI a)
-
directoryList
public 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.- Parameters:
directory- Directory it looks inside ofprefix- Prefix that the file must have- Returns:
- List of files that are in the directory and match the prefix.
-
findMatches
public 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");- Parameters:
directory- directoryregex- file name regex- Returns:
- array of matching files
-
findMatches
public 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- Parameters:
pathRegex- regex- Returns:
- list of matching files
-
convertArray
public static int[] convertArray(double[] input, int[] output)
-
convertArray
public static long[] convertArray(double[] input, long[] output)
-
convertArray
public static float[] convertArray(double[] input, float[] output)
-
convertArray
public static double[] convertArray(float[] input, double[] output)
-
convertArray
public static int[] convertArray(float[] input, int[] output)
-
convertArray
public static float[] convertArray(int[] input, float[] output)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG