A three-dimensional shape measuring device configured to measure a three-dimensional shape of a subject included in a captured image, the three-dimensional shape measuring device being characterized by comprising: calculating means configured to calculate 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; and measuring means configured to measure the three-dimensional shape of the subject according to the luminance value of the captured image and the coefficient α, wherein the calculating means is further configured to calculate the coefficient α by: setting minute height Δz, obtaining luminance values Ir, z 1 (X), Ir, z 2 (X), and Ir,z 3 (X), which are luminance values at their corresponding positions of point X in captured images obtained by capturing images of a reference object with heights from the light source being zr1=zr, zr2=zr-Δz, and zr3=zr+Δz, the reference object being a plane body for which a stored reflectance is constant and known, and obtaining, through a least squares method, coefficient α that minimizes an error of a luminance value for following three expressions when a proportionality constant in the model expression is I 0 : log Ir , z 1 X = log I 0 − α ⁢ log zr 1 log Ir , z 2 X = log I 0 − α ⁢ log zr 2 log Ir , z 3 X = log I 0 − α ⁢ log zr 3 calculating means configured to calculate 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; and measuring means configured to measure the three-dimensional shape of the subject according to the luminance value of the captured image and the coefficient α, wherein the calculating means is further configured to calculate the coefficient α by: setting minute height Δz, obtaining luminance values Ir, z 1 (X), Ir, z 2 (X), and Ir,z 3 (X), which are luminance values at their corresponding positions of point X in captured images obtained by capturing images of a reference object with heights from the light source being zr1=zr, zr2=zr-Δz, and zr3=zr+Δz, the reference object being a plane body for which a stored reflectance is constant and known, and obtaining, through a least squares method, coefficient α that minimizes an error of a luminance value for following three expressions when a proportionality constant in the model expression is I 0 : log Ir , z 1 X = log I 0 − α ⁢ log zr 1 log Ir , z 2 X = log I 0 − α ⁢ log zr 2 log Ir , z 3 X = log I 0 − α ⁢ log zr 3 setting minute height Δz, obtaining luminance values Ir, z 1 (X), Ir, z 2 (X), and Ir,z 3 (X), which are luminance values at their corresponding positions of point X in captured images obtained by capturing images of a reference object with heights from the light source being zr1=zr, zr2=zr-Δz, and zr3=zr+Δz, the reference object being a plane body for which a stored reflectance is constant and known, and obtaining, through a least squares method, coefficient α that minimizes an error of a luminance value for following three expressions when a proportionality constant in the model expression is I 0 : log Ir , z 1 X = log I 0 − α ⁢ log zr 1 log Ir , z 2 X = log I 0 − α ⁢ log zr 2 log Ir , z 3 X = log I 0 − α ⁢ log zr 3 <EOS>