PURPOSE: To make the capacity of a pattern memory as small as possible by storing a specified pattern of an object to be photographed which has been read by an image pickup device, especially, only information of an edge part, in the pattern memory.
CONSTITUTION: In case when that which has placed electric parts on a printed board as an object to be photographed has been photographed by an image pickup device 1, an output of the image pickup device 1 becomes zero in a place where no electric parts exist, and from an A/D converter 3, a picture element data D for showing it is outputted, and in an operating circuit 4, since each picture element data D is lower than a value determined by a reference value setting circuit, an output becomes an L level, and an edge detecting circuit 5 generates no output. In this case, a picture element address determining circuit 8 counts a clock pulse and determines a picture element address of a scan position, but since no output is obtained from the edge detecting circuit 5, a memory controlling circuit 9 does not transfer the picture element address to a pattern memory 7. In a place where the electric parts exist, an edge detecting signal is sent to the memory controlling circuit 9, and write to the memory is executed.