A method for optically measuring the shape of an object (G), 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 (G) with the activated lighting situation ( B 1 ,..., B i max ), d) capturing an image of the object (G) 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 (G) have been captured in all imax lighting situations ( B 1 ,..., B i max ), wherein - the object (G) is moved with the help of a movement device (S), wherein - a control device of the device for optically measuring the shape specifies a movement of the object (G) with the help of the movement device (S), and wherein - a camera (K), which is configured as line scan camera comprising one or several lines, is used to capture images of the object (G), 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 (G), wherein - the captured images are shifted back opposite to the direction of movement of the object (G) in the image plane such that congruent images of the object (G) 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 (G) with the activated lighting situation ( B 1 ,..., B i max ), d) capturing an image of the object (G) 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 (G) have been captured in all imax lighting situations ( B 1 ,..., B i max ), wherein - the object (G) is moved with the help of a movement device (S), wherein - a control device of the device for optically measuring the shape specifies a movement of the object (G) with the help of the movement device (S), and wherein - a camera (K), which is configured as line scan camera comprising one or several lines, is used to capture images of the object (G), 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 (G), wherein - the captured images are shifted back opposite to the direction of movement of the object (G) in the image plane such that congruent images of the object (G) are received. - the object (G) is moved with the help of a movement device (S), wherein - a control device of the device for optically measuring the shape specifies a movement of the object (G) with the help of the movement device (S), and wherein - a camera (K), which is configured as line scan camera comprising one or several lines, is used to capture images of the object (G), 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 (G), wherein - the captured images are shifted back opposite to the direction of movement of the object (G) in the image plane such that congruent images of the object (G) are received. <EOS>