An algorithm for multicolored pattern recognition is proposed. A schem
e for recognizing patterns encoded in three basic colors, i.e., red, g
reen, and blue, is presented. This scheme can be implemented optically
with grating structures. Another advantage of this scheme is its capa
bility of pattern recognition with gray levels. This can be accomplish
ed by coding gray levels with different colors.