A compact microscope system for direct strain measurement is presented. it involves the grating diffraction method coupled with microscopy and image-processing technique. A Leitz optical transmitting microscope with white light source was rebuilt to incorporate a loading and recording system. Gratings with median density from 40 to 200 lines/mm are used. with the help of a Bertrand lens, the Fourier spectrum of the grating is formed on the CCD sensor plane with high image quality. Software that can precisely, quickly, and automatically determine the diffraction spot centroids has been developed. The local strain is measured with high resolution. Various ways of improving the sensitivity are suggested.