Patent ID: 8159729

Claim:
An image reading apparatus that reads a document set on a document positioning plate, comprising: a detection unit configured to detect, in a predetermined area on the document placing plate, an area where a document is set; a first image generation unit configured to read a document set with a first edge of the document aligned with a reference position of the document positioning plate and to generate a first image of an area detected by the detection unit based on the read document; a second image generation unit configured to read the document re-set with a second edge different from the first edge of the document aligned with the reference position of the document positioning plate and to generate a second image based on the read document; a processing unit configured to perform matching processing to match image data of the first image with and image data of the second image and determine an offset between the first image and the second image according to the matching processing; a specification unit configured to specify a size of the document based on the offset determined by the processing unit; and a controller configured to, in a case where the area where the document is set exceeds from the predetermined area on the document placing plate when the first image is generated by the first image generating unit, cause the second image generation unit to generate the second image.