Yet another objective is to provide a method and device which would be able to recognize the specified pattern on the first scan, which would be able to recognize shapes using a minimal hardware configuration and a simple algorithm, and which would be capable of high-speed processing, as well as a copy machine or other device in which that method and device are employed.