1. An image processing apparatus comprising: an image input device that receives an input of an image obtained by image pickup of a living mucous membrane having a three-dimensional structure; an extraction device that extracts pixels corresponding to the structure appearing as a continuous pattern in the image from pixels included in the image inputted to the image input device; a feature value calculating device that calculates a feature value representing a feature of the structure extracted by the extraction device; and a region division device that extracts, based on the feature value calculated by the feature value calculating device, pixels corresponding to a structure that is continuous in a three-dimensional space, from the pixels corresponding to the structure.