Documentation of 'boofcv.misc.BoofMiscOps' Java class
BoofMiscOps
boofcv.misc

Class BoofMiscOps



  • public class BoofMiscOps
    extends java.lang.Object
    Miscellaneous 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 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(GrayF32 a) 
      static void print(GrayF64 a) 
      static void print(GrayI a) 
      static void print(ImageGray a) 
      static void print(InterleavedF32 a) 
      static java.lang.String toString(java.io.Reader r) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BoofMiscOps

        public BoofMiscOps()
    • 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,
                                          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 - Image
        x - x-coordinate of point
        y - y-coordinate of point
        radius - 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 - Image
        x - x-coordinate of point
        y - y-coordinate of point
        radius - 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 - Image
        x - x-coordinate of point
        y - y-coordinate of point
        radius - 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(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 of
        prefix - 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 - directory
        regex - 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

You see the box below because you did not login.