High-precision photoelectric sensor with background suppression and foreground suppression capabilities.