public class NativeImageLoader extends BaseImageLoader
ALLOWED_FORMATS, BASE_DIR, centerCropIfNeeded, channels, height, log, rng, width| Constructor and Description |
|---|
NativeImageLoader() |
NativeImageLoader(int height,
int width)
Instantiate an image with the given
height and width
|
NativeImageLoader(int height,
int width,
int channels)
Instantiate an image with the given
height and width
|
NativeImageLoader(int height,
int width,
int channels,
boolean centerCropIfNeeded) |
| Modifier and Type | Method and Description |
|---|---|
org.nd4j.linalg.api.ndarray.INDArray |
asMatrix(File f) |
org.nd4j.linalg.api.ndarray.INDArray |
asMatrix(InputStream is) |
org.nd4j.linalg.api.ndarray.INDArray |
asMatrix(org.bytedeco.javacpp.opencv_core.Mat image) |
org.nd4j.linalg.api.ndarray.INDArray |
asRowVector(File f)
Convert a file to a row vector
|
org.nd4j.linalg.api.ndarray.INDArray |
asRowVector(InputStream is) |
org.nd4j.linalg.api.ndarray.INDArray |
asRowVector(org.bytedeco.javacpp.opencv_core.Mat image) |
protected org.bytedeco.javacpp.opencv_core.Mat |
centerCropIfNeeded(org.bytedeco.javacpp.opencv_core.Mat img) |
protected org.bytedeco.javacpp.opencv_core.Mat |
scalingIfNeed(org.bytedeco.javacpp.opencv_core.Mat image) |
protected org.bytedeco.javacpp.opencv_core.Mat |
scalingIfNeed(org.bytedeco.javacpp.opencv_core.Mat image,
int dstHeight,
int dstWidth) |
downloadAndUntar, getAllowedFormatspublic NativeImageLoader()
public NativeImageLoader(int height,
int width)
height - the height to load*width - the width to loadpublic NativeImageLoader(int height,
int width,
int channels)
height - the height to loadwidth - the width to loadchannels - the number of channels for the image*public NativeImageLoader(int height,
int width,
int channels,
boolean centerCropIfNeeded)
public org.nd4j.linalg.api.ndarray.INDArray asRowVector(File f) throws IOException
asRowVector in class BaseImageLoaderf - the image to convertIOExceptionpublic org.nd4j.linalg.api.ndarray.INDArray asRowVector(InputStream is) throws IOException
asRowVector in class BaseImageLoaderIOExceptionpublic org.nd4j.linalg.api.ndarray.INDArray asRowVector(org.bytedeco.javacpp.opencv_core.Mat image)
throws IOException
IOExceptionpublic org.nd4j.linalg.api.ndarray.INDArray asMatrix(File f) throws IOException
asMatrix in class BaseImageLoaderIOExceptionpublic org.nd4j.linalg.api.ndarray.INDArray asMatrix(InputStream is) throws IOException
asMatrix in class BaseImageLoaderIOExceptionpublic org.nd4j.linalg.api.ndarray.INDArray asMatrix(org.bytedeco.javacpp.opencv_core.Mat image)
throws IOException
IOExceptionprotected org.bytedeco.javacpp.opencv_core.Mat centerCropIfNeeded(org.bytedeco.javacpp.opencv_core.Mat img)
protected org.bytedeco.javacpp.opencv_core.Mat scalingIfNeed(org.bytedeco.javacpp.opencv_core.Mat image)
protected org.bytedeco.javacpp.opencv_core.Mat scalingIfNeed(org.bytedeco.javacpp.opencv_core.Mat image,
int dstHeight,
int dstWidth)
Copyright © 2016. All rights reserved.