Patent ID: 8908235

Claim:
An image reading apparatus comprising: a platen on which a document to be scanned is placed; a reading unit configured to obtain image data in a scannable area on the platen; a conveying mechanism configured to convey the reading unit in a predetermined direction; and a controller configured to: set an edge detection area in a part of the scannable area adjacent to the reading unit, the edge detection area having a dimension measuring in the predetermined direction smaller than one of multiple sections of another dimension of the scannable area measuring in the predetermined direction; control the conveying mechanism to convey the reading unit in the predetermined direction to the edge detection area; control the reading unit to obtain the image data in the edge detection area; detect a leading edge of the document based on the image data obtained by the reading unit, the leading edge being located the closest to the reading unit among edges of the document before the conveying mechanism starts conveying the reading unit in the predetermined direction; terminate the detection of a leading edge of the document if the leading edge is detected; move the edge detection area by the dimension thereof measuring in the predetermined direction if no edge is detected; repeat the control of the conveying mechanism and the reading unit to obtain image data in the moved edge detection area, the moving of the edge detection area, and the detection of a leading edge of the document until a leading edge is detected; and determine a document size based on the detected leading edge.