摘要 |
There are provided an image processing apparatus, rectangle detection method and a computer-readable, non-transitory medium that can precisely detect boundaries of a document from a read image. The image processing apparatus includes an edge pixel extractor for extracting edge pixels from an input image, a line extractor for extracting a plurality of lines from the extracted edge pixels, a rectangle candidate extractor for extracting a plurality of rectangle candidates each of which is comprised of four lines, and a rectangle selector for, for each of the plurality of rectangle candidates, finding a number of edge pixels within a predetermined distance of each side of the rectangle candidate, using a distribution of edge pixels as the basis to find a corner likeness of each corner, and using the number of edge pixels and degree of corner likeness as the basis to select a rectangle from the plurality of rectangle candidates. |