net.sourceforge.jiu.color.data

Interface CoOccurrenceMatrix

Known Implementing Classes:
MemoryCoOccurrenceMatrix

public interface CoOccurrenceMatrix

An interface for co-occurrence matrices. An implementing class stores int counter values for pairs of pixels. These counters represent the number of times two pixels are direct neighbors in an image.
Author:
Marco Schmidt

Method Summary

void
clear()
Sets all counters to zero.
int
getDimension()
Returns the dimension of this matrix.
int
getValue(int i, int j)
Returns the matrix value at a given position.
void
incValue(int i, int j)
Increases the counter for pair (i, j) by one.
void
setValue(int i, int j, int newValue)
Sets the counter for pair (i, j) to a new value.

Method Details

clear

public void clear()
Sets all counters to zero.

getDimension

public int getDimension()
Returns the dimension of this matrix. This is the number of rows and columns.
Returns:
matrix dimension (larger than zero)

getValue

public int getValue(int i,
                    int j)
Returns the matrix value at a given position.

incValue

public void incValue(int i,
                     int j)
Increases the counter for pair (i, j) by one. This method can be implemented by the call setValue(i, j, getValue(i, j) + 1);.

setValue

public void setValue(int i,
                     int j,
                     int newValue)
Sets the counter for pair (i, j) to a new value.