The CCD (41) in the single-chip color camera (27) outputs, for example, four image data (R), (G1), (G2), and (B) to the personal computer (5). The calculation portion (89) calculates, based on the image data (R), (G1), (G2), and (B), the edge positions and contrast values. The calculation portion (89) then calculates the average edge position by weighting the edge positions with the contrast values, and outputs the average edge position as the position data of the edge.
展开▼