Manually rotate a picture

2,905 views
Skip to first unread message

Martin Lukeš

unread,
Apr 12, 2010, 9:45:21 AM4/12/10
to hugin and other free panoramic software
Hi all
First I'd like to thank developers for such a great program as Hugin
is. Thank you!

Now I'd like to know if there is a way how to rotate picture at
Control Points tab.
It sometimes "mysteriously" rotate and I'd like to rotate it back.

If there isn't such feature yet, do you plan it for future releases?

Thank you

---
Regards
Martin Lukeš

Darko Makreshanski

unread,
Apr 12, 2010, 10:37:38 AM4/12/10
to hugi...@googlegroups.com

> Now I'd like to know if there is a way how to rotate picture at
> Control Points tab.
> It sometimes "mysteriously" rotate and I'd like to rotate it back.
>
> If there isn't such feature yet, do you plan it for future releases?
>

I believe the orientation of the image directly depends on the roll
parameter. So if the image is rotated in the preview, it will also be
rotated in the control points section.

Dale Beams

unread,
Apr 12, 2010, 10:38:33 AM4/12/10
to Hugin Group
IANAD == I am not a developer


To my knowledge, no.  This has been a long standing problem.  It's not really due to rotation as I understand it, but rather on control points that are not matched properly (according to the developers).  Why this has been such a problem, I'm not sure.



Autostitch is a program that will allow this.  Autostitch uses the SIFT and RANSAC algorithms and handles turning and setting orientation of a group of photos just fine.  It however imho has had problems with blending (across the sky, etc.)


Based from Autostitch is Autopano Pro.  Having not purchased it, I understand it works well even with partly out of focus shots.


Why Hugin is not able to do some of these things, I'm not sure.  I'm simply a user.


Dale









> Date: Mon, 12 Apr 2010 06:45:21 -0700
> Subject: [hugin-ptx] Manually rotate a picture
> From: martin....@gmail.com
> To: hugi...@googlegroups.com
> --
> 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 hugi...@googlegroups.com
> To unsubscribe from this group, send email to hugin-ptx+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/hugin-ptx
>
> To unsubscribe, reply using "remove me" as the subject.


The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. Get busy.

Dezen

unread,
Apr 12, 2010, 11:35:06 AM4/12/10
to hugin and other free panoramic software
Yes it depends on the control points, I sometimes get even an upside
panorama.
That´s what usually works for me:
Go to the PICTURES-Tab, select your anchor position picture, below in
"Image Orientation" click "RESET" (the roll value should look rather
weird), then "Optimize Positions".

Bruno Postle

unread,
Apr 12, 2010, 11:46:30 AM4/12/10
to hugi...@googlegroups.com
2010/4/12 Martin Lukeš <martin....@gmail.com>:

>
> Now I'd like to know if there is a way how to rotate picture at
> Control Points tab.

Hugin displays your photos the right way as best as it can. Initially
it uses the EXIF metadata, but once you start aligning it uses the
rotation of the photos in the panorama.

