public class UtilImageIO
extends java.lang.Object
| Constructor and Description |
|---|
UtilImageIO() |
| Modifier and Type | Method and Description |
|---|---|
static java.awt.image.BufferedImage |
loadImage(java.lang.String fileName)
A function that load the specified image.
|
static <T extends boofcv.struct.image.ImageSingleBand> |
loadImage(java.lang.String fileName,
java.lang.Class<T> imageType)
Loads the image and converts into the specified image type.
|
static java.awt.image.BufferedImage |
loadImage(java.net.URL fileName)
A function that load the specified image.
|
static java.util.List<java.awt.image.BufferedImage> |
loadImages(java.lang.String directory,
java.lang.String regex)
Loads all the image in the specified directory which match the provided regex
|
static boofcv.struct.image.ImageUInt8 |
loadPGM_U8(java.io.InputStream inputStream,
boofcv.struct.image.ImageUInt8 storage)
Loads a PGM image from an
InputStream. |
static boofcv.struct.image.ImageUInt8 |
loadPGM_U8(java.lang.String fileName,
boofcv.struct.image.ImageUInt8 storage)
Loads a PGM image from an
InputStream. |
static java.awt.image.BufferedImage |
loadPGM(java.io.InputStream inputStream,
java.awt.image.BufferedImage storage)
Loads a PGM image from an
InputStream. |
static java.awt.image.BufferedImage |
loadPGM(java.lang.String fileName,
java.awt.image.BufferedImage storage)
Loads a PGM image from a file.
|
static boofcv.struct.image.MultiSpectral<boofcv.struct.image.ImageUInt8> |
loadPPM_U8(java.io.InputStream inputStream,
boofcv.struct.image.MultiSpectral<boofcv.struct.image.ImageUInt8> storage,
org.ddogleg.struct.GrowQueue_I8 temp)
Reads a PPM image file directly into a MultiSpectral
|
static boofcv.struct.image.MultiSpectral<boofcv.struct.image.ImageUInt8> |
loadPPM_U8(java.lang.String fileName,
boofcv.struct.image.MultiSpectral<boofcv.struct.image.ImageUInt8> storage,
org.ddogleg.struct.GrowQueue_I8 temp)
Reads a PPM image file directly into a MultiSpectral
|
static java.awt.image.BufferedImage |
loadPPM(java.io.InputStream inputStream,
java.awt.image.BufferedImage storage)
Loads a PPM image from an
InputStream. |
static java.awt.image.BufferedImage |
loadPPM(java.lang.String fileName,
java.awt.image.BufferedImage storage)
Loads a PPM image from a file.
|
static void |
saveImage(java.awt.image.BufferedImage img,
java.lang.String fileName) |
static void |
savePGM(boofcv.struct.image.ImageUInt8 gray,
java.lang.String fileName)
Saves an image in PGM format.
|
static void |
savePPM(boofcv.struct.image.MultiSpectral<boofcv.struct.image.ImageUInt8> rgb,
java.lang.String fileName,
org.ddogleg.struct.GrowQueue_I8 temp)
Saves an image in PPM format.
|
public static java.awt.image.BufferedImage loadImage(java.lang.String fileName)
public static java.util.List<java.awt.image.BufferedImage> loadImages(java.lang.String directory,
java.lang.String regex)
directory - File directoryregex - Regex used to match file namespublic static java.awt.image.BufferedImage loadImage(java.net.URL fileName)
public static <T extends boofcv.struct.image.ImageSingleBand> T loadImage(java.lang.String fileName,
java.lang.Class<T> imageType)
fileName - Path to image file.imageType - Type of image that should be returned.public static void saveImage(java.awt.image.BufferedImage img,
java.lang.String fileName)
public static java.awt.image.BufferedImage loadPPM(java.lang.String fileName,
java.awt.image.BufferedImage storage)
throws java.io.IOException
fileName - Location of PPM imagestorage - (Optional) Storage for output image. Must be the width and height of the image being read.
Better performance of type BufferedImage.TYPE_INT_RGB. If null or width/height incorrect a new image
will be declared.java.io.IOExceptionpublic static java.awt.image.BufferedImage loadPGM(java.lang.String fileName,
java.awt.image.BufferedImage storage)
throws java.io.IOException
fileName - Location of PGM imagestorage - (Optional) Storage for output image. Must be the width and height of the image being read.
Better performance of type BufferedImage.TYPE_BYTE_GRAY. If null or width/height incorrect a new image
will be declared.java.io.IOExceptionpublic static java.awt.image.BufferedImage loadPPM(java.io.InputStream inputStream,
java.awt.image.BufferedImage storage)
throws java.io.IOException
InputStream.inputStream - InputStream for PPM imagestorage - (Optional) Storage for output image. Must be the width and height of the image being read.
Better performance of type BufferedImage.TYPE_INT_RGB. If null or width/height incorrect a new image
will be declared.java.io.IOExceptionpublic static java.awt.image.BufferedImage loadPGM(java.io.InputStream inputStream,
java.awt.image.BufferedImage storage)
throws java.io.IOException
InputStream.inputStream - InputStream for PGM imagestorage - (Optional) Storage for output image. Must be the width and height of the image being read.
Better performance of type BufferedImage.TYPE_BYTE_GRAY. If null or width/height incorrect a new image
will be declared.java.io.IOExceptionpublic static boofcv.struct.image.MultiSpectral<boofcv.struct.image.ImageUInt8> loadPPM_U8(java.lang.String fileName,
boofcv.struct.image.MultiSpectral<boofcv.struct.image.ImageUInt8> storage,
org.ddogleg.struct.GrowQueue_I8 temp)
throws java.io.IOException
fileName - Location of PPM filestorage - (Optional) Where the image is written in to. Will be resized if needed.
If null or the number of bands isn't 3, a new instance is declared.temp - (Optional) Used internally to store the image. Can be null.java.io.IOExceptionpublic static boofcv.struct.image.MultiSpectral<boofcv.struct.image.ImageUInt8> loadPPM_U8(java.io.InputStream inputStream,
boofcv.struct.image.MultiSpectral<boofcv.struct.image.ImageUInt8> storage,
org.ddogleg.struct.GrowQueue_I8 temp)
throws java.io.IOException
inputStream - InputStream for PPM imagestorage - (Optional) Where the image is written in to. Will be resized if needed.
If null or the number of bands isn't 3, a new instance is declared.temp - (Optional) Used internally to store the image. Can be null.java.io.IOExceptionpublic static boofcv.struct.image.ImageUInt8 loadPGM_U8(java.lang.String fileName,
boofcv.struct.image.ImageUInt8 storage)
throws java.io.IOException
InputStream.fileName - InputStream for PGM imagestorage - (Optional) Storage for output image. Must be the width and height of the image being read.
If null a new image will be declared.java.io.IOExceptionpublic static boofcv.struct.image.ImageUInt8 loadPGM_U8(java.io.InputStream inputStream,
boofcv.struct.image.ImageUInt8 storage)
throws java.io.IOException
InputStream.inputStream - InputStream for PGM imagestorage - (Optional) Storage for output image. Must be the width and height of the image being read.
If null a new image will be declared.java.io.IOExceptionpublic static void savePPM(boofcv.struct.image.MultiSpectral<boofcv.struct.image.ImageUInt8> rgb,
java.lang.String fileName,
org.ddogleg.struct.GrowQueue_I8 temp)
throws java.io.IOException
rgb - 3-band RGB imagefileName - Location where the image is to be written to.temp - (Optional) Used internally to store the image. Can be null.java.io.IOExceptionpublic static void savePGM(boofcv.struct.image.ImageUInt8 gray,
java.lang.String fileName)
throws java.io.IOException
gray - Gray scale imagefileName - Location where the image is to be written to.java.io.IOException