1. A three-dimensional shape measuring device that measures a three-dimensional shape of a subject included in a captured image, the three-dimensional shape measuring device comprising: a processor configured to set a coefficient that is an index of a power in a model expression for making a luminance value of the captured image be proportional to an inverse of the power of a distance from a light source to a measurement point of the luminance value according to a prescribed condition; and to measure the three-dimensional shape of the subject according to the luminance value of the captured image and the coefficient.