If your panorama is upside down (which Hugin is happy to let you do,
it doesn't 'know' anything about gravity), the images in the Control
Points tab will be upside down too.

--
Bruno

Tom Sharpless

unread,
Apr 13, 2010, 12:36:13 AM4/13/10
to hugin and other free panoramic software
Hi

Control points are for aligning the component photos to each other,
not for aligning the panorama to the viewing frame.

The right way to rotate a pano is just to drag it around in the
preview window (right mouse button; in slow preview the cursor point
jumps to the horizon; in fast preview you get a true rotary drag).
Trying to rotate it by fiddling with control points would lead to
disaster in my hands.

Dragging the preview is also the right way to make the horizon exactly
straight, or vertical lines exactly vertical, which is the same
thing. I believe there is a lot of confusion about this, due to the
historical existence of 'horizontal' and 'vertical' control points --
which were a poor substitute for dragging the pano, are no longer
needed, and best not used.

The general straight line control points are a different story, they
serve an important function for aligning photos and don't try to
impose any orientation on the whole pano.

Cheers, Tom


On Apr 12, 11:46 am, Bruno Postle <brunopos...@googlemail.com> wrote:
> 2010/4/12 Martin Lukeš <martin.merid...@gmail.com>:

distudio

unread,
Apr 13, 2010, 1:17:39 AM4/13/10
to hugin and other free panoramic software

On Apr 13, 2:36 pm, Tom Sharpless <tksharpl...@gmail.com> wrote:

> Dragging the preview is also the right way to make the horizon exactly
> straight, or vertical lines exactly vertical, which is the same
> thing.  I believe there is a lot of confusion about this, due to the
> historical existence of 'horizontal' and 'vertical' control points --
> which were a poor substitute for dragging the pano, are no longer
> needed, and best not used.

Just to put my 2c in here Tom, I still use 'vertical' control points
for a number of purposes, they provide a very quick and accurate
method insuring that verticals are just that. For instance I use them
to eliminate key-stoning and it's too easy to de-fish cropped fish-eye
shots of unknown FL containing known vertical elements.

Cheers,

Rob

Martin Lukeš

unread,
Apr 13, 2010, 5:23:06 PM4/13/10
to hugin and other free panoramic software
And if I want to keep already marked points, but since those two
pictures in Control Points tab are rotated differently to each other
(say 90 degrees), I want MANUALLY rotate one of those pictures.

Will this be possible someday?

Just to remind: I do NOT want to rotate whole panorama, but just one
picture when marking control points.

On Apr 12, 5:46 pm, Bruno Postle <brunopos...@googlemail.com> wrote:
> 2010/4/12 Martin Lukeš <martin.merid...@gmail.com>:
>
>
>

Bruno Postle

unread,
Apr 13, 2010, 7:27:33 PM4/13/10
to hugin and other free panoramic software
On Tue 13-Apr-2010 at 14:23 -0700, Martin Lukeš wrote:
>And if I want to keep already marked points, but since those two
>pictures in Control Points tab are rotated differently to each other
>(say 90 degrees), I want MANUALLY rotate one of those pictures.
>
>Will this be possible someday?
>
>Just to remind: I do NOT want to rotate whole panorama, but just one
>picture when marking control points.

I think we need to see your panorama, a screenshot of the preview
window would do.

--
Bruno

AKS-Gmail-IMAP

unread,
Apr 13, 2010, 9:42:13 PM4/13/10
to hugi...@googlegroups.com
Martin,

If you are referring to the condition where one or more pictures
appear rotated in the Control Points tab AFTER you have performed some
level of Optimizing then you in fact have one or more errant marked
points that have caused Hugin to rotate the images. For that situation
the optimization process determined the best fit to minimize the
errors between all the points is with the images rotated as you see
them. You can bully the images back to how they should be by adding
enough good marked points, but you really should find and delete the
errant marked points. That task is something you need to learn how to
do. In time you will learn what parts of an image are likely to fool
the automatic point generators. Sometimes it is best to manually
enter all the marked points associated with the rotated picture. To do
that you probably will want the picture properly rotated in the
Control Points tab after it has already been improperly rotated by
Hugin and after you have deleted the marked points for that picture.
That rotate task is what I think you are asking about and it sometimes
does make sense to have the ability in the Control Points tab but you
must realize that Hugin has evolved bit by bit over a long time. The
location where you correct the rotation is back at the Images tab and
that tab and its place in the intended work path scheme is much older
in the programming evolution. I suspect asking for the rotation
function at the Control Points tab may be considered heresy.

Rotating pictures is simply accomplished by manually changing the
"roll" value in the Images tab for that picture. Select the image in
the Images list and then type in the new roll value. Pictures appear
90 degrees clockwise rotated in the Control Points tab when the roll
value is 45 or greater. Pictures appear 90 degrees counter-clockwise
rotated when the roll value is -46 or smaller. Similarly, pictures
appear upside-down when the roll value is 135. Note that the roll
value is recalculated when you Optimize again. You pictures may flip
again if the errant marked points were not removed.

Allan

Pell Emanuelsson

unread,
Apr 14, 2010, 3:22:10 AM4/14/10
to hugi...@googlegroups.com

> you really should find and delete the
> errant marked points. That task is something you need to learn how to
> do. In time you will learn what parts of an image are likely to fool
> the automatic point generators. Sometimes it is best to manually
> enter all the marked points associated with the rotated picture.

This post did contain valuable advice but I'm often dismayed by the
condescending treatment ("in time you will learn...") in this group of
users that provide good input on making Hugin better. There's no
better way to make sure that Hugin stays an obscure and difficult
to use tool for enthusiasts only.

> To do
> that you probably will want the picture properly rotated in the
> Control Points tab after it has already been improperly rotated by
> Hugin and after you have deleted the marked points for that picture.

Yes, exactly. Autopano-sift-c loves to line up control points along
the edges of the images or in clouds and making ridiculous matches.
To find them you open the control point window, sort it on bad matches
(you have to click *twice* on the column although this should really
be the default sort order!). Then you click on the worst point.
This takes you to the control point window.
Now the images are rotated in different directions, some
even upside down. How easy is it to find the bad points?
Naturally you would like to rotate the images then and there.
One could have used Celeste if it didn't have the habit to remove
only half of the cloud points and then half of the good points as well.

> Rotating pictures is simply accomplished by manually changing the
> "roll" value in the Images tab for that picture. Select the image in
> the Images list and then type in the new roll value. Pictures appear
> 90 degrees clockwise rotated in the Control Points tab when the roll
> value is 45 or greater. Pictures appear 90 degrees counter-clockwise

Could you imagine how frustrating it would be in Irfanview if you couldn't
press R/L to rotate the image in front of you, but instead you would need
to go to a different window, search for the image file name, click on it,
then you naturally can't change the roll value right there, but you have to go
down to a different window, click on the roll field, then think about what
value you need to enter there (-90, 0, 90, 180) without immediately
seeing what effect it has. Then you go back to the image display window
to check if you happened to use the correct value - if not, go back to the
other window, etc. And then repeat this for several images in your pano.

Since I started using Panomatic I no longer have these problems. So I offer
this as advice: download Panomatic, unpack it somewhere. In the Hugin
Preferences go to Control Point Detectors. Click on Panomatic and Edit.
Browse for the EXE. I use the following options:
--fullscale -o %o %i
Since Panomatic is so fast I can allow it to work on my fullscale 12M images
and it then does a much better job of fine tuning the control points than Hugin does.
(Although Hugin does a much better job than Autopano-sift-c.)
Set Panomatic as Default.
Your mileage may vary - I just do cylindrical panos from rectilinear
images, no sphericals.

Regards, Pell

Dale Beams

unread,
Apr 14, 2010, 10:20:01 AM4/14/10
to Hugin Group
Martin,


Can you send me or place on a website the photos in question?  I"d like to do a side by side comparison.



Dale

The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. Get busy.

Bob Campbell

unread,
Apr 14, 2010, 5:30:43 PM4/14/10
to hugin and other free panoramic software
On Apr 13, 3:23 pm, Martin Lukeš <martin.merid...@gmail.com> wrote:
> And if I want to keep already marked points, but since those two
> pictures in Control Points tab are rotated differently to each other
> (say 90 degrees), I want MANUALLY rotate one of those pictures.

I've seen this as well (more with autopano-sift-c, iirc). What I've
noticed is that two completely unrelated images will have a common
control point. Running Celeste manually has helped with this, and
also going through the control points tab and looking for images that
are not neighbors but have a single control point anyway. Deleting
such control points and rerunning the optimization almost always
works.

So I don't think what we'd want is a way to manually force the
rotation of the images, but rather a smarter weeding out of erroneous
control points. So maybe a final pass in the CP generators that weeds
out control point matches for two images under a minimum
(configurable) threshold (like, 1-5?).


Bob Campbell

unread,
Apr 14, 2010, 5:32:13 PM4/14/10
to hugin and other free panoramic software
On Apr 13, 3:23 pm, Martin Lukeš <martin.merid...@gmail.com> wrote:
> And if I want to keep already marked points, but since those two
> pictures in Control Points tab are rotated differently to each other
> (say 90 degrees), I want MANUALLY rotate one of those pictures.

I've seen this as well (more with autopano-sift-c, iirc). What I've

Simon Oosthoek

unread,
Apr 15, 2010, 4:09:58 AM4/15/10
to hugi...@googlegroups.com
It would be nice to have a threshold value above which the CPs are not
"used", but they should remain defined, because they may actually be
correct.

/Simon

Reply all
Reply to author
Forward
0 new messages