1. A three-dimensional measuring method of projecting a stripe pattern having colored stripes on an object and measuring a three-dimensional shape of the object based on positions of the stripes on the imaged image corresponding to the stripes on the stripe pattern, said method comprising the steps of: setting the colors of the stripes on the stripe pattern according to a predetermined rule; extracting a plurality of stripes having a predetermined positional relationship from the image, and calculating correspondence between the stripes on the imaged image and the stripes on the stripe pattern based on a color arrangement of the extracted plural stripes.