An optical measuring device capable of improving the precision of
detection of contamination on a protective glass is disclosed. With
threshold values as large as 90%, 50%, 10% of a peak value of a scan
signal, measured values Q.sub.90, Q.sub.50, Q.sub.10 of a dimension of a
work to be measured are derived, respectively. It is determined whether a
difference between the measured value Q.sub.90 and the measured value
Q.sub.50 (or a variation of the measured value) is equal to or larger
than a predetermined reference value. (B)-(D) show the presence of
contamination on the protective glass, equal to or larger than the
reference value. (A) shows the absence of contamination, lower than the
reference value. It is then determined whether a difference between the
measured value Q.sub.50 and the measured value Q.sub.10 is equal to or
larger than a predetermined reference value. (D) shows the presence of
thick contamination on the protective glass, equal to or larger than this
reference value. Accordingly, a buzzer is driven and a red lamp is turned
on to give the alarm to the operator to remove the contamination
immediately.