1. Method for sensing a marking of a running web of material, in which the web of material is optically scanned by means of at least one image recording device, which in successive measuring cycles generates image signals which are fed to an image processing device, which determines the position of the marking from the image signals and outputs positional values, characterized in that a validity signal which indicates whether the currently determined positional value is valid is generated from the positional values by applying a position-dependent weighting function and is output.