An image processing apparatus includes a processor including hardware, wherein the processor is configured to: construct first and second pieces of three-dimensional image data based on two different subject images received; arrange first and second three-dimensional shapes included in the first and second pieces of three-dimensional image data at positions corresponding to pieces of image pickup position information; calculate a deviation angle based on at least one of a degree of similarity between hues, a degree of similarity between textures and a degree of similarity between edges, and correct the deviation angle and arrange the first and second three-dimensional shapes in three-dimensional space to generate a three-dimensional shape image.