A method for detecting an obstacle by using two cameras of three or more
cameras, the obstacle being on a reference plane in a field of view
common to the two cameras, the method inputting a first image and a
second image from the two cameras, respectively, transforming the first
image to a transformed image, obtaining a degree of similarity D
indicating a similarity between an image in a processing region
established in the second image and an image in a corresponding
processing region established in the first image, obtaining a degree of
similarity P indicating a similarity between an image in the processing
region established in the second image and an image in a corresponding
processing region established in the transformed image, detecting the
obstacle based on the degree of similarity D and the degree of similarity
P on a reference plane region, and selecting and outputting either a
result of detection of a plurality of the obstacles or a position of an
obstacle detected as being the closest to the three or more cameras.