We present the solution of an inverse boundary value problem for harmonic functions arising in electrostatic imaging through conformal mapping techniques. The numerical method consists of two parts. In a first step, by successive approximations a nonlinear equation is solved to determine the boundary values of a holomorphic function on the outer boundary circle of an annulus. Then in a second step an ill-posed Cauchy problem is solved to determine the holomorphic function in the annulus. The method extends and modifies an earlier analysis of Idemen and Akduman (Idemen M and Akduman I 1988 SIAM J. Appl. Math. 48 703-18). We establish a convergence result for the iteration procedure and through numerical examples we illustrate the feasibility of the method.