I have developed a simple little iPhone app (for academic purposes) that allows the user to take a picture of an object. At the time the picture is taken, the accelerometer data from the phone is captured as well. The user will be taking a top-down (birds eye view) of the image, meaning the phone should reasonably be at a 90 degree angle to the object. However, the notion that the angle will always be 90 degrees cannot be guaranteed.
Given that I have the accelerometer data (x, y, z values) of when the image is taken, I believe there is a way to construct a transformation matrix to transform the image as if it was taken from a 90 degree angle. However, I'm not exactly sure how to construct this matrix.
As I mentioned, this is for playing around/academic purposes, so once I capture the image and x, y, z data I just send it to one of my computers for further processing. The processing is being performed using Python and OpenCV.
Any help or pointers would be much appreciated.