1. A device for detecting a mark having edges, said device comprising: image pickup means for picking up an image of the mark and producing an image signal corresponding thereto; extracting means having an extracting level for extracting a component from the image signal, each extracted component having a predetermined relation to the extracting level; and control means for controlling the extracting level in accordance with the width and the number of the signal components extracted, so as to obtain signals corresponding to the edges of the mark.