1. An image processing apparatus for extracting an original image from an image read by an image reading apparatus, comprising: a threshold value setting unit configured to set first and second threshold values adapted to determine pixels constructing edges of the original image from the image; a first detecting unit configured to detect the pixels which are included in the image and have values of the first threshold value or more; a first extracting unit configured to extract a rectangular area including the pixels detected by the first detecting unit; a line segment specifying unit configured to specify line segments acquired by extending four sides of the rectangular area toward corresponding four sides of the image, respectively; a second detecting unit configured to detect the pixels which have values of the second threshold value or more and exist near each of the line segments specified by the line segment specifying unit; a determining unit configured to determine that the rectangular area and a rectangular area including the pixels detected by the second detecting unit are the original images; and a second extracting unit configured to extract the original images determined by the determining unit.