Programmable optical grids can be projected directly on the surface of unpolished test-pieces to realize an absolute measurement method called `coded light approach' to obtain a full depth- image, requiring only a small number of projections. In combination with the phase shifting method subpixel accuracy is achieved. Geometry-checking and controlling the surface quality of objects with mirror-like surfaces is done with indirect illumination. Using a line-projector, stripes are projected to a diffusely reflecting surface, e.g. a wall. The test piece is positioned so that the lines are seen indirectly by the camera, reflected in the surface.