1. A method of recognizing an object in an image, comprising steps of: providing the image having the object, and encoding principal traits of the object in order to generate a first trait code; comparing the first trait code with data stored in a database so as to obtain a plurality of differences; and finding a minimum of the plurality of differences.