Another overlapped image issue

18 views
Skip to first unread message

Groogle

unread,
Jul 9, 2011, 8:22:58 PM7/9/11
to hugin and other free panoramic software
I've read the current thread on "registering" images with some
interest but not much understanding. I think that my issue is
similar, but to avoid muddying the waters, I'm starting a separate
thread.

I'm trying to create time-lapse images according to the instructions
at http://wiki.panotools.org/Align_a_stack_of_photos . That doesn't
work, possibly because hugin has changed since then: the 'g' command
gives me no control points whatsoever. So I selected "Create control
points" from the Images window and got a very bad fit.

The three images in question were all taken from a tripod which wasn't
moved during the time between them (about 20 minutes). The problem
appears to be that I accidentally changed the focal length of the lens
between the first image and the other two. Clearly I need to scale
the images to the same size.

According to the instructions, this shouldn't be an issue, but I can't
see a way of telling any of the component programs the focal length of
each image. Is there a way to do so? Or is there another way? This
was supposed to be a "simple" test before I attacked something bigger,
so a solution just for this case isn't of much help.

There's more description, including the images, at
http://www.lemis.com/grog/diary-mar2011.php#time-lapse
The resultant images are shown in the diary entry mentioned above.
The original ones are at:

http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-before.jpeg
http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-during.jpeg
http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-after.jpeg

Bigger versions are available at
http://wwww.lemis.com/grog/Photos/20110330/small/Verandah-before.jpeg
and
http://wwww.lemis.com/grog/Photos/20110330/big/Verandah-before.jpeg ,
etc. These images are also shown on the diary page in the preceding
entry (http://www.lemis.com/grog/diary-mar2011.php#D30-1).

This is Hugin 2011.0.0.0f9fdaf56720 running on FreeBSD 8.2-STABLE.

Greg

Terry Duell

unread,
Jul 10, 2011, 12:01:47 AM7/10/11
to hugi...@googlegroups.com
Hullo Greg,

This mightn't be a lot of help, but this is what happened when I had a
look at your pics.
Firstly, I found the the original images to be quite low resolution,
300x225. I was refused connection when attempting to access other links
provided.
Hugin-2011.3.0 (hg02e5d9618f49) loaded the images OK, and set 'after' and
'during' to lens 0 with a FOV=44.7 deg. Image 'before' was given lens 1
with FOV=41.2 deg.
I used CPfind to create control points, and did an initial optimisation,
after which the Fast preview Window opened blank, finally the FPW failed
to respond and hugin disappeared in a puff of smoke. I would guess that
there is a problem with the code. If I can reproduce this I'll file a bug
report.
I tried again, and this time the FPW opened OK. The alignment was not very
good so I started getting rid of bad control points, and re-optimising,
but found it hard to get a good result.
I'm not sure, but suspect that the low resolution may not be helping.
I'll have a bit more of play with with the images and if I turn up
anything useful I'll post the story.

Cheers,
--
Regards,
Terry Duell

Terry Duell

unread,
Jul 10, 2011, 2:06:58 AM7/10/11
to hugi...@googlegroups.com
On Sun, 10 Jul 2011 14:01:47 +1000, Terry Duell <tdu...@iinet.net.au>
wrote:


> I'll have a bit more of play with with the images and if I turn up
> anything useful I'll post the story.
>

I have managed to get a result, using the low res images. It may be
possible to do better using higher res images. Here is the process I used.
Load images, using 'Assistant' tab.
'Images' tab, create control points.
'Optimizer' tab, optimize 'Positions (incremental, starting from anchor)'.
'Control Points' tab, manually delete control points with a distance
greater than about 8 or 9.
'Optimizer' tab, optimize 'Positions (incremental, starting from anchor)'.
These steps got me to a point where the max error was 8.1.
If I tried to optimize other parameters things just got worse, so I left
it at that.
In Fast Preview window select 'Projection' 'Rectilinear'; fiddle with
field of view sliders to reasonably fill the window.
'Stitcher' tab, deselect any Panorama outputs and select 'Remapped Images:
Exposure corrected...'; select 'Calculate Optimal Size', and then 'Stitch'.
I ended up with 3 remapped images, each 2458x2778 which look like they
would register OK.
Hope this helps.

Greg 'groggy' Lehey

unread,
Jul 10, 2011, 3:19:03 AM7/10/11
to hugi...@googlegroups.com
On Sunday, 10 July 2011 at 14:01:47 +1000, Terry Duell wrote:
> Hullo Greg,
>
> On Sun, 10 Jul 2011 10:22:58 +1000, Groogle <groo...@gmail.com> wrote:
>
>> There's more description, including the images, at
>> http://www.lemis.com/grog/diary-mar2011.php#time-lapse
>> The resultant images are shown in the diary entry mentioned above.
>> The original ones are at:
>>
>> http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-before.jpeg
>> http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-during.jpeg
>> http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-after.jpeg
>>
> This mightn't be a lot of help, but this is what happened when I had a
> look at your pics.
> Firstly, I found the the original images to be quite low resolution,
> 300x225.

This is a feature, not a bug :-) That was just to show what the images
looked like. Clearly they're not the right thing for processing.

