How to orthorectify android's camera image with for a given rotation matrix
I don't know if "orthorectify" is the right choice of word. What I want to achieve is to calculate the height respective to ground of an object captured by camera. However, if the camera is not align with the ground, any image taken will be distorted by perspective, so the object height is consequently distorted. By knowing the camera orientation, in this case android sensors api will provide me the rotation of device respected to ground, is it possible to remove this distortion such that the object in the image will retain its height? How would I achieve this with opencv?
I found this image from "orthorectify" search in google that llustrates what I want to do. I want to remove distortion from the raw image such that each checkerboard block is equal in length.