Class MatrixCreator
java.lang.Object
net.sourceforge.jiu.color.analysis.MatrixCreator
This class creates and initializes co-occurrence matrices and co-occurrence
frequency matrices.
- Author:
- Marco Schmidt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CoOccurrenceFrequencyMatrix
Creates a new co-occurrence frequency with the same dimension as the argument co-occurrence matrix, callsinitCoOccurrenceFrequencyMatrix(net.sourceforge.jiu.color.data.CoOccurrenceMatrix, net.sourceforge.jiu.color.data.CoOccurrenceFrequencyMatrix)
with them to initialize the new matrix, then returns it.static CoOccurrenceMatrix
Create a co-occurrence matrix for a 16 bit grayscale image.static CoOccurrenceMatrix
static CoOccurrenceMatrix
createCoOccurrenceMatrix
(IntegerImage image, int channelIndex) static CoOccurrenceMatrix
static void
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
-
createCoOccurrenceMatrix
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
-
createCoOccurrenceMatrix
-
createCoOccurrenceMatrix
-
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 matrixmatrix
- 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
-
createCoOccurrenceFrequencyMatrix
Creates a new co-occurrence frequency with the same dimension as the argument co-occurrence matrix, callsinitCoOccurrenceFrequencyMatrix(net.sourceforge.jiu.color.data.CoOccurrenceMatrix, net.sourceforge.jiu.color.data.CoOccurrenceFrequencyMatrix)
with them to initialize the new matrix, then returns it. AMemoryCoOccurrenceFrequencyMatrix
is created.- Parameters:
A
- the co-occurrence matrix from which the resulting matrix will be initialized- Returns:
- the newly-created co-occurrence frequency matrix
- Throws:
IllegalArgumentException
- if the argument matrix is null
-
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 inputcofm
- co-occurrence matrix, will be initialized by this method- Throws:
IllegalArgumentException
- if either matrix is null or if the dimensions are not equal
-