Hall�chen!
Tsch�,
Hall�chen!
Giancarlo Todone writes:
> [...]
>
> Manual placement at this point is not a deal breaker for me: it's
> just that i would like to reflect changes in the positions of
> images into the Hugin project, or the modifications to my workflow
> would be too heavy: that's why simply aligning in GIMP is not ok
> for me :(
I'm afraid I don't fully understand what you need. You can manually
move single images relatively to others with the mouse or by
entering values. Is this what you are looking for?
Tsch�,
Generally we don't use the preview to do fine-alignment of photos because the control point system is far more accurate. Also all you can do is drag the photos around in the preview, whereas misalignment errors can be because of bad lens parameters - I don't see how it could be practical to adjust lens parameters interactively, this is why we use machine optimisation.
Having said that, you should be getting much better results with Hugin than this
the errors are equivalent to 1-2cm camera misalignment. You said you are using a robot head, are you relying on the position data from the robot? or are you creating a full set of control points and optimising positions and lens parameters?
( At some point we would like to add some morph-to-fit functionality in Hugin to correct minor errors, see the prototype here: https://groups.google.com/forum/#!topic/hugin-ptx/UripOuuYXCQ )
Well, 0.01� make 300 micrometre offset in a distance of 3 metre but
you have much more than that.
Thank you kfj,
your advices are very interesting and I'm experimenting a lot that way. Speaking of that... when I try to execute woa plugin, it immediately returns with mesage "script returned -1"... any clue?
-1 means that the call to the plugin interface has failed. Can you call any of the other plugins? And can you run woa from the command line? What system and what version of hugin are you using?
-DBUILD_HSI:BOOL=ON -DSWIG_EXECUTABLE=/usr/bin/swig2.0
It should at any rate be much easier getting it to run on
Linux. Just follow the wiki:
http://wiki.panotools.org/Hugin_Compiling_Ubuntu
Once you have built hugin with the python interface, you can
test easily whether you've succeeded by just opening a python
session and typing
import hsi
at the python prompt. If that succeeds, you should be fine.
Why the Windows build you have allows you to call a plugin when
the python interface isn't there, I don't know.
Kay
On Monday, May 6, 2013 9:55:41 PM UTC+2, Giancarlo Todone wrote:-1 means that the call to the plugin interface has failed. Can you call any of the other plugins? And can you run woa from the command line? What system and what version of hugin are you using?Right now i'm on Windows 8 x64 but I'm using Hugin 2012.0.0 x86 because x64 version gives problems on UI (some missing controls). I tried 2012 and 2013 beta x86/x64 normal/hsi with same results: all of the scripts return -1.I tried calling "python woa.py" in the scripts folder: it complains about lack of hsi include. Didn't experiment further (but will with my Ubuntu10.04 install)
Well, lack of hsi means that you don't have a hugin built with python support. If you build yourself, you can get the python interface by building with these cmake flags
Hi KayI've noticed the same issue with my win 32 bit build using MSVC2010 from last weekend. Woa works fine from the command line and from an earlier build (built with MSVC2008). The 'limit to 5 points' script works from my recent build but the woa script returns -1 after calling Nona and then CPfind. From what I can see woa has not changed so i guess that there must be a recent code change somewhere that is conflicting
Well, I'm a c/c++/c#/java developer but i never even touched python with a stick so my best guess is that i failed something while trying to invoke woa from shell (e.g. parameters/working folder). Hugin is the official 2012 win32 build with python support (didn't compile it myself).
matching pair (1, 2) failed with TypeError: "can't use a string
pattern on a bytes-like object"
examining image pair (0, 1)
overlap area: 11736755.252809558 pixels
overlap ratio: 0.729671189939638
overlap area: 11524660.939996947 pixels
overlap ratio: 0.7164853386310013
setting subpano width to 7278
creating warped overlap images with woa_base.pto
cp detection: cpfind ['--fullscale', '--sieve2size', '5', '--ransacmode', 'hom', '-o', 'woa_warped.pto', '_woa_warped.pto']
CPG found 80 CPs
matching pair (0, 1) failed with TypeError: "float() argument must be a string or a number"
stack traceback
Getting a little further. Message is now basically:
matching pair (0, 1) failed with TypeError: "float() argument must be a string or a number"stack traceback
The suggetsed mod works with Python2.7
On Sunday, May 19, 2013 8:57:47 AM UTC+2, smib wrote:Getting a little further. Message is now basically:matching pair (0, 1) failed with TypeError: "float() argument must be a string or a number"stack traceback
first of all, I can't quite figure out why there is no stack trace. Must be something different in the mechanics between py3k and py2.x. The stack trace would really help... mind you the uses of float() in woa are few and far between and I suppose the problem is still somewhere in get_tiff_offset() (there are for float() calls just right in it) and it may well be something non-trivial. I never liked that routine - wrote it because I couldn't find a better way to obtain the cropped TIFF's crop data.
I have experienced exactly the same behavior as Brian.2013/5/19 kfj <_k...@yahoo.com>
On Sunday, May 19, 2013 8:57:47 AM UTC+2, smib wrote:Getting a little further. Message is now basically:matching pair (0, 1) failed with TypeError: "float() argument must be a string or a number"stack traceback
first of all, I can't quite figure out why there is no stack trace. Must be something different in the mechanics between py3k and py2.x. The stack trace would really help... mind you the uses of float() in woa are few and far between and I suppose the problem is still somewhere in get_tiff_offset() (there are for float() calls just right in it) and it may well be something non-trivial. I never liked that routine - wrote it because I couldn't find a better way to obtain the cropped TIFF's crop data.
Please find woa output including the stack trace below:
File "C:\Program Files\Hugin\share\hugin\data\plugins\woa.py", line 255, in get_tiff_offsetxres = float ( gleaned.get ( 'XResolution' ) )
File "C:\Program Files\Hugin\share\hugin\data\plugins\woa.py", line 255, in get_tiff_offsetxres = float ( gleaned.get ( 'XResolution' ) )Here we go. As I feared. gleaned is a dictionary containing all values gleaned from tiffdump's output. Normally, all directory entries would be stored with the field name as key, and it's content as value. But I reckon something is going wrong with the regular expression matching, and instead of sensible data for XResolution, the value is None, because the match failed. And then the conversion of None to a float fails, and the exception is raised. This could have several reasons: there might be a unicode vs. ASCII problem, tiffdump's output might have changed... but I'm just guessing. A first step would be to print the contents of the dictionary, by inserting
print(gleaned)
just befor the error happens (so, before line 255). Then if the value for 'XResolution' is in fact None, or something else which can't be made into a float, we could take it from there.
Adding the print(gleaned) outputs following:
{b'YResolution': b'150', ... }
So reading something about Python and b prefix I have found that modifying lines 253-256 the same way as you advised earlier in the thread for another lines fixed the woa. So modifying lines 253-256 from:xpos = float ( gleaned.get ( 'XPosition' , 0 ) )ypos = float ( gleaned.get ( 'YPosition' , 0 ) )xres = float ( gleaned.get ( 'XResolution' ) )yres = float ( gleaned.get ( 'YResolution' ) )to (adding prefix b):xpos = float ( gleaned.get ( b'XPosition' , 0 ) )ypos = float ( gleaned.get ( b'YPosition' , 0 ) )xres = float ( gleaned.get ( b'XResolution' ) )yres = float ( gleaned.get ( b'YResolution' ) )
fixed it. Now woa works like a charm.Thank you very much for you help.