Package boofcv.deepboof
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 Summary
Constructors Constructor Description DataManipulationOps()
-
Method Summary
Modifier and Type Method Description static Kernel1D_F32
create1D_F32(double[] kernel)
Converts the double array into a 1D float kernelstatic void
imageToTensor(Planar<GrayF32> input, deepboof.tensors.Tensor_F32 output, int miniBatch)
Converts an image into a spatial tensorstatic void
normalize(GrayF32 image, float mean, float stdev)
Normalizes a gray scale image by first subtracting the mean then dividing by stdev.static Planar<GrayF32>
tensorToImage(deepboof.tensors.Tensor_F32 input, Planar<GrayF32> output, int miniBatch)
-
Constructor Details
-
DataManipulationOps
public DataManipulationOps()
-
-
Method Details
-
normalize
Normalizes a gray scale image by first subtracting the mean then dividing by stdev.- Parameters:
image
- Image that is to be normalizedmean
- Value which is subtracted by itstdev
- The divisor
-
create1D_F32
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 imageoutput
- TensorminiBatch
- Which mini-batch in the tensor should the image be written to
-
tensorToImage
-