|
From: Vlastimil M. <vla...@gm...> - 2009-05-21 18:47:51
|
Hi all, I am using the perspective filter from agg and to add or remove perspective from pictures. It is easy to use with its rectangle to quadrangle interface, but imagine this situation: There is a rectangle that is deformed by perspective projection (like a photo of a painting on a wall taken from an angle). Removing the perspective projection and getting the original photo is easy with agg, but is it possible to compute the original aspect ratio of the rectangle if I only have the deformed quadrangle? I know, it is possible assuming that the center of perspective is in the center of the image and knowing the field-of-view angle (or focus length of the camera). But this seems too much. The readers of this list are definitely better at math than I am and maybe one of you could point me in the right direction. How do I compute the aspect ratio without the FOV angle if it is possible? I know that my question is only loosely related to agg, and I am sorry if I have taken your valuable time if it is too loose for you. Thanks, Vlasta |