> I was refused connection when attempting to access other links >
> provided.

Sorry about that. Typo on my part:
http://wwww.lemis.com/grog/Photos/20110330/tiny/Verandah-before.jpeg
instead of
http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-before.jpeg .

I'll address the rest in answer to your other message.

Thanks for the feedback
Greg
--
Finger gr...@FreeBSD.org for PGP public key.
See complete headers for address and phone numbers.
This message is digitally signed. See
http://www.lemis.com/grog/email/signed-mail.php for more details.
If your Microsoft MUA reports problems, please read
http://tinyurl.com/broken-mua

Greg 'groggy' Lehey

unread,
Jul 9, 2011, 3:56:58 AM7/9/11
to Hugin list
I've read the current thread on "registering" images with some
interest but not much understanding. I think that my issue is
similar, but to avoid muddying the waters, I'm starting a separate
thread.

I'm trying to create time-lapse images according to the instructions
at http://wiki.panotools.org/Align_a_stack_of_photos . That doesn't
work, possibly because hugin has changed since then: the 'g' command
gives me no control points whatsoever. So I selected "Create control
points" from the Images window and got a very bad fit.

The three images in question were all taken from a tripod which wasn't
moved during the time between them (about 20 minutes). The problem
appears to be that I accidentally changed the focal length of the lens
between the first image and the other two. Clearly I need to scale
the images to the same size.

According to the instructions, this shouldn't be an issue, but I can't
see a way of telling any of the component programs the focal length of
each image. Is there a way to do so? Or is there another way? This
was supposed to be a "simple" test before I attacked something bigger,
so a solution just for this case isn't of much help.

There's more description, including the images, at


http://www.lemis.com/grog/diary-mar2011.php#time-lapse
The resultant images are shown in the diary entry mentioned above.
The original ones are at:

Bigger versions are available at

This is Hugin 2011.0.0.0f9fdaf56720 running on FreeBSD 8.2-STABLE.

Greg

Greg 'groggy' Lehey

unread,
Jul 9, 2011, 7:11:36 PM7/9/11
to Hugin list
Apologies if this is a duplicate, but my earlier message doesn't seem
to have made it after 15 hours.

Bruno Postle

unread,
Jul 11, 2011, 6:55:25 PM7/11/11
to Hugin ptx
On Sun 10-Jul-2011 at 17:19 +1000, Greg 'groggy' Lehey wrote:
>> On Sun, 10 Jul 2011 10:22:58 +1000, Groogle <groo...@gmail.com> wrote:
>>
>>> There's more description, including the images, at
>>> http://www.lemis.com/grog/diary-mar2011.php#time-lapse
>>> The resultant images are shown in the diary entry mentioned above.
>>> The original ones are at:
>>>
>>> http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-before.jpeg
>>> http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-during.jpeg
>>> http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-after.jpeg

>I'll address the rest in answer to your other message.

The control point generators are particularly bad at matching photos
taken at long time intervals - The changes in quality and direction
of light are enough to throw off feature matching. This is probably
why Terry needed to delete a lot of 'bad' control points.

If your photos have different focal lengths, then you can 'unlink'
the 'degrees of view (v)' lens parameter before optimisation.

--
Bruno

Greg 'groggy' Lehey

unread,
Jul 12, 2011, 3:43:11 AM7/12/11
to hugi...@googlegroups.com
On Monday, 11 July 2011 at 23:55:25 +0100, Bruno Postle wrote:
> On Sun 10-Jul-2011 at 17:19 +1000, Greg 'groggy' Lehey wrote:
>>> On Sun, 10 Jul 2011 10:22:58 +1000, Groogle <groo...@gmail.com> wrote:
>>>
>>>> There's more description, including the images, at
>>>> http://www.lemis.com/grog/diary-mar2011.php#time-lapse
>>>> The resultant images are shown in the diary entry mentioned above.
>>>> The original ones are at:
>>>>
>>>> http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-before.jpeg
>>>> http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-during.jpeg
>>>> http://www.lemis.com/grog/Photos/20110330/tiny/Verandah-after.jpeg
>
>> I'll address the rest in answer to your other message.

