1. A calibration method in a shape measuring apparatus, the calibration method comprising: acquiring a captured image of a lattice fringe by providing a reference gauge having a reference surface whose height from a reference plane changes in a first direction, projecting a lattice fringe having the same phase in a first direction with respect to the reference surface and having a phase sinusoidally changing in a second direction crossing the first direction, and imaging the lattice fringe; calculating a phase of a pixel in the first direction in the captured image of the lattice fringe; generating relational data in which a height of the reference surface corresponding to the pixel, a phase calculated with respect to the pixel, and a period of the lattice fringe in which the phase is calculated are associated with each other; storing the relational data in a data storage unit of the shape measuring apparatus; acquiring a phase of a measurement point obtained from lattice fringes having different phases using a phase acquisition unit of the shape measuring apparatus; acquiring height candidates with respect to periods, on the basis of the relational data and the phase acquired by the phase acquisition unit with respect to the lattice fringes whose periods are different from each other using a candidate acquisition unit of the shape measuring apparatus; and obtaining an actual height of the measurement point by extracting the height candidates having a difference minimized therebetween, among the height candidates acquired with respect to the different periods, using a height determination unit of the shape measuring apparatus.