A method for mapping a sensor pixel array to an illumination pixel array according to a surface forms a group map by assigning each pixel on the sensor array to a corresponding group of an ordered set of groups, each group defined by a set of p adjacent pixels on the illumination pixel array by projecting and recording at least n projected images from a first set of n binary patterns, with transitions between pixels in each of the n binary patterns only at group boundaries. At least m images from a second set of m binary patterns are projected and recorded, with one or more transitions between pixels in each of the m binary pattern offset from group boundaries. At least p multiline images are projected and recorded. Lines in the recorded multiline images are correlated with lines in the multiline images according to the group map.