摘要 |
A rectangle detection device acquires image data in which an edge has been detected from an image photographed by a vehicle-mounted camera (S400), and executes a partial matching process between one square template and multiple items of image data having different magnifications (S402). In the partial matching process the rectangle detection device determines the degree of partial matching between the image data and each corner of a template at a scanning position where the image data is being scanned. If the result of the execution of the partial matching process is that a prescribed condition, wherein a rectangular shape exists, is satisfied, the result of the execution of the partial matching process, including the degree of partial matching at the scanning position, is stored. The rectangle detection device integrates the partial matching degrees stored for each item of image data having a different magnification, and detects, from the image data, a rectangular shape or an image region in which a rectangular shape exists (S404). |