PTGui 9 gets image orientation wrong

1,724 views
Skip to first unread message

Huck

unread,
Nov 12, 2010, 11:11:54 AM11/12/10
to PTGui Support
I shot a series of images in portrait orientation. When I load the
images PTGui 9 it says one of the images is in landscape mode and
recommends that I open it is a graphics program and change the
orientation. The image was shot in portrait orientation. Is there a
way to get PTGui to know that? I haven’t tried it yet but it seems
weird to change an image that is in portrait orientation to landscape
so that PTGui will think it is portrait.

Erik Krause

unread,
Nov 12, 2010, 3:02:00 PM11/12/10
to pt...@googlegroups.com
Am 12.11.2010 17:11, schrieb Huck:
> I shot a series of images in portrait orientation. When I load the
> images PTGui 9 it says one of the images is in landscape mode and
> recommends that I open it is a graphics program and change the
> orientation. The image was shot in portrait orientation.

Well, that's what you think. The orientation sensor in your camera
apparently thinks different ;-) PTGui rotates images according to the
rotation information in EXIF data. THis isn't accurate for images shot
straight up or down and even for images shot more or less horizontally
the info can be recorded wrong.

> Is there a way to get PTGui to know that? I haven�t tried it yet but it seems


> weird to change an image that is in portrait orientation to landscape
> so that PTGui will think it is portrait.

Best is to disable auto rotation in the camera when shooting panoramas.
Once the EXIF data is recorded wrong you can either change the data or
the actual rotation - such that two wrongs make a right...

--
Erik Krause
http://www.erik-krause.de

Eric O'Brien

unread,
Nov 12, 2010, 11:12:07 PM11/12/10
to pt...@googlegroups.com
Since the problem happens fairly often, I might suggest that the
default in PTGui should be "Off" or "Ignore" or whatever.

This is another example of where "automatic" can cause more problems
than "Figure it out yourself." Things might even be more likely to
work if PTGui ignored any EXIF data about this and instead assumed
images were shot in a "portrait" orientation that resulted from
rotating the camera 90 degrees clockwise!

eo


On Nov 12, 2010, at 12:02 PM, Erik Krause wrote:

> Am 12.11.2010 17:11, schrieb Huck:
>> I shot a series of images in portrait orientation. When I load the
>> images PTGui 9 it says one of the images is in landscape mode and
>> recommends that I open it is a graphics program and change the
>> orientation. The image was shot in portrait orientation.
>
> Well, that's what you think. The orientation sensor in your camera
> apparently thinks different ;-) PTGui rotates images according to
> the rotation information in EXIF data. THis isn't accurate for
> images shot straight up or down and even for images shot more or
> less horizontally the info can be recorded wrong.
>

>> Is there a way to get PTGui to know that? I haven’t tried it yet

John Houghton

unread,
Nov 13, 2010, 3:58:02 AM11/13/10
to PTGui Support
On Nov 13, 4:12 am, Eric O'Brien <eri...@extramonday.com> wrote:
> This is another example of where "automatic" can cause more problems  
> than "Figure it out yourself."  Things might even be more likely to  
> work if PTGui ignored any EXIF data about this and instead assumed  
> images were shot in a "portrait" orientation that resulted from  
> rotating the camera 90 degrees clockwise!

PTGui presently observes the orientation flag if present. Arguably,
this is obvious thing to do and what most people would expect and
want. However, for avoiding the well known problems when stitching
full 360x180 panoramas, it would maybe be better to (optionally) adopt
the approach that if the orientation tag is set in the exif data, then
PTGui should ignore it and do nothing or optionally rotate by -90
degrees (not merely set the roll parameter to -90). If the
orientation flag is not set, then the image should be accepted as is.
Photoshop does not preserve or set the orientation flag in output
files, but it observes the flag present in input files, so it is the
user's responsibility to get the images into the correct orientation.
Only by inspecting the orientation flag in the metadata can you be
sure images are not upside down (or compare images with a visual
inspection).

Turning off the auto rotate feature in the camera is by far the
easiest way of avoiding trouble.

John

Erik Krause

unread,
Nov 13, 2010, 5:15:26 AM11/13/10
to pt...@googlegroups.com
Am 13.11.2010 05:12, schrieb Eric O'Brien:
> Since the problem happens fairly often, I might suggest that the
> default in PTGui should be "Off" or "Ignore" or whatever.

It is a feature request from some time ago to make EXIF rotation
optional. The Options->EXIF tab would have room enough. I hoped it will
make the way into version 9...

Sam Rohn

unread,
Nov 13, 2010, 6:00:21 AM11/13/10
to PTGui Support
i sometimes use my camera for a mix of stills and panos, so i like my
camera to rotate the images appropriately - panos images are usually
sent through lightroom prior to stitching anyway, where proper
orientation is just a click away

however, i never stitch landscape images, so either an ignore or
orientation or load all as portrait or just a way to rotate single
images would be helpful when stitching images straight from the
camera, and i suppose there is no point in loading images the "wrong"
way in the first place just to tell you they can not be stitched :)

sam

- - - - -
Sam Rohn :: New York City
Panoramic Photography :: http://www.samrohn.com
Location Scout :: http://www.nylocations.com

Erik Krause

