The geometric phase technique (GPA) for measuring the distortion of crystalline lattices from high-resolution electron microscopy (HRTEM) images will be described. The method is based on the calculation of the “local” Fourier components of the HRTEM image by filtering in Fourier space. The method will be illustrated with a study of an edge dislocation in silicon where displacements have been measured to an accuracy of 3 pm at nanometre resolution as compared with anisotropic elastic theory calculations. The different components of the strain tensor will be mapped out in the vicinity of the dislocation core and compared with theory. The accuracy is of the order of 0.5% for strain and 0.1° for rigid-body rotations. Using bulk elastic constants for silicon, the stress field is determined to 0.5 GPa at nanometre spatial resolution. Accuracy and the spatial resolution of the technique will be discussed.