Package net.sourceforge.jiu.color.analysis

# Class MatrixCreator

java.lang.Object
net.sourceforge.jiu.color.analysis.MatrixCreator

public class MatrixCreator extends Object
This class creates and initializes co-occurrence matrices and co-occurrence frequency matrices.

Author:
  Marco Schmidt

## Constructor Summary

Constructors
Modifier
Constructor
Description
`private`
`MatrixCreator()`

## Method Summary

Modifier and Type
Method
Description
`static CoOccurrenceFrequencyMatrix`
`createCoOccurrenceFrequencyMatrix(CoOccurrenceMatrix A)`
Creates a new co-occurrence frequency with the same dimension as the argument co-occurrence matrix, calls `initCoOccurrenceFrequencyMatrix(net.sourceforge.jiu.color.data.CoOccurrenceMatrix, net.sourceforge.jiu.color.data.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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MatrixCreator

private MatrixCreator()

## Method Details

### 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(Paletted8Image image)

### createCoOccurrenceMatrix

public static CoOccurrenceMatrix createCoOccurrenceMatrix(IntegerImage image, int channelIndex)

### 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

### 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(net.sourceforge.jiu.color.data.CoOccurrenceMatrix, net.sourceforge.jiu.color.data.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
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 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