The GUARDIAN 2 is an overhead sensor for pedestrian sliding doors. The sensor has combined motion and presence (safe) detection zones. The sensor is based on CMOS camera technology and detection on image processing. The motion zone reacts only to movement whereas the presence zone reacts to both movement and presence. The motion zone can be blanked in 3 directions (front, left and right) in order to avoid detection of unwanted objects. The presence zone is taught into the sensor by recognition of standard test targets in the setup phase - it will adapt to the shape of a curved or straight sliding door. The presence zone also adapts to the surroundings to work in different weather conditions. The sensor has separate outputs for the motion and presence zones as well as a test input to test the sensor function for each door cycle.