The invention relates to an optical sensor according to the time-of-flight principle for detecting objects in a monitored region, having a first
transmitter for transmitting
first light pulses into the monitored region, a first
receiver for detecting
first light pulses radiated back by a first object to be detected in the monitored region, a second
transmitter for transmitting second light pulses into the monitored region, a second
receiver for detecting second light pulses radiated back by the first object or by a further object in the monitored region, a control and evaluation unit which is designed to control the first
transmitter and to evaluate the
first light pulses detected by the first
receiver and to control the second transmitter and to evaluate the second light pulses detected by the second receiver, characterised in that between the first transmitter and the second receiver a first optical reference path is formed, between the second transmitter and the first receiver a second optical reference path is formed, the control and evaluation unit is designed to trigger the first transmitter to transmit first
test light pulses which reach the second receiver on the first optical reference path and to activate the second receiver after a first time offset, the first time offset corresponding to a
time of flight of the first
test light pulses over the first optical reference path, and / or to trigger the second transmitter to transmit second
test light pulses which reach the first receiver on the second optical reference path and to activate the first receiver after a second time offset, the second time offset corresponding to a
time of flight of the second test light pulses over the second optical reference path, and to evaluate the first test light pulses detected by the second receiver and / or the second test light pulses detected by the first receiver.