1. A three dimensional measurement apparatus comprising: an image obtaining unit configured to obtain an image obtained by capturing an object onto which a pattern including a measurement pattern and a feature pattern is projected, the feature pattern being generated based on a first code sequence which is a periodic code sequence including positions which can be uniquely specified when a partial sequence is observed; a grouping unit configured to divide the image obtained by the image obtaining unit into a plurality of regions by regions formed by using the measurement pattern in the pattern and a plurality of epipolar lines determined based on a positional relationship between a projection unit that projects the pattern and an image capturing unit that captures the object, and to group predetermined regions among the plurality of divided regions; a feature recognition unit configured to recognize the feature pattern by estimating the region in which the feature pattern exists among the grouped plurality of regions, by comparing ratios between each area of the grouped plurality of regions and each area of the feature pattern in each of the grouped plurality of regions, such that the feature pattern can be recognized in a case where one or more feature patterns overlap each other, or in a case where the feature pattern does not exist precisely in one region; a code sequence generation unit configured to generate a second code sequence based on a recognition result of the feature pattern for each group by the feature recognition unit; an association unit configured to associate the second code sequence generated by the code sequence generation unit with the first code sequence used for generation within the feature pattern; and a three-dimensional shape calculation unit configured to calculate a three-dimensional shape of the object based on an association result of the association unit.