Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Close
From: D M German <dmg@uv...>  20090909 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 . 
From: dmg <dmg@uv...>  20090910 09:12:02

Here are examples of the use: This photo was not remapped: But this one was: http://turingmachine.org/~dmg/temp/floorInput.jpg and this is the output, merged (difference mode): http://turingmachine.org/~dmg/temp/merged.jpg It was optimized using: # specify variables that should be optimized v Tx1 Ty1 Ts1 g1 t1 p1 r1 y1 using 17 control points in intersections of lines of floor. And remapped using: o f0 r99.5957 p0.992759 y3.69248 v94.6652 a0.000000 b0.000000 c0.000000 g726.252355 t558.903060 Tx54.770184 Ty45.457790 Tz18.993815 Ts2.536055 d0.000000 e0.000000 u10 +buf As you can see, the transformation works. > > 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/floor.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 . > >  dmg  Daniel M. German http://turingmachine.org 
From: Bruno Postle <bruno@po...>  20090910 10:15:36

On Thu 10Sep2009 at 02:11 0700, Daniel M. German wrote: > >But this one was: > > http://turingmachine.org/~dmg/temp/floorInput.jpg > >and this is the output, merged (difference mode): > >http://turingmachine.org/~dmg/temp/merged.jpg That is a 404 error, this looks like the right link: http://turingmachine.org/~dmg/temp/floorMerged.jpg Very impressive. Will it be possible to take the Tx, Ty, Tz & Ts parameters and calculate a cartesian x, y & z vector between the two camera points?  Bruno 