Characterizing Atmospheric Turbulence and Removing Distortion in Long-range Imaging