Magnetic dipole estimation from the measurement of complex gradients