Apparatus for optically inspecting a surface on an object, wherein the surface has a multiplicity of surface points (54, 58, 62) distributed along a direction, having - a pattern generator that is configured to generate variable bright/dark patterns, - a camera for recording images (a-f) that each show only one subsection (52, 56, 60) of the surface, - a workpiece holder that is configured to move the object relative to the camera in the direction in order to temporally successively capture the surface points (54, 58, 62) with the camera, and - a control and evaluation unit that is configured to actuate the pattern generator, the workpiece holder and the camera such that each surface point from the multiplicity of distributed surface points (54, 58, 62) is recorded with a multiplicity of different bright/dark patterns, wherein the pattern generator makes available the different bright/dark patterns in a continuous temporal sequence, and wherein the control and evaluation unit is configured to actuate the workpiece holder continuously in order to continuously move the object during the recording of the images (a-f), with the result that the images (a-f), as a consequence of the movement of the object relative to the camera, differ from one another by way of the different bright/dark patterns and their image content, wherein the movement speed of the object is low compared to the switching speed of the bright/dark patterns and is low compared to the image recording speed of the camera, wherein the bright/dark patterns (16a, 16b) each have an intensity profile having a defined and in each case identical period, wherein at least three bright/dark patterns (16a, 16b) from the sequence have the same intensity profile, and wherein the three bright/dark patterns (16a, 16b) differ in that the intensity profile is arranged with respectively different phasing. - a pattern generator that is configured to generate variable bright/dark patterns, - a camera for recording images (a-f) that each show only one subsection (52, 56, 60) of the surface, - a workpiece holder that is configured to move the object relative to the camera in the direction in order to temporally successively capture the surface points (54, 58, 62) with the camera, and - a control and evaluation unit that is configured to actuate the pattern generator, the workpiece holder and the camera such that each surface point from the multiplicity of distributed surface points (54, 58, 62) is recorded with a multiplicity of different bright/dark patterns, wherein the pattern generator makes available the different bright/dark patterns in a continuous temporal sequence, and wherein the control and evaluation unit is configured to actuate the workpiece holder continuously in order to continuously move the object during the recording of the images (a-f), with the result that the images (a-f), as a consequence of the movement of the object relative to the camera, differ from one another by way of the different bright/dark patterns and their image content, wherein the movement speed of the object is low compared to the switching speed of the bright/dark patterns and is low compared to the image recording speed of the camera,