1. A method for encoding information from a document image comprising steps of: receiving a document image; parsing the document image into sub-images; and adding information relating to the sub-images to a codebook.