Count the number of agreements (black matching black and white matching white). Pick the class that has the maximum number of agreements. This is a maximum correlation approach. Count the number of disagreements (black where white should be or white where black should be). Pick the class with the minimum number of disagreements. This is a minimum error approach.