1. A document identification apparatus for discriminating various documents by comparing a feature quantity of image data of an input image of a document with a feature quantity of image data of at least one reference image stored beforehand, the document identification apparatus comprising: a calculation unit which calculates a black pixel ratio, which black pixel ratio is a ratio of black pixels existing in a predetermined number of continuous pixels in horizontal or vertical direction from a specific pixel in the image data of the input image or the reference image; and an extraction unit which divides the image data into a plurality of blocks, and separately adds the black pixel ratios corresponding to every pixel located in every block to extract a feature quantity of the image data.