pythonpython-3.ximage-processingcomputer-visionprojection-matrix

How can I compute orthographical projection image from perspective projection image?


My goal is to transform an image captured by a camera and transform that image to orthographical image without effects of perspective.

I have a few objects of known size on a surface. I have a camera, placed above and directed to those objects, as exemplified in the scene. The camera is capturing images as in image captured by the camera. I want to get an orthographical image of the environment as in orthographical image I want to get.

I have read few posts, but did not really understand their relevance to my problem, as I am not expert on these transforms. The answer from this question made me think it is possible, although I did not get how.

I would appreciate a clear explanation or pointing a clear tutorial, using Python or Lua if possible.

Any help is appreciated.


Solution

  • This was not possible without distorting the image. A straightforward explanation is that the perspective causes some parts of the image to be not visible, for example the white line in the marked area is not visible, and there could be something small that we are not able to observe. For those parts, the algorithm is supposed to produce some kind of prediction based on heuristics.