spacing is set to u201c 2 u201d in high speed mode wide z mode etc the width w is set equal to the width of 10 pixels the slit ray u is deflected to scan the object q the slit ray u is moved from the top toward the bottom of the imaging surface s2 shown in fig5 in the standard mode the moving speed of the slit ray u is set so that the slit ray u moves on the imaging surface s2 by one pixel pitch pv in one sampling cycle but the moving speed is varied according to the operation mode for example when the number of shifts gs described later is set to u201c 2 u201d in high speed mode wide z mode etc the slit ray u moves by two pixel pitch 2pv in one sampling cycle at the end of each sampling cycle optical to electrical converted information for one frame is output from the sensor 53 when attention is paid to one particular pixel g on the imaging surface s2 effective incident light data is obtained from five samplings out of the n samplings performed during the scanning the timing temporal centroid npeak the time when the amount of incident light on the pixel g reaches a maximum at which the optical axis of the slit ray u passes the object surface region ag opposing the pixel g of interest is obtained by interpolating between the incident light data of the five samplings in the example of fig5 b the amount of incident light is maximum at a timing intermediate between the n th sampling and the immediately preceding n u2212 1 th sampling the position coordinates of the object.