Class JavaCVFactory
- java.lang.Object
-
- science.aist.imaging.javacv.imageprocessing.wrapper.JavaCVFactory
-
- All Implemented Interfaces:
ImageFactory<org.bytedeco.opencv.opencv_core.Mat>
public class JavaCVFactory extends Object implements ImageFactory<org.bytedeco.opencv.opencv_core.Mat>
Implements the
ImageFactory
interface forMat
- Since:
- 2.0
- Author:
- Christoph Praschl
-
-
Constructor Summary
Constructors Constructor Description JavaCVFactory()
Do not instantiate this class directly.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageWrapper<org.bytedeco.opencv.opencv_core.Mat>
getImage(int height, int width, int channelType)
ImageWrapper<org.bytedeco.opencv.opencv_core.Mat>
getImage(int height, int width, int channelType, ChannelType channel)
ImageWrapper<org.bytedeco.opencv.opencv_core.Mat>
getImage(int height, int width, ChannelType channel)
Creates a image with the given height, width and channeltypeImageWrapper<org.bytedeco.opencv.opencv_core.Mat>
getImage(int height, int width, ChannelType channel, org.bytedeco.opencv.opencv_core.Mat image)
Encapsulates the given imageImageWrapper<org.bytedeco.opencv.opencv_core.Mat>
getImage(org.bytedeco.opencv.opencv_core.Mat image)
Encapsulates the given imageImageWrapper<org.bytedeco.opencv.opencv_core.Mat>
getImage(org.bytedeco.opencv.opencv_core.Mat mat, ChannelType channelType)
Factory method for getting an opencv imageClass<org.bytedeco.opencv.opencv_core.Mat>
getSupportedType()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface science.aist.imaging.api.domain.wrapper.ImageFactory
getImage, getImage, getImage, getImage, getRandomImage
-
-
-
-
Constructor Detail
-
JavaCVFactory
public JavaCVFactory()
Do not instantiate this class directly. This constructor is only need, to work withServiceLoader
. Get yourself an instance usingImageFactoryFactory.getImageFactory(Class)
method. Usingclass = Mat.class
for this specific factory.
-
-
Method Detail
-
getImage
public ImageWrapper<org.bytedeco.opencv.opencv_core.Mat> getImage(int height, int width, ChannelType channel)
Description copied from interface:ImageFactory
Creates a image with the given height, width and channeltype- Specified by:
getImage
in interfaceImageFactory<org.bytedeco.opencv.opencv_core.Mat>
- Parameters:
height
- height of the imagewidth
- width of the imagechannel
- channeltype of the image- Returns:
- image with the given properties
-
getImage
public ImageWrapper<org.bytedeco.opencv.opencv_core.Mat> getImage(int height, int width, int channelType, ChannelType channel)
-
getImage
public ImageWrapper<org.bytedeco.opencv.opencv_core.Mat> getImage(int height, int width, int channelType)
-
getImage
public ImageWrapper<org.bytedeco.opencv.opencv_core.Mat> getImage(int height, int width, ChannelType channel, org.bytedeco.opencv.opencv_core.Mat image)
Encapsulates the given image- Specified by:
getImage
in interfaceImageFactory<org.bytedeco.opencv.opencv_core.Mat>
- Parameters:
height
- not usedwidth
- not usedchannel
- channel type of the imageimage
- the data which should be encapsulated in the image- Returns:
- Wrapper of opencv image
-
getImage
public ImageWrapper<org.bytedeco.opencv.opencv_core.Mat> getImage(org.bytedeco.opencv.opencv_core.Mat image)
Encapsulates the given image- Specified by:
getImage
in interfaceImageFactory<org.bytedeco.opencv.opencv_core.Mat>
- Parameters:
image
- to be wrapped- Returns:
- wrapped image
-
getSupportedType
public Class<org.bytedeco.opencv.opencv_core.Mat> getSupportedType()
- Specified by:
getSupportedType
in interfaceImageFactory<org.bytedeco.opencv.opencv_core.Mat>
- Returns:
- the supported image type.
-
getImage
public ImageWrapper<org.bytedeco.opencv.opencv_core.Mat> getImage(org.bytedeco.opencv.opencv_core.Mat mat, ChannelType channelType)
Factory method for getting an opencv image- Parameters:
mat
- opencv mat imagechannelType
- channel type of the image- Returns:
- returns a opencv image with given type and size
-
-