1. An image processing apparatus comprising: an image input section configured to input time-series images obtained by acquiring an image including a first boundary of a wall and a second boundary of the wall; a boundary setting section configured to set the first boundary and the second boundary in an initial image of the time-series images; a normalized-image generating section configured to generate a normalized image on the basis of an image pattern between the set first boundary and the set second boundary; a template storage section configured to store the normalized image generated from the initial image as a template image; and a boundary retrieval section configured to search each of time-series images for the second boundary which generates the most similar normalized image to the template image.