Package ai.djl.opencv
Class OpenCVImageFactory
- java.lang.Object
-
- ai.djl.modality.cv.ImageFactory
-
- ai.djl.opencv.OpenCVImageFactory
-
public class OpenCVImageFactory extends ai.djl.modality.cv.ImageFactory
OpenCVImageFactory
is a high performance implementation ofImageFactory
.
-
-
Constructor Summary
Constructors Constructor Description OpenCVImageFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ai.djl.modality.cv.Image
fromFile(java.nio.file.Path path)
ai.djl.modality.cv.Image
fromImage(java.lang.Object image)
ai.djl.modality.cv.Image
fromInputStream(java.io.InputStream is)
ai.djl.modality.cv.Image
fromNDArray(ai.djl.ndarray.NDArray array)
ai.djl.modality.cv.Image
fromPixels(int[] pixels, int width, int height)
-
-
-
Method Detail
-
fromFile
public ai.djl.modality.cv.Image fromFile(java.nio.file.Path path) throws java.io.IOException
- Specified by:
fromFile
in classai.djl.modality.cv.ImageFactory
- Throws:
java.io.IOException
-
fromInputStream
public ai.djl.modality.cv.Image fromInputStream(java.io.InputStream is) throws java.io.IOException
- Specified by:
fromInputStream
in classai.djl.modality.cv.ImageFactory
- Throws:
java.io.IOException
-
fromImage
public ai.djl.modality.cv.Image fromImage(java.lang.Object image)
- Specified by:
fromImage
in classai.djl.modality.cv.ImageFactory
-
fromNDArray
public ai.djl.modality.cv.Image fromNDArray(ai.djl.ndarray.NDArray array)
- Specified by:
fromNDArray
in classai.djl.modality.cv.ImageFactory
-
fromPixels
public ai.djl.modality.cv.Image fromPixels(int[] pixels, int width, int height)
- Specified by:
fromPixels
in classai.djl.modality.cv.ImageFactory
-
-