If that’s what the latest patent filing by Apple indicates, then yes, it looks like Apple is researching into developing a way for the iPhone’s camera to be able to detect perspective distortion and allow the user to make the necessary corrections without a lot of troublesome editing. How this works is that Apple plans to make use of the various sensors built into the iPhone, for starters and very obvious, the image sensor on the camera, followed by the gyroscope and the accelerometer and even using GPS to record the orientation between the object and your device.
The patent also goes on to reference to sensors that would measure the distance but since infrared or ultrasonic sensors have yet to be built into the iPhone, we’re guessing that this patent, if it ever comes into fruition, will be something much later down the line.