Method, performed by one or more devices, for providing a position of an intensity peak in image data produced by an image sensor in response to light sensed by the image sensor after the light has reflected on an object as part of light triangulation performed in a three-dimensional imaging system, wherein the method comprises:
- obtaining the image data;
- determining which of first and other, second, peak characteristics that the intensity peak is associated with, wherein the first and second peak characteristics are associated with differing first and second surface properties of the object that reflect light differently;
- and
- providing the position according to a first computing algorithm operating on the image data if the intensity peak is associated with the first peak characteristics and according to a different, second computing algorithm operating on the image data if the intensity peak is associated with the second peak characteristics, wherein the first and second computing algorithms are associated with said first and second surface properties, respectively, and wherein the respective computing algorithm is predetermined based on its suitability to, for intensity peaks resulting from reflections from a surface according to the algorithm's associated surface property, provide a position that maps to the location on the object's surface that reflected the light that resulted in the intensity peak.