The optical sensor has an emitter (2a-2n) which emits a light beam and a receiver (6a-6n) which receives a light beam. An evaluation unit (9) generates an object detection signal based on the output from the receiver. The emitter and/or the receiver and/or components of the evaluation unit are formed as components containing organic semiconductors. These sensor components are preferably printed onto a polymer film.