A method of determining 3D surface position information of an object from a 2D image of the object obtained with structured lighting, the method comprises - providing a series of structured lighting patterns, each successive structured lighting pattern in the series comprising a first and second subset of intensity features, each intensity feature of the first set coinciding spatially with a respective one of the intensity features from either the first or second subset from a preceding structured lighting pattern in the series, wherein each of said intensity features comprises a spatial variation of light intensity, - illuminating the object with different ones of the structured lighting patterns of said series each at least at a different time point; - capturing 2D images of the object, each when the object is illuminated with a respective one of the lighting patterns; - detecting image positions where the intensity features of the first and second subset of the structured lighting patterns are visible in the images; - for each successive structured lighting pattern, - associating the intensity features of the first subset with image positions where the intensity features of the first subset are visible, based on the associated intensity features of detected image positions with associated intensity features in the image obtained with a preceding structured lighting pattern in said series, and - associating intensity features of the second subset with image positions where the intensity features of the second subset are visible, in respective position ranges between pairs of the image positions associated with mutually adjacent intensity features of the first subset, the association being based on the associations of the mutually adjacent intensity features of the first subset; - using the associations between intensity features and image positions of the first and second subset in a final structured lighting pattern of the series to identify the intensity features of the final structured lighting pattern for the determination of 3D surface position information of the object. - providing a series of structured lighting patterns, each successive structured lighting pattern in the series comprising a first and second subset of intensity features, each intensity feature of the first set coinciding spatially with a respective one of the intensity features from either the first or second subset from a preceding structured lighting pattern in the series, wherein each of said intensity features comprises a spatial variation of light intensity, - illuminating the object with different ones of the structured lighting patterns of said series each at least at a different time point; - capturing 2D images of the object, each when the object is illuminated with a respective one of the lighting patterns; - detecting image positions where the intensity features of the first and second subset of the structured lighting patterns are visible in the images; - for each successive structured lighting pattern, - associating the intensity features of the first subset with image positions where the intensity features of the first subset are visible, based on the associated intensity features of detected image positions with associated intensity features in the image obtained with a preceding structured lighting pattern in said series, and - associating intensity features of the second subset with image positions where the intensity features of the second subset are visible, in respective position ranges between pairs of the image positions associated with mutually adjacent intensity features of the first subset, the association being based on the associations of the mutually adjacent intensity features of the first subset; - associating the intensity features of the first subset with image positions where the intensity features of the first subset are visible, based on the associated intensity features of detected image positions with associated intensity features in the image obtained with a preceding structured lighting pattern in said series, and - associating intensity features of the second subset with image positions where the intensity features of the second subset are visible, in respective position ranges between pairs of the image positions associated with mutually adjacent intensity features of the first subset, the association being based on the associations of the mutually adjacent intensity features of the first subset; - using the associations between intensity features and image positions of the first and second subset in a final structured lighting pattern of the series to identify the intensity features of the final structured lighting pattern for the determination of 3D surface position information of the object.