Accurate determination of distortion for smartphone cameras