Package adams.data.boofcv
Class BoofCVHelper
- java.lang.Object
-
- adams.data.boofcv.BoofCVHelper
-
public class BoofCVHelper extends Object
Helper class for BoofCV operations.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description BoofCVHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boofcv.struct.image.ImageBaseclone(boofcv.struct.image.ImageBase img)Clones the image.static booleanisBinary(BoofCVImageContainer img)Converts an image to greyscale and checks if it is binary or not.static boofcv.struct.image.ImageBasetoBoofCVImage(AbstractImageContainer cont, BoofCVImageType type)Converts the image container to the specified image type if necessary.static boofcv.struct.image.ImageBasetoBoofCVImage(boofcv.struct.image.ImageBase img, BoofCVImageType type)Converts the image to the specified type if necessary.static boofcv.struct.image.ImageBasetoBoofCVImage(BufferedImage img)Attempts to convert the image to the closest BoofCV type.static boofcv.struct.image.ImageBasetoBoofCVImage(BufferedImage img, BoofCVImageType type)Converts the image to the specified type if necessary.static BoofCVImageContainertoBoofCVImageContainer(AbstractImageContainer cont)Creates aBoofCVImageContainercontainer if necessary, usingBoofCVImageType.GRAYF32, otherwise it just casts the object.static BoofCVImageContainertoBoofCVImageContainer(AbstractImageContainer cont, BoofCVImageType type)Creates aBoofCVImageContainercontainer if necessary, otherwise it just casts the object.static boofcv.struct.image.ImageBasetoBoofCVMultiBandImage(BufferedImage img)Converts the image to the specified type if necessary.static BufferedImagetoBufferedImage(boofcv.struct.image.ImageBase img)Turns the image into a buffered image.
-
-
-
Method Detail
-
toBufferedImage
public static BufferedImage toBufferedImage(boofcv.struct.image.ImageBase img)
Turns the image into a buffered image.- Parameters:
img- the image to convert- Returns:
- the buffered image
-
clone
public static boofcv.struct.image.ImageBase clone(boofcv.struct.image.ImageBase img)
Clones the image.- Parameters:
img- the image to clone- Returns:
- the clone
-
toBoofCVImage
public static boofcv.struct.image.ImageBase toBoofCVImage(boofcv.struct.image.ImageBase img, BoofCVImageType type)Converts the image to the specified type if necessary.- Parameters:
img- the image to converttype- the type of image- Returns:
- the converted container
-
toBoofCVImage
public static boofcv.struct.image.ImageBase toBoofCVImage(BufferedImage img)
Attempts to convert the image to the closest BoofCV type.- Parameters:
img- the image to convert- Returns:
- the converted container
-
toBoofCVMultiBandImage
public static boofcv.struct.image.ImageBase toBoofCVMultiBandImage(BufferedImage img)
Converts the image to the specified type if necessary.- Parameters:
img- the image to convert- Returns:
- the converted image
-
toBoofCVImage
public static boofcv.struct.image.ImageBase toBoofCVImage(BufferedImage img, BoofCVImageType type)
Converts the image to the specified type if necessary.- Parameters:
img- the image to converttype- the type of image- Returns:
- the converted container
-
toBoofCVImage
public static boofcv.struct.image.ImageBase toBoofCVImage(AbstractImageContainer cont, BoofCVImageType type)
Converts the image container to the specified image type if necessary.- Parameters:
cont- the image container to converttype- the type of image- Returns:
- the converted image
-
toBoofCVImageContainer
public static BoofCVImageContainer toBoofCVImageContainer(AbstractImageContainer cont)
Creates aBoofCVImageContainercontainer if necessary, usingBoofCVImageType.GRAYF32, otherwise it just casts the object.- Parameters:
cont- the cont to cast/convert- Returns:
- the casted/converted container
-
toBoofCVImageContainer
public static BoofCVImageContainer toBoofCVImageContainer(AbstractImageContainer cont, BoofCVImageType type)
Creates aBoofCVImageContainercontainer if necessary, otherwise it just casts the object. In either, the correct image type is generated.- Parameters:
cont- the cont to cast/converttype- the type of image- Returns:
- the casted/converted container
-
isBinary
public static boolean isBinary(BoofCVImageContainer img)
Converts an image to greyscale and checks if it is binary or not.- Parameters:
img- the image to covert- Returns:
- True if the image is a binary image, false if not.
-
-