In order to simply generate an accurate three-dimensional shape model, the
generating method has the step (#1) of arranging a three-dimensional
shape model in an initial state in a virtual space, the step (#2) of
projecting points on the three-dimensional shape model onto photographed
images and specifying pixels on the respective photographed images
corresponding to the points, the step (#3) of evaluating scattering of
pixel values of the respective pixels on the photographed images
corresponding to the points on the three-dimensional shape model, and the
step (#4) of deforming the three-dimensional shape model so that the
scattering of the pixel values of the respective pixels becomes small.