unread,
Nov 13, 2010, 7:21:01 AM11/13/10
to pt...@googlegroups.com
Am 13.11.2010 12:00, schrieb Sam Rohn:

> i sometimes use my camera for a mix of stills and panos, so i like my
> camera to rotate the images appropriately

Me too. And I use one of the custom programs of my camera in order to
change all necessary settings quickly, auto-rotation being one of them...

PTGui Support

unread,
Nov 13, 2010, 9:01:58 AM11/13/10
to pt...@googlegroups.com
That feature request has long been implemented (at least in the Pro
version):

Switch to Advanced mode and go to the Project Settings tab, there's a
check box 'Physically rotate images with EXIF Orientation tag upon
loading'. See the included help for more information.

Use File->Make Default to change the default setting for all new projects.

This checkbox should be set before loading the first image. After that
it's locked.

Unfortunately EXIF rotation is a contiuous source of problems due to the
fact that some programs apply it while other applications ignore it.
PTGui cannot be compatible with both at the same time, so the 'best
default value' depends completely on your point of view. To make the
problem worse, programs like Photoshop physically rotate the image and
remove the rotation tag after re-saving an edited image.

Another related problem is the fact that PTGui characterizes a lens by
its horizontal field of view; this is the reason why PTGui expects all
images to be in the same orientation. This is a Panorama Tools legacy
which I plan to overcome in a next version; it would have been much
better if a lens was characterized by its diagonal field of view from
the start.

Finally, for RAW files PTGui cannot determine the EXIF rotation since
dcraw doesn't tell this. dcraw will always physically rotate the image
if there's an EXIF orientation, and as a result the above checkbox does
not apply to raw images.

To make a long story short:
- it's best to disable the rotation sensor when shooting panoramas. If
you stitch RAW files in PTGui this is even compulsary.
- if there is EXIF rotation, uncheck the checkbox 'physically rotate..'
before loading the first image. But expect problems whenever the images
are processed and re-saved in Photoshhop.

Joost

Huck

unread,
Nov 13, 2010, 10:38:50 AM11/13/10
to PTGui Support
Wow. You guys are so much more advanced than me. I'm still trying to
figure out how to solve the problem this one time.
1) Can the EXIF data me manually changed? I guess my camera thought
it was in landscape mode while I was shooting a series of shots
(looking upward) in portrait orientation (as far as I was concerned).
So can I change the data the camera sent after the fact?
2) If I rotate the image with Photoshop or Corel Photopaint will that
solve the problem?

Huck
> > make the way into version 9...- Hide quoted text -
>
> - Show quoted text -

Ken Warner

unread,
Nov 13, 2010, 11:35:11 AM11/13/10
to pt...@googlegroups.com
In my LX3, I've turned off automatic orientation but for some reason
the EXIF still says to rotate some of the images. If I do, for example,
24 images, the down shots are likely to be not rotated yet the horizontal
images are rotated. So I end up with some of the images rotated and
some not rotated and PTGui complaining that all the images must

be in the same orientation.

I would prefer an option to ignore the rotation info in the EXIF and
let me physically rotate the images to the orientation I want.

John Houghton

unread,
Nov 13, 2010, 12:19:41 PM11/13/10
to PTGui Support
Ken, The LX3 doesn't have an option to turn off the auto rotation.
There is only an option to turn off/on the rotation for the camera
display.

John
> > John- Hide quoted text -

Ken Warner

unread,
Nov 13, 2010, 12:30:41 PM11/13/10
to pt...@googlegroups.com
Yes, that's what I am beginning to understand. The LX3 is still
new to me. Still learning all it's tricks.

And I don't have the Pro version of PTGui so I'm stuck fiddling
with some of the images.

John Houghton

unread,
Nov 13, 2010, 12:37:26 PM11/13/10
to PTGui Support
On Nov 13, 3:38 pm, Huck <huckror...@groundwork.org> wrote:
> 2) If I rotate the image with Photoshop or Corel Photopaint will that
> solve the problem?

Yes (in Photoshop at least) provided you rotate each image by the
correct angle. It's not simply a question of landscape v portrait.
For consistent application of the lens shift parameters, the position
of the optical centre of the lens image needs to be the same in all
the images. If some images are upside down while apparently all are
correctly in portrait orientation, the optimization will be
compromised.

John

Erik Krause

unread,
Nov 13, 2010, 2:49:32 PM11/13/10
to pt...@googlegroups.com
Am 13.11.2010 15:01, schrieb PTGui Support:

> Another related problem is the fact that PTGui characterizes a lens by
> its horizontal field of view; this is the reason why PTGui expects all
> images to be in the same orientation. This is a Panorama Tools legacy
> which I plan to overcome in a next version; it would have been much
> better if a lens was characterized by its diagonal field of view from
> the start.
>
> Finally, for RAW files PTGui cannot determine the EXIF rotation since
> dcraw doesn't tell this. dcraw will always physically rotate the image
> if there's an EXIF orientation, and as a result the above checkbox does
> not apply to raw images.

All this reads as if it would be best to ignore rotation flag completely
for PTGui internal usage. It could be used to preset the Roll value, but
that's all. Internal processing could be done using either all images in
landscape or all in portrait orientation, what meets the processing
needs better. I wouldn't use diagonal field of view since this needs
additional computation and might cause compatibility problems.

Reply all
Reply to author
Forward
0 new messages