Class BufferedImage2Patches


  • public abstract class BufferedImage2Patches
    extends Object
    This is an abstract class designed solely to divide a given BufferedImage into n smaller BufferedImage's, each of size PatchSize X PatchSize
    Author:
    Azim Ahmadzadeh, Data Mining Lab, Georgia State University
    • Constructor Detail

      • BufferedImage2Patches

        public BufferedImage2Patches()
    • Method Detail

      • getAllPatches

        public static BufferedImage[][] getAllPatches​(BufferedImage bImage,
                                                      IMeasures.PatchSize patchChoice)
                                               throws IllegalArgumentException
        Parameters:
        bImage - the input image that is supposed to be divided into patches
        patchChoice - can be chosen from the enumeration PatchSize. This determines the size of each patch which has a square shape (i.e. height = width).
        Returns:
        A square matrix whose entities are of type BufferedImage
        Throws:
        IllegalArgumentException - in the following cases:
        • If the given bImage is not square-shaped
        • If the patchChoice is not from the enumeration in PatchSize
        • If the bImage cannot be divided into patchChoice patches