1. A method for assigning a color class of a defined finite set of colors to at least one sub-region within a test image, comprising, by an image processing device: receiving the test image from a user device; identifying a plurality of sub-regions within the test image, wherein pixels within a sub-region of the test image have substantially the same color; selecting a first sub-region of the plurality of sub-regions, determining a first sub-region color value for the first sub-region; determining, using the first sub-region color value and a plurality of zero-order probability distributions, a first color class of the defined finite set of colors as a hypothesis color for the first sub-region, wherein the first color class is a highest probability color class for the first sub-region color value; selecting a second sub-region of the plurality of sub-regions; determining a second sub-region color value for the second sub-region; determining, using the second sub-region color value and a conditional probability distribution conditioned on the hypothesis color for the first sub-region, a second color class of the defined finite set of colors to assign to the second sub-region, wherein the second color class is a highest probability color class for the second sub-region color value; and assigning the second color class to the second sub-region.