A method for optically measuring the shape of an object, with the following steps: a) selecting a number imax of lighting situations ( B 1,..., B i max), b) activating a first lighting situation ( B 1,..., B i max), c) illuminating an object with the activated lighting situation ( B 1,..., B i max), d) capturing an image of the object in the activated lighting situation ( B 1,..., Bi max), e) deactivating the active lighting situation ( B 1,..., B i max) and activating a next lighting situation ( B 1,..., B i max), f) repeating steps c) to e) until images of the object have been captured in all imax lighting situations ( B 1,..., B i max), wherein - the object is moved with the help of a movement device, wherein - a control device of the device for optically measuring the shape specifies a movement of the object with the help of the movement device, and wherein - a camera, which is configured as line scan camera comprising one or several lines, is used to capture images of the object, characterized in that - a method according to the principle of the photometric stereo or of the photometric deflectometry is carried out for optically measuring the shape of the object, wherein - the captured images are shifted back opposite to the direction of movement of the object in the image plane such that congruent images of the object are received. a) selecting a number imax of lighting situations ( B 1,..., B i max), b) activating a first lighting situation ( B 1,..., B i max), c) illuminating an object with the activated lighting situation ( B 1,..., B i max), d) capturing an image of the object in the activated lighting situation ( B 1,..., Bi max), e) deactivating the active lighting situation ( B 1,..., B i max) and activating a next lighting situation ( B 1,..., B i max), f) repeating steps c) to e) until images of the object have been captured in all imax lighting situations ( B 1,..., B i max), wherein - the object is moved with the help of a movement device, wherein - a control device of the device for optically measuring the shape specifies a movement of the object with the help of the movement device, and wherein - a camera, which is configured as line scan camera comprising one or several lines, is used to capture images of the object, characterized in that - a method according to the principle of the photometric stereo or of the photometric deflectometry is carried out for optically measuring the shape of the object, wherein - the captured images are shifted back opposite to the direction of movement of the object in the image plane such that congruent images of the object are received. - the object is moved with the help of a movement device, wherein - a control device of the device for optically measuring the shape specifies a movement of the object with the help of the movement device, and wherein - a camera, which is configured as line scan camera comprising one or several lines, is used to capture images of the object, characterized in that - a method according to the principle of the photometric stereo or of the photometric deflectometry is carried out for optically measuring the shape of the object, wherein - the captured images are shifted back opposite to the direction of movement of the object in the image plane such that congruent images of the object are received.