1. An image processing apparatus for determining presence or absence of write-in in an obtained document image, comprising: a first determination section which determines whether the obtained document image is similar to a preliminary reference image; a second determination section which, when said first determination section determines that the obtained document image is similar to the reference image, determines whether write-in is present in the obtained document image; a control section which, in accordance with the determination result of the second determination section, controls output processing for the obtained document image or the reference image; a pixel value calculating section which calculates a pixel value of each pixel in a first pixel block containing a current pixel in the obtained document image, on the basis of a pixel value of each pixel in a second pixel block containing the current pixel; and an edge determining section which determines whether the current pixel is an edge pixel on the basis of distribution of the pixel values of the respective pixels in the first pixel block calculated by said pixel value calculating section, wherein said second determination section determines whether write-in is present in the obtained document image on the basis of the number of edge pixels determined by said edge determining section.