A new technique to measure depth based on dual wavelength digital holography and image correlation of speckle movements is demonstrated. By numerical refocusing of the complex optical field to different focus planes and by measuring the speckle movements caused by a wavelength shift both the object surface position and its local slope can be determined. It is shown how the speckle movement varies linearly with the surface slope, the wavelength shift and the distance of the numerical propagation. This gives a possibility to measure the slope with approximately the same precision as from the interferometric phase maps. In addition, when the object surface is in focus there is no speckle movement so by estimating in what plane the speckle movement is zero the absolute surface position can be measured.