Patent ID: 8760667

Claim:
A method for detecting a substrate edge in a printing machine comprising a substrate transport unit that defines a substrate transport path, said method comprising: determining a light value by collecting measured data of a first section of a sensor line, said first section not being covered by the substrate and said sensor line having a plurality of discrete pixels; determining a dark value by collecting measured data of a second section of the sensor line, said sensor line being covered by the substrate; calculating a threshold value based on the light and dark values of the sensor line; collecting measured data of the sensor line, wherein, when the threshold value on a pixel is exceeded, determining that said pixel is not covered by the substrate, and when the threshold value on a pixel is not reached, determining that said pixel is covered by the substrate; and calculating a position of the substrate edge based on the collected measured data, wherein based on the measured data of the first and the second sections, correction data are determined for the adaptation of all the pixels of the sensor line, and wherein a correction of the dark values of all the pixels of the sensor line by means of the correction data includes a compensation of an offset of an output signal of the sensor line.