Class ImgPatchVectorizer

  • All Implemented Interfaces:
    IImgPatchVectorizer

    public class ImgPatchVectorizer
    extends Object
    implements IImgPatchVectorizer
    This class extracts a set of column vectors from the input matrices. It is assumed that each new matrix in the array of matrices is another parameter at the same position. Therefore, each position 1,1 will be concatenated first, then 2,2 and so forth until the first patch is done. Then the patch is moved from having its upper left hand corner at 1,1 to having it at 1+step,1, repeating this until the bottom of the are is reached. Then the patches starts at the top again at 1,1+step, and so forth.
    Author:
    Dustin Kempton, Data Mining Lab, Georgia State University
    • Constructor Detail

      • ImgPatchVectorizer

        public ImgPatchVectorizer​(int step,
                                  int patchSize)
        Constructor constructs a new ImgPatchVectorizer with the given step size.
        Parameters:
        step - The step size of the image patches when vectorizing.
        patchSize - The size of the patches to extract from the image.
    • Method Detail

      • vectorize

        public smile.math.matrix.DenseMatrix vectorize​(smile.math.matrix.DenseMatrix[] imageDims)
        Description copied from interface: IImgPatchVectorizer
        Creates column vectors of the patches of a patch size from each of the passed in image dimensions. After each patch vectorization the patch is advanced by a step size and the process is repeated.
        Specified by:
        vectorize in interface IImgPatchVectorizer
        Parameters:
        imageDims - The set of image dimensions to vectorize patches from.
        Returns:
        The set of vectorized patches in in column major order.