1. An image processing device, comprising: an imaging unit for taking an image of a measuring object; a stage configured to be mountable with the measuring object and to be shiftable relatively with respect to the imaging unit; and a control unit for shifting the imaging unit relatively with respect to the stage to take the image of the measuring object at a plurality of places by the imaging unit and thereby obtain a plurality of images, and for generating a composite image of the measuring object having a range which is wider than an imaging range of the imaging unit by combining the obtained plurality of images or images obtained by a certain processing from the obtained plurality of images, the control unit shifting the imaging unit relatively with respect to the stage such that parts of images adjacent to one another obtained by the imaging unit overlap, the control unit performing an image matching processing that performs image matching of an overlapping portion of the adjacent images, the control unit generating the composite image of the measuring object by joining the adjacent images at a position where the image matching is performed in the image matching processing, and the control unit calculating an angular misalignment amount of coordinates in the composite image and the stage by the image matching processing, and controlling angular shifting of the imaging unit with respect to the stage based on the misalignment amount.