net.sourceforge.jiu.color.analysis

Class MatrixCreator


public class MatrixCreator
extends java.lang.Object

This class creates and initializes co-occurrence matrices and co-occurrence frequency matrices.
Author:
Marco Schmidt

Constructor Summary

MatrixCreator()

Method Summary

static CoOccurrenceFrequencyMatrix
createCoOccurrenceFrequencyMatrix(CoOccurrenceMatrix A)
Creates a new co-occurrence frequency with the same dimension as the argument co-occurrence matrix, calls initCoOccurrenceFrequencyMatrix(CoOccurrenceMatrix,CoOccurrenceFrequencyMatrix) with them to initialize the new matrix, then returns it.
static CoOccurrenceMatrix
createCoOccurrenceMatrix(Gray16Image image)
Create a co-occurrence matrix for a 16 bit grayscale image.
static CoOccurrenceMatrix
createCoOccurrenceMatrix(Gray8Image image)
static CoOccurrenceMatrix
createCoOccurrenceMatrix(IntegerImage image, int channelIndex)
static CoOccurrenceMatrix
createCoOccurrenceMatrix(Paletted8Image image)
static void
initCoOccurrenceFrequencyMatrix(CoOccurrenceMatrix A, CoOccurrenceFrequencyMatrix cofm)
Initializes a co-occurrence frequency matrix from a co-occurrence matrix.
static void
initCoOccurrenceMatrix(IntegerImage image, int channelIndex, CoOccurrenceMatrix matrix)
Initializes a co-occurrence matrix from the input image, using the direct four neighbor pixels.

Constructor Details

MatrixCreator

private MatrixCreator()

Method Details

createCoOccurrenceFrequencyMatrix

public static CoOccurrenceFrequencyMatrix createCoOccurrenceFrequencyMatrix(CoOccurrenceMatrix A)
Creates a new co-occurrence frequency with the same dimension as the argument co-occurrence matrix, calls initCoOccurrenceFrequencyMatrix(CoOccurrenceMatrix,CoOccurrenceFrequencyMatrix) with them to initialize the new matrix, then returns it. A MemoryCoOccurrenceFrequencyMatrix is created.
Parameters:
A - the co-occurrence matrix from which the resulting matrix will be initialized
Returns:
the newly-created co-occurrence frequency matrix

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

createCoOccurrenceMatrix

public static CoOccurrenceMatrix createCoOccurrenceMatrix(Gray8Image image)

createCoOccurrenceMatrix

public static CoOccurrenceMatrix createCoOccurrenceMatrix(IntegerImage image,
                                                          int channelIndex)

createCoOccurrenceMatrix

public static CoOccurrenceMatrix createCoOccurrenceMatrix(Paletted8Image image)

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

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