Int the image tab you should be able to see the size of the images.
The horizontal and vertical images have the dimensions swapped. Then
it should be easy to give a different lens to both.
Cheers,
Seb
I thought that Nicolas meant that the input images were rotated, not
with the roll parameter in Hugin (I don't know how you can have an
input image rotated 45º). Images with different roll parameters can
share the same lens (I do that all the time).
As for the reason, if I were pressed to answer: Hugin calculates the
horizontal field of view based on the width of the image. Whether the
image is horizontal or vertical changes this width, and the code would
need to change a lot for this to work.
Cheers,
Seb
These are limitations of the panotools lens model:
The first problem is that lens correction parameters are locked to
the narrowest width of the image, but the angle of view parameter is
locked to the horizontal width - So landscape and portrait images
need to have different 'lenses'.
The second problem is that the d and e lens shift parameters are
measured in pixels and not as a ratio - So different resolution
photos can't have the same 'lens'.
--
Bruno
Why can't hugin check for this user input error beforehand? (I
understand it quit with the mentioned error report. Anyway the report
should be clear everyday language.) This I would consider a bug.
One step further: I have understood why portrait and landscape images
can't share a lens in the panotools lens model - but this should be
transparent to the user. Hugin should be able to recognise that two
images have been taken with the same physical lens but different
orientation (of course this is only an assumption, but it only assumes
as well that images of same size and orientation share a lens).
Now hugin could either assign different lenses by itself or even better
do so only internally and display them to the user as sharing a lens (so
there would be "user lenses" and "panotools model lenses"). OK, the
latter would confuse people who have learned the whole stuff earlier.
regards
Joachim
I can't reproduce the error.
If I take four identical landscape images, but then rotate one to
portrait format, hugin insists on using two lens numbers.
If I then manually force them all to be 'lens 0', I can stitch but
get an error message, hugin doesn't crash and the output is created.
--
Bruno
Yes. But you can't store them in a file that way.
Let me explain by showing you my workflow....
My camera has a sensor. So it tagges the images about which side is
up. When I come home I (sometimes) run a script that takes each image
and rotates the JPEG (losslessly) so that it is right side up (*).
Usually this results in all images for hugin to be portrait 2592x3872
images. However if I have taken portrait mode circular shot, but
realize I've missed a part, say towards the ground, I sometime put my
camera back in landscape mode, and shoot the remaining shots.
I could of course rotate these too, and put them in portrait mode.
But by the time I realize this, I'm well into hugin and have done
some work to generate the pano.
Roger.
(*) gqview, the version I have here, annoyingly builds up the image
top-down, and when it's done, it realizes that the image is rotated
and rotates it. This is annoying when viewing images. So that's why I
rotate the images.
--
** R.E....@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement.
Does it sit on the couch all day? Is it unemployed? Please be specific!
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ
Still..... I just scetched the way I ran into this item. More
"plausible non-user-error" situations could arise. For example, my
camera doesn't rotate the image, but just uses the exif tag to
indicate which side is up. How about a camera that does the lossless
jpeg rotation itself? And if you're calling me rotating my camera for
a second row a user-error, I want to say that there are good reasons:
It takes about 16 images to make a 360 pano in portrait mode. To
augment that with some extra visual information in the "down"
direction, I need only 5 more images in landscape mode. That reduces
the complexity of the hugin process enormously.
Anyway, with a simple preprocessing trick in hugin, it shouldn't be too
hard to make this work.
When an image is "portrait" (vsize > hsize), rotate it by -90 degrees
internally, and set the default roll parameter to 90. Nobody would
notice.
Now, the "hfov" parameter always refers to the longest side of the
image. (and might need an eventual rename....)
And linking portrait and landscape images from the same lens becomes
easy.
Roger.
No need to auto rotate an image by +90/-90 degrees unless the image has
exif data stating the image should be rotated but is not. But then you
still get the problem of saving the project. Opening these images into
an image editing program that when opened auto rotates the image and on
save removes the exif data. When the project is opened again these
images will need to have their initial auto rotate removed. Maybe the
script should keep track of the exif data about rotation separately.
> And linking portrait and landscape images from the same lens becomes easy.
>
> Roger.
The Panotools Radial Shift and was changed to be this way by Helmut
Dersch back in 1999 and I updated radial brightness falloff back in 2003.
BTW: Probably this is true for every image size of any camera, but
isn't a lossless jepg rotation only possible for images with sizes
that can be writen as 2^n or multiples? (So a 2x3 pixel images cannot
be rotated lossless.)
Thomas
The blocks are 8x8 or 16x16, so the image size has to be a multiple of
8 or 16. From what I've read, almost all digital cameras produce JPEGs
which follow this rule.
Cheers,
Seb
The left and top sides of the image start with a "full" 8x8 block.
If you rotate by +/-90 degrees one will become the other, but either
the right side will become top, or the bottom side will become left.
So, when that side is not at a multiple of 8, that side will have to
be padded out.
However for digital camera images, this is not likely to happen.
All my cameras have provided 8x8 aligned images.
Here is the list of supported resolutions for ONE camera of each of
the manufacturers from the first half of the alphabet. (I got bored
and this proves my point I think...)
There is ONE resolution that is not evenly divisible by 8. It's likely
a type from dpreview.
agfa DC600UW 2816 x 2112, 2048 x 1536, 640 x 480
canon EOS 500D 4752 x 3168 3456 x 2304, XXX 2353 x 1568
casio EX-Z29 3648 x 2736, 3648 x 2432, 3648 x 2048,
3072 x 2304, 2304 x 1728, 1600 x 1200, 640 x 480
Epson R-D1x 3008 x 2000, 2240 x 1488
Fuji Z300 3648 x 2736, 3648 x 2056, 2592 x 1944, 2048 x 1944,
1920 x 1080 1600 x 1200, 640 x 480
HP MZ67 3264 x 2448
Kodak Z1485IS 4352 x 3264, 4352 x 3264, 4352 x 2896, 4352x 2448,
2592 x 1944, 2592 x 1728, 2592 x 1456, 2048 x 1536,
2048 x 1360, 2048 x 1152, 1800 x 1200, 1920 x 1080,
1280 x 960
Konika Z6 2816 x 2112, 2272 x 1704, 1600 x 1200, 640 x 480
kyocera M400R 2272 x 1704, 1600 1200, 1280 x 960, 640 x 480
(the sensor is usually a bit bigger than this to prevent the
algorithms in the camera to have to special-case the borders. And they
don't want to handle partial jpeg blocks. So they simply chose a size
evenly divisible by 8.)