A new method of determining the piezoelectric field around dislocations from high-resolution transmission electron microscopy images is presented. In order to determine the electrical potential distribution near a dislocation core, we used the distortion field, obtained using the geometrical phase method and the non-linear finite element method. The electrical field distribution was determined taking into account the inhomogeneous strain distribution, finite geometry of the sample and the full couplings between elastic and electrical fields. The results of the calculation for a transmission electron microscopy thin sample are presented.