1. A shape measuring device comprising: a stage on which a measuring object is mounted; a light projecting unit configured to irradiate the measuring object mounted on the stage with first light for shape measurement obliquely from above and irradiate the measuring object mounted on the stage with second light for surface state imaging from above or obliquely from above; a light receiving unit arranged above the stage and configured to receive the first light and the second light reflected by the measuring object mounted on the stage and output a light receiving signal indicating a light receiving amount; a first data generating unit configured to generate first stereoscopic shape data indicating a stereoscopic shape of the measuring object by a triangular distance measuring method based on the light receiving signal corresponding to the first light output by the light receiving unit; a relative distance changing unit for changing a focus position of the light receiving unit by changing a relative distance between the light receiving unit and the stage in an optical axis direction of the light receiving unit; a second data generating unit for generating a plurality of pieces of data based on a plurality of light receiving signals corresponding to the second light output by the light receiving unit while changing the focus position by the relative distance changing unit, and generating state data indicating a surface state of the measuring object by extracting and synthesizing a plurality of data portions obtained while focusing on each of a plurality of portions of the measuring object from the plurality of pieces of generated data; a synthesizing unit for generating synthesized data indicating an image in which the stereoscopic shape and the surface state of the measuring object are synthesized by synthesizing the first stereoscopic shape data generated by the first data generating unit and the state data generated by the second data generating unit; and a display section for displaying an image in which the stereoscopic shape and the surface state of the measuring object are synthesized based on the synthesized data generated by the synthesizing unit.