1. An information processing apparatus comprising: one or more memories storing instructions; and one or more processors that, when executing the instructions, causes the information processing apparatus to: acquire a plurality of images obtained by imaging a target object onto which a plurality of patterns having a bright portion and a dark portion are projected in a time series by a projector; allocate, to each pixel in the plurality of images, a label corresponding to luminance of the pixel by referring to a characteristic of the plurality of patterns; change the allocated label based on a time-series change of luminance of the projected plurality of patterns; derive correspondence relationships between positions of the plurality of patterns in a projection plane of the projector and positions of the plurality of patterns in the acquired image based on the changed label; and derive three-dimensional coordinates of a surface of the target object based on the derived correspondence relationships.