On 15 Dez., 20:22, "T. Modes" <[email protected]> wrote:

> Hugin is using the "official" Orientation tag (tag 0x0112) in the
> "normal" EXIF data. This works for me.
> But from your mail it seems that your raw converters destroy this
> information.

I continued on my quest to create the optimal hugin input. What I
ended up doing is to delete the CameraOrientation tag before raw
processing (with digiKam 1.9.0) or use a raw processor which doesn't
look at the CameraOrientation tag (dcraw, raw therapee, Canon DPP). I
do the raw processing with the Orientation tag (which is a different
tag!) set to horizontal, because otherwise all raw processors I know
will rotate protrait data so they come out horizontal. After raw
processing I set the Orientation tag back to what it would have been,
had the camera been in autoratate mode. Now, finally, I have input fit
for hugin:

- the image data are now stored as per sensor geometry, which is
always landscape, and the top row of the image data coinciding with
the bottom edge of the sensor (because the image is upside down on the
sensor, after all). Why is this important? Because now I can use just
one single lens.ini file for all images with a particular lens, no
matter which way I have rotated the camera, instead of having to use
up to four different ones, one for each possible orientation.

- the images do have rotation information in the Orientation tag,
which is the tag hugin can exploit. This has the effect that when I
generate my panorama with gen_pto, portrait images show up with roll
of 90 or 270 degrees, respectively. This is also important, because
otherwise I can't use one of the portrait images as anchor properly,
and most of my panoramas are mainly in portrait. When loading such
images into a new project in hugin, my hugin (Pre-Release
2011.5.0.71ffba4767f5) did not check the Orientation, but once the
images were in the project I could go to the camera and lens tab,
select all images and click on 'read EXIF data' - and lo and behold,
now my orientation settings were there all right. Maybe the EXIF data
of newly loaded images aren't read completely? Overhead shots will not
show with an initial roll of 180, because my camera does not notice
it's upside down but records 'horizontal' in this situation. I could
manually set 'Orientation' to 180 degrees, but I don't usually shoot
overhead, so I just ignore this possibility.

While looking at these images which are good to feed to hugin, I had a
good laugh at what various image viewers and image processing programs
make of them. A few did what hugin does and displayed them rotated
correctly, as per EXIF Orientation tag. Others ignored this tag and
displayed the images in their 'native' orientation - the one which I
took care to preserve in order to be able to use just one single
lens.ini file on them. I can live with that, I don't look at the raw
material that much and my file manager rotates properly. The funniest
result was in digiKam, again: the image rotated 90CW showed up upside
down and mirror-imaged! I'm sure they'll tell me I should try and
upgrade to a more recent version if I posted a bug report...

Things get even more confused when 'rotating' images in image
processing software. Here, again, there are two possible ways to
achieve a rotation: The software can just change the 'Orientation'
tag, or it can change the memory layout of the image. Some image
processing software gives you a choice what to do. The observable
effect will, obviously, depend on which image viewer you use on the
rotated images.

I conclude that I have found a way of dealing with the problem, but it
was a stony path (one of the reasons I have avoided the matter so
long). There's plenty of possibilites to take a wrong turn here, and
the unwary may easily end up with a false result. For hugin input
data, my in-a-nutshell advice would be:

- avoid rotation of the image data - easiest done by removing all
orientation-related tags from the images before raw processing
- before generating the pto, set the EXIF 'Orientation' tag to an
appropriate value
- generate the pro with pto_gen
- or, after loading the images into hugin, read their EXIF data
explicitly

Kay

-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx

Reply via email to