We describe the control of a piezoelectric device (PZT), mounted in an interferential microscope (IM) to introduce phase steps by mean of modifications light optical path, which is reflected from a sample surface. Both the piezoelectric control as the interferogram acquisitions from the interferometry system are made in a program designed in LabVIEW®. The program gives a stepped voltage by means PZT controller to a piezoelectric; causing deformation of the piezoelectric which in turn produces a shift in the surface mounted over it, resulting in a shift in the fringes pattern, besides the program controls a camera for acquiring an image at each voltage change. We use image processing to measure the displacement of the fringes finding out the position of the pixels which have a maximum of intensity, the first interferogram is set as a reference, in the following images the position of the pixel higher intensity is moving to fill the following pixel position with major intensity pixel of reference interferogram. Between two consecutive maximum and minimum of interference, the phase difference is 2π, then we can obtain the phase-shifting for each voltage change as well as the voltage needed to introduce a 2π phase-shifting in the fringe pattern, and finally obtain interferograms with a constant phase-shifting to reconstruct surface shape of thin films.