for (int currentPass = 0; currentPass < numPasses; currentPass++)
{
Paletted8Image palImage = (Paletted8Image)quantizer.getOutputImage();
palette = palImage.getPalette();
// create co-occurrence matrix for paletted image
CoOccurrenceMatrix com = MatrixCreator.createCoOccurrenceMatrix(palImage);
// create co-occurrence frequency matrix for co-occurrence matrix
CoOccurrenceFrequencyMatrix cofm = MatrixCreator.createCoOccurrenceFrequencyMatrix(com);
// compute certain statistics from the co-occurrence frequency matrix
computeStatistics(cofm);
// find pairs of contouring and compressible colors