The sensor is specially designed for comparing height profiles and provides application-specific profile detection with integrated evaluation in one compact housing. The vision sensor's integrated control interface is optimized to detect errors from a previously taught-in height profile. The sensor uses profile comparison to verify the detected profile of an object and its correct position. The height profile can be taught in via an easy-to-use operating wizard, and the permitted position and component errors can be specified separately.