From: D M G. <dm...@uv...> - 2009-09-09 21:03:19
|
(this code was brought to you by Google :) As you might know, Dev Gosh was one of Google Summer of Code students. Unfortunately he only completed part of his project. His idea was to allow for the rotation of the camera plane in two axis: around x, and around y. He did a good job with the math and, except for some very minor bugs, his code worked as expected. For example, for the tilt on X, imagine you take a photo, then you apply a "pitch" rotation (rotation around x), then a translation to recenter the image on (0,0). the same applies for rotation around Y. When I integrated his code I discovered that it would be good to add the ability to rotate around Z, and implemented it accordingly. Here is in example of the input: http://turingmachine.org/~dmg/temp/floorInput.jpg and the output: http://turingmachine.org/~dmg/temp/floorOutput.jpg and this is a photo of the same place taken: http://turingmachine.org/~dmg/temp/floorInput.jpg In this case, there is a tiltX of 32 degrees, and a tiltZ of -11 and a shear of -125 pixels. I have also added 3 parameters to the parser: Tx, Ty, and Tz, which are angles to rotate in degrees; and Ts, which is a scaling factor. I have the inverse transformations done. they are described here: http://turingmachine.org/~dmg/temp/tiltEq.pdf I am struggling with the inverse ones. If anybody wants to help, I'll be grateful. This is the only roadblock to have an alpha version of it. Now, the real question for hugin developers: can somebody create a branch of hugin that supports these new parameters during the optimization? shearX, shearY, tiltX, tiltY, tiltZ and tiltScale? I haven't committed my code but will do soon. in its current state the optimizer nor the cropping works (we need the forward transform for that). -- Daniel M. German http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with . |