We present a method to calibrate a high-resolution wavefront (WF)-correcting device with a single, static camera, located in the focal-plane; no moving of any component is needed. The method is based on a localized diversity and differential optical transfer functions to compute both the phase and amplitude in the pupil plane located upstream of the last imaging optics. An experiment with a spatial light modulator shows that the calibration is sufficient to robustly operate a focal-plane WF sensing algorithm controlling a WF corrector with 40,000 degrees of freedom. We estimate that the locations of identical WF corrector elements are determined with a spatial resolution of 0.3% compared to the pupil diameter. © 2013 Optical Society of America.