Class DataManipulationOps

java.lang.Object
boofcv.deepboof.DataManipulationOps

public class DataManipulationOps
extends Object
Functions for manipulating data by transforming it or converting its format. For use with DeepBoof
  • Constructor Details

    • DataManipulationOps

      public DataManipulationOps()
  • Method Details

    • normalize

      public static void normalize​(GrayF32 image, float mean, float stdev)
      Normalizes a gray scale image by first subtracting the mean then dividing by stdev.
      Parameters:
      image - Image that is to be normalized
      mean - Value which is subtracted by it
      stdev - The divisor
    • create1D_F32

      public static Kernel1D_F32 create1D_F32​(double[] kernel)
      Converts the double array into a 1D float kernel
      Parameters:
      kernel - Kernel in array format
      Returns:
      The kernel
    • imageToTensor

      public static void imageToTensor​(Planar<GrayF32> input, deepboof.tensors.Tensor_F32 output, int miniBatch)
      Converts an image into a spatial tensor
      Parameters:
      input - BoofCV planar image
      output - Tensor
      miniBatch - Which mini-batch in the tensor should the image be written to
    • tensorToImage

      public static Planar<GrayF32> tensorToImage​(deepboof.tensors.Tensor_F32 input, Planar<GrayF32> output, int miniBatch)