A three dimensional measurement apparatus comprising: projection means for projecting a pattern (2109, 2201, 2205, 2207, 2401, 2414, 2427, 2428, 4101, 4201-4203, 4301, 4401-4404, 4501, 4601-4603, 5101, 5201, 5301, 5401, 5501) onto an object, the pattern including a measurement pattern (2101-2102, 2308, 2402-2403, 2415-2416) which is used to divide the pattern, and a feature pattern (2103, 2204, 2206, 2208, 2309-2312, 2406-2407, 2419-2420, 5102-5103, 5202-5203, 5302, 5402-5403, 5503) which is generated from a code sequence, wherein: the code sequence is a code sequence where an arbitrarily selected partial sequence of the used sequence can be uniquely identified and differentiated from other partial sequences; among a plurality of regions of the pattern divided by a plurality of epipolar lines (2104-2107, 2303) and the measurement patterns, a plurality of regions (2209-2211, 2408-2413, 2421-2426) adjacent to each other in the direction in which measurement patterns extend are grouped as one group; a plurality of groups having the same shape are arranged in the pattern; a feature pattern is assigned to one group (2108, 2304-2307, 2404-2405, 2417-2418, 2404, 4102, 4302, 4502, 5304, 5502) according to a corresponding code in the code sequence; image capturing means for capturing an image of the object onto which the pattern is projected; grouping means for dividing the image captured by said image capturing means into the plurality of regions (2209-2211, 2408-2413, 2421-2426) using the measurement pattern in the pattern and the plurality of epipolar lines (2104-2107, 2303) which are lines at which an epipolar plane is determined based on a positional relationship between said projection means and said image capturing means, and grouping into a group (2108, 2304-2307, 2404-2405, 2417-2418, 2404, 4102, 4302, 4502, 5304, 5502) a plurality of predetermined regions among the plurality of divided regions; feature recognition means for recognizing a feature pattern in each group based on a difference in ratio between an area of each region in this group and that of a feature pattern within this region in this group to assign a code to this group, and to generate a second code sequence; and three-dimensional shape calculation means for acquiring the second code sequence from the feature recognition means, searching for a correspondence between the second code sequence and the code sequence which is used to generate the pattern, associating the positions of the measurement patterns captured by the image capturing means and the measurement patterns projected by the projection means based on the correspondence between the two code sequences (2110, 2313), and calculating a three-dimensional shape of the object based on the feature pattern recognized by said feature recognition means, in accordance with the principle of triangulation based on the positions of the measurement patterns. the code sequence is a code sequence where an arbitrarily selected partial sequence of the used sequence can be uniquely identified and differentiated from other partial sequences; among a plurality of regions of the pattern divided by a plurality of epipolar lines (2104-2107, 2303) and the measurement patterns, a plurality of regions (2209-2211, 2408-2413, 2421-2426) adjacent to each other in the direction in which measurement patterns extend are grouped as one group; a plurality of groups having the same shape are arranged in the pattern; a feature pattern is assigned to one group (2108, 2304-2307, 2404-2405, 2417-2418, 2404, 4102, 4302, 4502, 5304, 5502) according to a corresponding code in the code sequence; image capturing means for capturing an image of the object onto which the pattern is projected; grouping means for dividing the image captured by said image capturing means into the plurality of regions (2209-2211, 2408-2413, 2421-2426) using the measurement pattern in the pattern and the plurality of epipolar lines (2104-2107, 2303) which are lines at which an epipolar plane is determined based on a positional relationship between said projection means and said image capturing means, and grouping into a group (2108, 2304-2307, 2404-2405, 2417-2418, 2404, 4102, 4302, 4502, 5304, 5502) a plurality of predetermined regions among the plurality of divided regions; feature recognition means for recognizing a feature pattern in each group based on a difference in ratio between an area of each region in this group and that of a feature pattern within this region in this group to assign a code to this group, and to generate a second code sequence; and three-dimensional shape calculation means for acquiring the second code sequence from the feature recognition means, searching for a correspondence between the second code sequence and the code sequence which is used to generate the pattern, associating the positions of the measurement patterns captured by the image capturing means and the measurement patterns projected by the projection means based on the correspondence between the two code sequences (2110, 2313), and calculating a three-dimensional shape of the object based on the feature pattern recognized by said feature recognition means, in accordance with the principle of triangulation based on the positions of the measurement patterns.