1. A shape measurement method comprising: creating a group of calculated waveforms (library) corresponding to various cross-sectional shapes by electron beam simulation; performing image pickup on a pattern formed on a sample with a scanning electron microscope (SEM); performing matching between a real waveform of an image obtained by the image pickup and the created library and selecting a calculated waveform most coinciding with the real waveform; determining a plurality of shape parameters to represent a cross-sectional shape of the pattern formed on the sample based on the selected calculated waveform; and measuring a three-dimensional shape of the pattern, from an image obtained by performing image pickup on the pattern formed on the sample with the SEM using the determined plurality of shape parameters, wherein the determination of the plurality of shape parameters is performed by supporting setting of shape parameter conditions using the created library, or by checking and determining accuracy of the result of measurement of the three-dimensional shape, or by using both.