1. An image processing apparatus that conducts template matching among a plurality of images, and comprising: image acquiring unit for acquiring two or more parallax images of the same subject; feature point setting unit for setting feature points in one of the images acquired by the image acquiring unit; template setting unit for setting a base template that includes a feature point set by the feature point setting unit; image determining unit for determining whether or not an image within the base template set by the template setting unit is segmented by an edge; transformed template setting unit for setting a transformed template in the case where it is determined that the image within the base template is segmented, wherein a segmented sub-region that does not contain the feature point is deleted from the base template, and a region equal in area to the deleted region is added to the sub-region that does contain the feature point; matching unit for conducting template matching with respect to the one or more other images, using at least the base template or the transformed template; and distance computing unit for computing the shooting distance to the feature point matched by the template matching conducted by the matching unit.