In the traditional Young’s double slit interference experiment,limited by the mechanized machining accuracy of the double slit,the double slit interference optical path has a large deviation compared with the theory.Thanks to the good optical performance of the liquid crystal light valve,the double slit electronization is realized,that is,the image of the computer display is transformed into a voltage signal to control the liquid crystal light valve,so as to simulate a high-precision double slit with freely adjustable size. Furthermore,the change of interference fringe spacing after the electronic double slit interference light path passes through the transparent medium is studied,and the relationship between the refractive index of the transparent medium and the interference fringe spacing is derived.In order to optimize the measurement,the image information collected by CCD is used,the image is processed by Photoshop,and the magnification factor is calculated through the spacing of pixels on the display screen,so as to determine the actual spacing of corresponding stripes and improve the accuracy of experimental data sampling.Finally,the measurement error is analyzed by mathematical method.