Sorry for the slow response here. My original mail messages came
through with more than 48 hours delay. From the headers, it seems
that it was from somewhere within Google. Hopefully this reply will
come through faster.

> The control point generators are particularly bad at matching photos
> taken at long time intervals - The changes in quality and direction
> of light are enough to throw off feature matching. This is probably
> why Terry needed to delete a lot of 'bad' control points.

Agree, but I'm not sure that's the main problem. I've been playing
around with these results, and I have come to the following
recognitions:

- The way Terry did it, creating the control points from the "Images"
window, is vastly superior to the way I tried it the first time from
the "Assistant" window.
- Some of the control points were on plants and leaves which moved
from one photo to another.

So I thought, it's a simple set of images with some clearly defined
control points. Let's do it manually with control points on parts of
the house and brickwork. The result? Worse than what Terry got!

> If your photos have different focal lengths, then you can 'unlink'
> the 'degrees of view (v)' lens parameter before optimisation.

This is the "link" box in the
And this, I think, is part of the
question, though I didn't see any difference between linking and not
linking.

But it seems that Hugin is relying on the focal length information
from EXIF, and in the case of my camera, that information is very
inaccurate. The focal lengths of the two images were given as 21 mm
(44.72°) and 23 mm (41.18°). The EXIF data will report a maximum of
one focal length value between these two--maybe. Maybe there's
nothing at all between the two values.

If Hugin is relying on this information, there's a good chance that it
will be wrong. I suppose I could guess at closer focal length or
field of view values, but there must be a simpler way.

For the fun of it, I tried changing the focal length spec for the
second and third images. I left the first one at 23 mm, but by
changing the focal length of the other two. At 22.421 mm, the errors
dropped to an average of 0.3 pixel, with a maximum of 0.92 pixel.
Wonderful!

Unfortunately, the results didn't look at all wonderful. Now all
three images have a different size. I'm experimenting further, but
it's beginning to look as if the Hugin or the control point detectors
need to find another way of determining the relationship between the
image sizes than relying on the EXIF data. Any thoughts?

There's more information, including images and discussion, at
http://www.lemis.com/grog/diary.php#D11-3 , though that doesn't
include the change of focal length. I'm continuing to experiment.

And since I've messed it up before, you can get bigger and bigger
images of any of these by simply clicking on the image.

Bruno Postle

unread,
Jul 12, 2011, 4:17:22 PM7/12/11
to Hugin ptx
On Tue 12-Jul-2011 at 17:43 +1000, Greg 'groggy' Lehey wrote:
>On Monday, 11 July 2011 at 23:55:25 +0100, Bruno Postle wrote:

>- The way Terry did it, creating the control points from the "Images"
> window, is vastly superior to the way I tried it the first time from
> the "Assistant" window.

Yes, the assistant is a wizard for 'normal' panoramas that have lots
of partial overlap between photos. As soon as you want to do
something different you need to take control yourself.

>> If your photos have different focal lengths, then you can 'unlink'
>> the 'degrees of view (v)' lens parameter before optimisation.
>
>This is the "link" box in the And this, I think, is part of the
>question, though I didn't see any difference between linking and not
>linking.

If angle of view is 'linked' then the optimiser will find a solution
where all photos have the same angle of view, if it is 'unlinked'
then it will also search solutions where each photo has a different
angle of view.

>But it seems that Hugin is relying on the focal length information
>from EXIF, and in the case of my camera, that information is very
>inaccurate.

The EXIF is just used for the initial values when you start the
project. If you run the optimiser and optimise angle of view, then
Hugin will find new values that fit the data better.

>For the fun of it, I tried changing the focal length spec for the
>second and third images. I left the first one at 23 mm, but by
>changing the focal length of the other two. At 22.421 mm, the errors
>dropped to an average of 0.3 pixel, with a maximum of 0.92 pixel.

Yes, for a set of photos with a narrow total angle of view like
this, it doesn't much matter if the actual angle of view is
inaccurate - So long as the relative values are good.

In practice, with a 'narrow' project like this you don't have enough
data to discover the precise angle of view anyway.

>There's more information, including images and discussion, at
>http://www.lemis.com/grog/diary.php#D11-3 , though that doesn't
>include the change of focal length. I'm continuing to experiment.

--
Bruno

Reply all
Reply to author
Forward
0 new messages