Class MatrixCreator


  • public class MatrixCreator
    extends Object
    This class creates and initializes co-occurrence matrices and co-occurrence frequency matrices.
    Author:
    Marco Schmidt
    • Constructor Detail

      • MatrixCreator

        private MatrixCreator()
    • Method Detail

      • createCoOccurrenceMatrix

        public static CoOccurrenceMatrix createCoOccurrenceMatrix​(Gray16Image image)
        Create a co-occurrence matrix for a 16 bit grayscale image.
        Parameters:
        image - the image for which the matrix is created
        Returns:
        the resulting matrix
        Since:
        0.15.0
      • initCoOccurrenceMatrix

        public static void initCoOccurrenceMatrix​(IntegerImage image,
                                                  int channelIndex,
                                                  CoOccurrenceMatrix matrix)
        Initializes a co-occurrence matrix from the input image, using the direct four neighbor pixels. The number of entries in the palette of the argument image must be equal to the dimension of the argument matrix.
        Parameters:
        image - the image that will be used to initialize the matrix
        matrix - the matrix that will first be cleared and then initialized from the image
        Throws:
        IllegalArgumentException - if at least one of the arguments is null or if the palette size is not equal to the matrix dimension
      • initCoOccurrenceFrequencyMatrix

        public static void initCoOccurrenceFrequencyMatrix​(CoOccurrenceMatrix A,
                                                           CoOccurrenceFrequencyMatrix cofm)
        Initializes a co-occurrence frequency matrix from a co-occurrence matrix. The two argument matrices must be non-null and have the same dimension.
        Parameters:
        A - co-occurrence matrix used as input
        cofm - co-occurrence matrix, will be initialized by this method
        Throws:
        IllegalArgumentException - if either matrix is null or if the dimensions are not equal