Mosaic woes

80 views
Skip to first unread message

John Muccigrosso

unread,
Aug 8, 2020, 10:17:05 AM8/8/20
to hugin and other free panoramic software
I'm trying to create a mosaic image with three photos and having a heck of a time.

For one thing, the Fast Panorama Preview looks like the attached, which doesn't seem right in terms of placement of the image in the bottom left. Is it?

Then I'm just not having success with the really any of the preview functions or the stitching (which I realize is vague). If someone could walk me through it, or give it a try with the images an tell me what worked, I'd be very grateful.

I'm on a Mac with Hugin 2019.2.0.b690aa0334b5.

Screen Shot 2020-08-08 at 16.13.50.png


tbransco

unread,
Aug 8, 2020, 3:39:23 PM8/8/20
to hugin and other free panoramic software
Hey, John.

We're both having trouble with mosaics it seems.  My post lies just below yours on this list.  I described a workflow in it that might be helpful to you.  Basically, it's likely the optimizing step that needs some changes.  Give it a go and see how you get on with it.  If you still have problems, I'd be happy to try your images and help out.

Cheers,
Terry

Bruno Postle

unread,
Aug 8, 2020, 6:09:52 PM8/8/20
to hugin and other free panoramic software
On Sat 08-Aug-2020 at 07:17 -0700, John Muccigrosso wrote:
> I'm trying to create a mosaic image with three photos and having a
> heck of a time.
>
> For one thing, the Fast Panorama Preview looks like the attached,
> which doesn't seem right in terms of placement of the image in the
> bottom left. Is it?
>
> Then I'm just not having success with the really any of the
> preview functions or the stitching (which I realize is vague). If
> someone could walk me through it, or give it a try with the images
> an tell me what worked, I'd be very grateful.

Since your three photos are taken straight towards the wall there
shouldn't be much rotation needed to get a good fit. So, to see
what the optimiser is doing, I would do this in stages (after
resetting all the XYZ position and rpy rotation parameters):

1. start by optimising just X for the two side photos, this should
look almost ok.

2. optimise X & Y for the two side photos, this should look a bit
better.

3. add Z optimisation for the two side photos.

4. add roll, pitch & yaw optimisation for the two side photos.

5. add pitch & yaw (not roll) optimisation for the middle photo.

The end result is that you are optimising everything except for the
position of the middle photo (keeping it in the middle), and roll
rotation of the middle photo (otherwise the whole thing will spin
around).

--
Bruno

John Muccigrosso

unread,
Sep 10, 2020, 5:00:53 PM9/10/20
to hugin and other free panoramic software
Thanks, Bruno.

Sorry, this isn't enough for me. :-(

As a meta-comment, I don't know why this is so hard. It seems like a basic thing and the tutorial I used to use just doesn't work.

Anyway...

What do I do exactly? Run cpfind for control points, go to the optimizer window and choose x for only the first and third images. Then what? I'm afraid I need more detail.

Bruno Postle

unread,
Sep 10, 2020, 5:58:31 PM9/10/20
to hugin and other free panoramic software
Yes, you first need control points either by running the automatic
control point tool in Hugin (cpfind) or picking control points
manually.

You have three pictures of the same wall, they are basically the
same except that you moved sideways between shots - in the 'X'
direction - if you had climbed a ladder instead then the difference
would be in your 'Y' position.

So you should be able to get an approximate stitch by: resetting any
existing XYZ positions and roll/pitch/yaw rotations; selecting
custom optimisation; ticking the checkboxes to optimise 'X' for two
of the photos; and clicking 'optimise'.

Since these are likely hand-held shots, there were certainly small
'Y' (vertical) and 'Z' (forward and back) differences between shots
too. So go back to the optimiser tab to tell the optimiser that you
also want to optimise 'Y' and 'Z' for two of the photos, click
optimise, the panorama should look a bit better.

This isn't all, probably you were not pointing the camera perfectly
perpendicular to the wall, so you need to optimise roll, pitch and
yaw for all photos as well.

*except* there is not enough rotation constraint here, your panorama
will end-up upside down or sideways, so you either need to add
horizontal or vertical control points (just one pair will do), or
you need to lock roll for one of the photos - which you do by *not*
optimising roll for this photo.

Or to put it another way, you are optimising everything, except
*something* needs to be restrained by X, Y, Z and roll, otherwise
the panorama will wander off the canvas.

--
Bruno

John Muccigrosso

unread,
Sep 11, 2020, 1:02:57 PM9/11/20
to hugin and other free panoramic software
Thank again, Bruno. I'll try this.

Another thing - that I think I reported elsewhere - the way my fast panorama window looks is wrong, right? What's with the confining of the image to the bottom left portion of the box?

Bruno Postle

unread,
Sep 11, 2020, 1:12:01 PM9/11/20
to hugi...@googlegroups.com
It looks wrong, I don't know why. You definitely need to set your *output* projection to rectilinear - Bruno

John Muccigrosso

unread,
Sep 11, 2020, 1:54:32 PM9/11/20
to hugin and other free panoramic software
That makes no difference to the display in the bottom left-hand corner.

- Load images
- create control points
- go to fast panorama preview where the image in confined to the bottom left.

If I stick to the simpler(?) Panorama Preview, things look better, but I can quickly screw them up by telling that window to "center". Or by clicking, which interface is a complete mystery to me.

Anyway, I reset from the optimization window. All good? Nope. Redoing the optimizing in exactly the same way as the first time produces different results. So much for resetting. So I just reload and repeat my steps.

Anyway, working on it, though I wonder whether I screwed up my prefs somehow. I did switch to Hugin_stitch_project for stitching was was resulting in no output unless I manually did it, so I switched back to PTBatcherGui which "just works".

What I got from you, which seems to be working, is to slowly optimize, starting from x on just two images, then finish with optimization of all the images, leaving one unoptimized for xyz and roll (so, just pitch is optimized). That gives me a good result, which in the case has the right orientation as well.

John Muccigrosso

unread,
Sep 11, 2020, 2:10:05 PM9/11/20
to hugin and other free panoramic software
Should add that the final output image is easily "skewed" so that it looks like it rotated around the y axis. This happens when I "center" or "straighten" the output with the fast panorama preview. (Undo is my friend here.)
Reply all
Reply to author
Forward
0 new messages