1. An image processing method performed by an image processing apparatus, comprising: storing, to a storage section, a plurality of type identifiers each of which contains one or a plurality of image identifiers each for identifying each of a plurality of reference images and thereby identifies a type of a document; generating, by the image processing apparatus, a hash table indicative of a relationship between hash values and the plurality of image identifiers for each of the plurality of reference images; determining, by a controller, whether each of a plurality of obtained document images is similar to a reference image based on the hash values; when a document image is determined as being similar to the reference image, selecting, by the controller, an image identifier that identifies said reference image, from among the plurality of image identifiers; identifying, by the controller, a type identifier that contains the selected image identifier; classifying, by the controller, document images each similar to the reference image, for each identified type identifier, wherein document images in the number of image identifiers contained in a type identifier are classified for each type identifier; at each time when a document image is determined as being similar to a reference image, the controller counting up the number of document images determined as being similar; determining, by the controller, whether the counted number of document images is equal to the number of image identifiers contained in the type identifier; when said number of document images is determined as being equal to the number of image identifiers, the controller determining that said document image is the last document image to be classified to said type identifier, and outputting the classified document images to an image output apparatus.