Patent ID: 8300277

Claim:
An image processing apparatus comprising: a document positioning plate configured to set a document thereon; a reading unit configured to scan and read the document through the document positioning plate by moving a line sensor, which reads lines in a main scanning direction, in a sub-scanning direction to obtain read image data, wherein each of four edges of a read area of the read image data are parallel either to the main scanning direction or to the sub-scanning direction; an image processing circuit configured to process the read image data obtained by the reading unit; and an output circuit configured to output the read image data processed by the image processing circuit, wherein the image processing circuit extracts edge pixels of the read image data obtained by the reading unit and determines a first rectangle area which is a smallest rectangle including all of the extracted edge pixels, wherein four edges of the first rectangle area are parallel to four respective edges of the read image data, wherein the image processing circuit determines whether an apex of the first rectangle area located in a position farthest from a reading reference position is within a predetermined area, wherein the predetermined area is determined based on an apex position of the read image data farthest from a reading reference position, wherein the image processing circuit compares a length of the first rectangle area in the main scanning direction with a predetermined main scanning length, and compares a length of the first rectangle area in the sub-scanning direction with a predetermined sub-scanning length, wherein the predetermined main scanning length and the predetermined sub-scanning length are determined based on a size of the read image data, and wherein the output circuit outputs the document image data corresponding to a second rectangle area including the first rectangle area and the reading reference position among the read image data in a case where it is determined that the apex is within the predetermined area and it is determined that the length of the first rectangle area in the main scanning direction is equal to or greater than the predetermined main scanning length or where it is determined that the apex is within the predetermined area and it is determined that the length of the first rectangle area in the sub-scanning direction is equal to or greater than the predetermined sub-scanning length.