1. A system for classifying images, comprising: a computer with one or more central processing units, one or more memories, and one or more input devices; an input device that captures one or more images of an object, said images having one or more image lines corresponding to the object; a line generator function running on the computer that constructs a plurality of fiducial lines, said fiducial lines being a set of lines crossing the image, each said fiducial line crossing one or more of said image lines at one or more feature points, determining one or more metrics each said feature point, organizing said feature points as an ordered plurality of one-dimensional, ordered series of metrics, wherein each said ordered series of metrics corresponds to feature points along one fiducial line; and a two-dimensional hidden Markov model function running on the computer that uses said ordered plurality of one-dimensional ordered series of metrics to determine a probability that the image belongs to one or more categories and places the image in the category with highest probability, said two-dimensional hidden Markov model including a hierarchy of one-dimensional hidden Markov models operating in orthogonal directions.