made to fig1 to describe the operation of the subroutine 34 correlation operations b 34 in step s16 of fig1 in this subroutine correlation operations are performed on two images of a subject to detect the spacing therebetween let the subject images on the photodiode arrays 34l and 34r be represented by l and r images respectively and pixel signals indicating light intensity distributions on the l and r images on the photodiode arrays 34l and 34r be represented by l i and r i respectively here i represents the pixel number and takes 0 1 2 99 in the order of arrangement in this embodiment that is the photodiode arrays 34l and 34r each have 100 pixels first variables sl sr and j are set to 0 60 and 7 respectively steps s40 s41 the sl is a variable to store the number of the first pixel of a pixel array block which is used for correlation operations in the subject image signal l i the sr is a variable to store the number of the first pixel of a block pixel string on which correlation operations are to be performed in the subject image signal r i the variable j is one to count the number of times the block is shifted in the subject image signal r i the correlation f s between the.