1. A measuring apparatus comprising: a projection control unit configured to cause a projection unit to project, onto an object, a first pattern having a light portion and a dark portion, a second pattern having a light portion and a dark portion in which at least one of a width of the light portion and a width of the dark portion is smaller than the first pattern and a boundary position between the light portion and the dark portion of the second pattern is common to the first pattern, and a third pattern having a light portion and a dark portion in which the light portion and the dark portion of the second pattern are reversed; an acquisition unit configured to acquire a first captured image of the object onto which the first pattern is projected, a second captured image of the object onto which the second pattern is projected, and a third captured image of the object onto which the third pattern is projected; and a calculation unit configured to derive the boundary position between the light portion and the dark portion included in the first captured image based on the second and the third captured images to measure a position of the object.