Some nice big mosaics

296 views
Skip to first unread message

Tom Sharpless

unread,
Jan 12, 2012, 12:50:43 PM1/12/12
to PTGui Support
I've been happily making high resolution mosaics of wall paintings
with Hugin. There is a page of them at
http://tksharpless.net/PhillyMurals/.

They were shot with 15mm, 24mm, and 35mm lenses on APS-C format
cameras, from multiple positions about equidistant from the wall,
using a pole to get a good high point of view. In almost all cases
there were poles and wires in front of the pictures. I have been able
to 'vanish' most of them just by masking before blending, but in a few
cases I have resorted to hand painting in Photoshop.

I'm quite pleased with Hugin's ability to do this, which PTGui cannot.

Cheers, Tom

PTGui Support

unread,
Jan 12, 2012, 1:49:38 PM1/12/12
to pt...@googlegroups.com
Hi Tom,

PTGui has had viewpoint correction for several years already:
http://www.ptgui.com/examples/vptutorial.html

Joost

Tom Sharpless

unread,
Jan 12, 2012, 2:54:31 PM1/12/12
to PTGui Support
Hi Joost

On Jan 12, 1:49 pm, PTGui Support <supp...@ptgui.com> wrote:
> Hi Tom,
>
> PTGui has had viewpoint correction for several years already:http://www.ptgui.com/examples/vptutorial.html
>
> Joost
>

Yes, I know that. But it seems something more is needed for practical
stitching of flat mosaics. When I try to align a big mosaic with
PTGui, it gives a seamless but always slightly bulging image, like a
full-frame fisheye. And it still has to be given a bogus long focal
length, while Hugin works correctly with the true FL. I know the Hugin
team had to do some rethinking of the PT camera model to get good
mosaic results; for a while I believe it had an explicit 'mosaic mode'
but now it seems fully integrated.

I may just be overlooking something, but at present I cannot stitch
big mosaics with PTG and I can with Hugin.

Regards, Tom

Joergen Geerds

unread,
Jan 12, 2012, 4:18:17 PM1/12/12
to pt...@googlegroups.com
that is true, bogus focal lengths are the only way to convince ptgui to produce something reasonable with mosaics, together with pre-established lens parameters... on a recent project I started with 600mm, and ptgui "optimized" it down through a stream of complicated step-by-step optimizations to 300mm-ish (it was taken with a 60mm lens originally). a more reasonable "mosaic mode" would have helped... after a while I got it together, but it was really shoehorning it...

PTGui Support

unread,
Jan 13, 2012, 2:23:58 AM1/13/12
to pt...@googlegroups.com
Hi Tom,

Probably you just need to disable lens distortion correction and don't
optimize the focal length to get the same result. At least PTGui should
be capable of exactly the same projection through viewpoint correction.

A dedicated mosaic mode (which would lock the above settings) might be
an idea but this will probably raise new questions and expectations by
people attempting to stitch unstitchable images with lots of parallax.
To properly stitch mosaics one should be aware of the effects of
parallax (and obviously you are).

Joost

Tom Sharpless

unread,
Jan 14, 2012, 12:28:15 PM1/14/12
to PTGui Support
Joost,

I think that if you have to disable lens correction, you are doing
something wrong. Undoing the lens projection is the basis for all
panoramic work and disabling that should not be an option.

Based on my experience, I would agree that stitching mosaics is not
automatable at this time, so you are quite right not to want to offer
a "mosaic mode". But I'd appreciate your thinking about whether PTGui
could offer better support for those few expert users who would like
to make accurate mosaics.

Best, Tom

Erik Krause

unread,
Jan 14, 2012, 5:23:18 PM1/14/12
to pt...@googlegroups.com
Am 14.01.2012 18:28, schrieb Tom Sharpless:
> I think that if you have to disable lens correction, you are doing
> something wrong. Undoing the lens projection is the basis for all
> panoramic work and disabling that should not be an option.

I'm sure Joost meant to disable optimization for lens correction, not
lens correction as such. It should be obvious that it might be hard or
impossible to determine lens correction parameters from a mosaic. But of
course you can and should use lens correction parameters and FoV from a
previous calibration.

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

Erik Krause

unread,
Jan 14, 2012, 5:29:42 PM1/14/12
to pt...@googlegroups.com
Am 13.01.2012 08:23, schrieb PTGui Support:

> Probably you just need to disable lens distortion correction and don't
> optimize the focal length to get the same result. At least PTGui should
> be capable of exactly the same projection through viewpoint correction.

Probably not. Since Straight Line control points don't work together
with viewpoint correction, it might be difficult to get a straight
mosaic this way. Vertical and horizontal control points might be of
little help either, since they work differently with PTGui optimizer
than in classical panotools...

erik leeman

unread,
Jan 15, 2012, 7:06:13 AM1/15/12
to PTGui Support


Guys, I think you are trying to use the wrong kind of tool for this.
Instead, may I suggest you look for a photogrammetric tool capable of
orthophoto export.
Archeologists use that method for, let's say, 20+ meter long
petroglyphs, architects use it to capture the facades of entire
streets.
These programs can automatically reconstruct all camera poitions, and
then generate an extremely accurate 3D model of your subject.
They can subsequently make a perfect flat projection of that 3D model
without any (unwanted) geometric distortion.
You'll be absolutely amazed what those programs can do these days!

Erik Leeman

Joergen Geerds

unread,
Jan 15, 2012, 9:02:23 AM1/15/12
to pt...@googlegroups.com
On Sunday, January 15, 2012 7:06:13 AM UTC-5, erik leeman wrote:
Instead, may I suggest you look for a photogrammetric tool capable of
orthophoto export.
These programs can automatically reconstruct all camera poitions, and
then generate an extremely accurate 3D model of your subject.
They can subsequently make a perfect flat projection of that 3D model
without any (unwanted) geometric distortion.

Do you have some links/names/examples of those tools&applications? 

Erik Krause

unread,
Jan 15, 2012, 9:44:53 AM1/15/12
to pt...@googlegroups.com
Am 15.01.2012 15:02, schrieb Joergen Geerds:
>
> Do you have some links/names/examples of those tools&applications?

...and prices...

Taken from http://www.pvts.net/pdfs/ortho/photosftw_purch.pdf
"Given the complexity of this type of software, and a price tag that
runs between $5,000 and $70,000, prospective users of photogrammetry
software are advised to research all of the options out there."

erik leeman

unread,
Jan 15, 2012, 10:27:16 AM1/15/12
to PTGui Support
Exactly! So I don't think we should expect Joost to do it 'just like
that'.

There are some open source initiatives for cultural heritage
documentation (= non-profit) applications though.
Like for instance:
http://www.tapenade.gamsau.archi.fr/TAPEnADe/Home.html
http://www.micmac.ign.fr/

Also there is Photomodeler Scanner (about 2600.- US$)
http://www.photomodeler.com/
and AgiSoft PhotoScan Professional (3500,- US$)
http://www.agisoft.ru/products/photoscan/professional/

But I really know nothing about their orthophoto-capabilities, I only
have the (absolutely wonderful and dirt-cheap!) AgiSoft PhotoScan
Standard.
You'll have to do some research for yourself for low-cost
alternatives.

Cheers!

Erik Leeman

On Jan 15, 3:44 pm, Erik Krause wrote:
> Am 15.01.2012 15:02, schrieb Joergen Geerds:
>
>
>
> > Do you have some links/names/examples of those tools&applications?
>
> ...and prices...
>
> Taken fromhttp://www.pvts.net/pdfs/ortho/photosftw_purch.pdf

Erik Krause

unread,
Jan 15, 2012, 10:47:52 AM1/15/12
to pt...@googlegroups.com
Am 15.01.2012 16:27, schrieb erik leeman:
> You'll have to do some research for yourself for low-cost
> alternatives.

What about 123D Catch?

erik leeman

unread,
Jan 15, 2012, 11:06:15 AM1/15/12
to PTGui Support
Don't think it features orthophoto export.
Besides, it's a beta (cloud) program with very limited resolution
possibilities.

When thinking about 123D Catch, PhotoSynthToolkit comes to mind:
http://www.visual-experiments.com/demos/photosynthtoolkit/

or SFMToolkit
http://www.visual-experiments.com/demos/sfmtoolkit/

But again, no orthophoto as far as I know.

Erik Leeman

PTGui Support

unread,
Jan 16, 2012, 5:30:43 AM1/16/12
to pt...@googlegroups.com
Hi Tom,

If you could make your images available I'd like to take a look. As long
as the subject is flat stitching should be feasible.

Joost

Tom Sharpless

unread,
Jan 16, 2012, 11:04:45 AM1/16/12
to PTGui Support
Hi All

Agree that we don't need photogrammetry s/w. My point is just that
with PTGui I am not able to get a satisfactory mosaic, while with
Hugin I can.

I don't optimize lens parameters until the mosaic is already very well
aligned. So I don't think that is the problem.

I have archived an example image set with Hugin and PTGui projects;
but it is 86 MB. How would you like to get this?

-- Tom

Bjørn K Nilssen

unread,
Jan 16, 2012, 11:36:25 AM1/16/12
to pt...@googlegroups.com
Pᅵ Mon, 16 Jan 2012 17:04:45 +0100, skrev Tom Sharpless <tksha...@gmail.com>:

> Hi All
>
> Agree that we don't need photogrammetry s/w. My point is just that
> with PTGui I am not able to get a satisfactory mosaic, while with
> Hugin I can.

Although I use phtotogrammetry tools a lot I agree that they are not the right tool for mosaic stitching.
In theory I guess PTgui should be able to do the job, but in my tests I have never been able to avoid tapering at the ends.

What I would love to see is a tool that could handle flat, mosaic type stitching,
as well as "inverse cylindrical mapping" - in lack of a berter word...
With this I mean that you could make slit scan type "mosaics. Like if you have a cylindrical tower that you want to "unfold".
Or any other curved wall as well.

--
Bjï¿œrn K Nilssen - b...@bknilssen.no - 3D and panoramas

PTGui Support

unread,
Jan 16, 2012, 12:52:11 PM1/16/12
to pt...@googlegroups.com
Hi Tim,

Can you upload the file to your website or to a file sharing site (for
example http://get.tt)? Then post the link here, or if you don't want to
share the files send it to sup...@ptgui.com .

Joost

Erik Krause

unread,
Jan 16, 2012, 2:17:57 PM1/16/12
to pt...@googlegroups.com
Am 16.01.2012 18:52, schrieb PTGui Support:
> Then post the link here, or if you don't want to
> share the files send it tosu...@ptgui.com .

Please share them! I'd like to try as well...

Michel Thoby

unread,
Jan 16, 2012, 2:36:02 PM1/16/12
to pt...@googlegroups.com
Eh Tim,

Hi Tim,

Can you upload the file to your website or to a file sharing site (for example http://get.tt)? Then post the link here, or if you don't want to share the files send it to sup...@ptgui.com .

Joost
Le 16 janv. 2012 à 20:17, Erik Krause a écrit :

Am 16.01.2012 18:52, schrieb PTGui Support:
Then post the link here, or if you don't want to
share the files send it tosu...@ptgui.com  .

Please share them! I'd like to try as well...

+1

Michel

Tom Sharpless

unread,
Jan 17, 2012, 10:41:52 PM1/17/12
to PTGui Support
OK the mosaic example is in a public ftp area on my website. Follow
this link
ftp://tksftp:TKS...@tksharpless.net then download directory mosaic-
sample.
This area allows only one ftp session at a time, so try again if you
are refused access.

Some details: focal length 35mm (Leica); crop factor 1.6 (Sony
NEX-5N); viewpoints roughly 30 feet from wall and roughly 8 feet
apart.

-- Tom

On Jan 16, 2:36 pm, Michel Thoby <thobymic...@wanadoo.fr> wrote:
> Eh Tim,
>
> > Hi Tim,
>
> > Can you upload the file to your website or to a file sharing site (for examplehttp://get.tt)?Then post the link here, or if you don't want to share the files send it to supp...@ptgui.com .
>
> > Joost
>
> Le 16 janv. 2012 à 20:17, Erik Krause a écrit :
>
> > Am 16.01.2012 18:52, schrieb PTGui Support:
> >> Then post the link here, or if you don't want to
> >> share the files send it tosupp...@ptgui.com  .

Tom Sharpless

unread,
Jan 17, 2012, 10:47:05 PM1/17/12
to PTGui Support
DRAT! Google has killed the link by trying to hide the password. So
you will have to enter it yourself....
user: tksftp
password: TKSpwd1
host: tksharpless.net

On Jan 17, 10:41 pm, Tom Sharpless <tksharpl...@gmail.com> wrote:
> OK the mosaic example is in a public ftp area on my website.  Follow
> this link
> ftp://tksftp:TKSp...@tksharpless.net then download directory mosaic-
> sample.
> This area allows only one ftp session at a time, so try again if you
> are refused access.
>
> Some details: focal length 35mm (Leica); crop factor 1.6 (Sony
> NEX-5N); viewpoints roughly 30 feet from wall and roughly 8 feet
> apart.
>
> -- Tom
>
> On Jan 16, 2:36 pm, Michel Thoby <thobymic...@wanadoo.fr> wrote:
>
>
>
>
>
>
>
> > Eh Tim,
>
> > > Hi Tim,
>
> > > Can you upload the file to your website or to a file sharing site (for examplehttp://get.tt)?Thenpost the link here, or if you don't want to share the files send it to supp...@ptgui.com .

John Houghton

unread,
Jan 18, 2012, 4:11:16 AM1/18/12
to PTGui Support
Tom, Thanks for posting the sample images. I found it far from
straightforward to get a good stitch with PTGui. The t1/t2 points
didn't seem to work their usual magic when used with viewpoint
correction. Anyway, this is what I ended up with. I expect it could
be improved with a liitle more work:

http://www.johnhpanos.com/TKS.jpg

John

On Jan 18, 3:47 am, Tom Sharpless <tksharpl...@gmail.com> wrote:
> DRAT!  Google has killed the link by trying to hide the password.  So
> you will have to enter it yourself....
> user: tksftp
> password: TKSpwd1
> host: tksharpless.net
>
> On Jan 17, 10:41 pm, Tom Sharpless <tksharpl...@gmail.com> wrote:
>
>
>
> > OK the mosaic example is in a public ftp area on my website.  Follow
> > this link
> > ftp://tksftp:TKSp...@tksharpless.net then download directory mosaic-
> > sample.
> > This area allows only one ftp session at a time, so try again if you
> > are refused access.
>
> > Some details: focal length 35mm (Leica); crop factor 1.6 (Sony
> > NEX-5N); viewpoints roughly 30 feet from wall and roughly 8 feet
> > apart.
>
> > -- Tom
>
> > On Jan 16, 2:36 pm, Michel Thoby <thobymic...@wanadoo.fr> wrote:
>
> > > Eh Tim,
>
> > > > Hi Tim,
>
> > > > Can you upload the file to your website or to a file sharing site (for examplehttp://get.tt)?Thenpostthe link here, or if you don't want to share the files send it to supp...@ptgui.com .
>
> > > > Joost
>
> > > Le 16 janv. 2012 à 20:17, Erik Krause a écrit :
>
> > > > Am 16.01.2012 18:52, schrieb PTGui Support:
> > > >> Then post the link here, or if you don't want to
> > > >> share the files send it tosupp...@ptgui.com  .
>
> > > > Please share them! I'd like to try as well...
>
> > > +1
>
> > > Michel- Hide quoted text -
>
> - Show quoted text -

PTGui Support

unread,
Jan 18, 2012, 6:31:19 AM1/18/12
to pt...@googlegroups.com
And here's my attempt. JPEG and pts files are here:

http://ge.tt/86p0zRC

Of course it can be retouched a bit further. After some trial and error
I found this worked best:

Take an image at the center as a reference image, I used image 4. Set
the yaw and pitch of all images to zero. And don't optimize yaw and
pitch for all but the reference image, so that we only use viewpoint
correction and not the regular yaw/pitch transform. I guess this may in
fact be what the mosaic mode in hugin does. Optimize viewpoint for all
images except the reference image. Don't optimize the field of view.

See the Optimizer tab of my project file for my settings.

Then drag the panorama around in the panorama editor until the sides of
the image are horizontal and vertical, then place yellow crop lines
around it.

Joost

On 18-1-2012 4:47, Tom Sharpless wrote:
> DRAT! Google has killed the link by trying to hide the password. So
> you will have to enter it yourself....
> user: tksftp
> password: TKSpwd1
> host: tksharpless.net
>
> On Jan 17, 10:41 pm, Tom Sharpless<tksharpl...@gmail.com> wrote:
>> OK the mosaic example is in a public ftp area on my website. Follow
>> this link
>> ftp://tksftp:TKSp...@tksharpless.net then download directory mosaic-
>> sample.
>> This area allows only one ftp session at a time, so try again if you
>> are refused access.
>>
>> Some details: focal length 35mm (Leica); crop factor 1.6 (Sony
>> NEX-5N); viewpoints roughly 30 feet from wall and roughly 8 feet
>> apart.
>>
>> -- Tom
>>
>> On Jan 16, 2:36 pm, Michel Thoby<thobymic...@wanadoo.fr> wrote:
>>
>>
>>
>>
>>
>>
>>
>>> Eh Tim,
>>
>>>> Hi Tim,
>>
>>>> Can you upload the file to your website or to a file sharing site (for examplehttp://get.tt)?Thenpost the link here, or if you don't want to share the files send it to supp...@ptgui.com .
>>
>>>> Joost
>>

>>> Le 16 janv. 2012 � 20:17, Erik Krause a �crit :

Tom Sharpless

unread,
Jan 18, 2012, 10:03:34 AM1/18/12
to PTGui Support
Thanks John, thanks Joost,

for demonstrating that PTGui can indeed align mosaics right. Michel
Thoby has also done so with my sample but not posted here yet.

This shows the danger of generalizing from insufficient data. My
first two tries with PTGui (Dream Garden and this example) gave bulgy
images, with Hugin I got square ones, so have stitched all the others
with Hugin. But now I'll probably go back to PTGui as it is far
easier to use.

It is interesting that there does not seem to be any one right path to
a good alignment. For example my bulgy images squared up when I
simply enabled full lens optimization (Michel's path) whereas on
Joost's path one disallows lens optimization. Working with Hugin,
I've found it quite hard to predict when a mosaic will suddenly snap
into alignment -- the first tries usually look hopeless.

Of course it doesn't matter how you get a good result. What all this
shows, I think, is that a well aligned mosaic is a rather unstable
object, so far as the preset optimizer and parameter set is
concerned. I hope with experience we may learn to produce them more
reliably. Kolor may have taken a step in that direction: Michel tells
me that AutoPano giga aligned my sample automatically -- but the
building had concave edges!

Onward and Upward!

-- Tom
> >>>> Can you upload the file to your website or to a file sharing site (for examplehttp://get.tt)?Thenpostthe link here, or if you don't want to share the files send it to supp...@ptgui.com .

PTGui Support

unread,
Jan 18, 2012, 10:16:46 AM1/18/12
to pt...@googlegroups.com
Hi Tom,

On 18-1-2012 16:03, Tom Sharpless wrote:
> For example my bulgy images squared up when I
> simply enabled full lens optimization (Michel's path) whereas on
> Joost's path one disallows lens optimization.

I've only disabled FoV optimization. This is necessary because with
mosaics the optmizer gets no clues regarding the focal length (for this
it would need at least two images with different yaw or pitch). Lens
distortion (abc) is optimized though.

Joost

Tom Sharpless

unread,
Jan 18, 2012, 10:24:02 AM1/18/12
to PTGui Support
Having now looked at Joost's project, I must revise my recent remarks
a little.
It does optimize all lens parameters except fov. The FL is the
nominal 35mm, while with fov optimization allowed it goes to 45-47mm.
It does not optimize yaw or pitch, only roll for all images and
viewpoint for all but the central anchor image.
The CP error statistics are very good, and the alignment is visually
impressive.
Most remarkably, it does not use any straight line control points!

Bravo,

-- Tom
> > >>>> Can you upload the file to your website or to a file sharing site (for examplehttp://get.tt)?Thenpostthelink here, or if you don't want to share the files send it to supp...@ptgui.com .

John Houghton

unread,
Jan 18, 2012, 10:32:32 AM1/18/12
to PTGui Support
Joost, Using your project file, when I place a t2 point on the roof
line and t1 points on three good verticals, and then run the level
panorama option, I get:

http://www.johnhpanos.com/mural-joost-lev.jpg

This is the sort of result I was experiencing with my own project. Do
you have any idea why the panorama fails to level properly?

John
> >>>> Can you upload the file to your website or to a file sharing site (for examplehttp://get.tt)?Thenpostthe link here, or if you don't want to share the files send it to supp...@ptgui.com .
>
> >>>> Joost
>
> >>> Le 16 janv. 2012 20:17, Erik Krause a crit :
>
> >>>> Am 16.01.2012 18:52, schrieb PTGui Support:
> >>>>> Then post the link here, or if you don't want to
> >>>>> share the files send it tosupp...@ptgui.com  .
>
> >>>> Please share them! I'd like to try as well...
>
> >>> +1
>

PTGui Support

unread,
Jan 18, 2012, 10:42:57 AM1/18/12
to pt...@googlegroups.com
Hi John,

I noticed the same problem, will look into it.

Joost

Tom Sharpless

unread,
Jan 18, 2012, 11:01:57 AM1/18/12
to PTGui Support
I noticed lens shear was enabled in Joost's project, maybe that's the
problem.
-- Tom

Tom Sharpless

unread,
Jan 18, 2012, 11:04:54 AM1/18/12
to PTGui Support
This building really is higher at the left end, the ground slopes up
from left to right. The roof line is horizontal.
-- Tom

John Houghton

unread,
Jan 18, 2012, 2:36:47 PM1/18/12
to PTGui Support
On Jan 18, 3:24 pm, Tom Sharpless <tksharpl...@gmail.com> wrote:
> Having now looked at Joost's project, I must revise my recent remarks
> a little.....
> Most remarkably, it does not use any straight line control points!

It would be more remarkable if it did! The PTGui optimizer does not
support straight line control points (t3,t4...).

John

Tom Sharpless

unread,
Jan 18, 2012, 5:35:03 PM1/18/12
to PTGui Support
Still remarkable. Hugin absolutely needs straight line CPs to align a
long mosaic like this. How does PTGui know the roof line should be
dead straight?
--Tom

John Houghton

unread,
Jan 19, 2012, 3:18:10 AM1/19/12
to PTGui Support
On Jan 18, 10:35 pm, Tom Sharpless <tksharpl...@gmail.com> wrote:
> How does PTGui know the roof line should be dead straight?

PTGui doesn't know the roof line is straight. If the images are
accurately aligned with each other and the lens parameters are
correct, then the panorama image can be levelled manually by dragging
it about in the Panorama Editor window to get the verticals vertical
and roof line straight and horizontal. (The grid feature is an
invaluable aid when doing this). This is what Joost and I did.

When the optimizer supports optimizing the t1/t2/t3.... points in the
alignment process, these can assist the evaluation of the lens
parameters by informing the optimizer which features should be
straight/horizontal/vertical. This is not possible in PTGui's own
optimizer, as the t3/t4... points are not supported at all, and t1/t2
points are only used to level the whole panorama as a separate process
after the image alignment phase. If the lens parameters are already
accurately known from a calibration exercise, then these can be used
without further optimization, in which case only two control points
per image overlap are needed to accurately align the images with each
other. More will be needed for viewpoint correction, though, and many
more will be needed if the lens parameters are not known and do need
to be evaluated.

John

Jim Watters

unread,
Jan 19, 2012, 11:02:10 AM1/19/12
to pt...@googlegroups.com
On 2012-01-19 4:18 AM, John Houghton wrote:

> If the images are accurately aligned with each other and the lens parameters
> are correct, then the panorama image can be levelled manually by dragging it
> about in the Panorama Editor window to get the verticals vertical and roof
> line straight and horizontal. (The grid feature is an invaluable aid when
> doing this). This is what Joost and I did.
>

> [snip]the t3/t4... points are not supported at all, and t1/t2 points are only

> used to level the whole panorama as a separate process after the image
> alignment phase. If the lens parameters are already accurately known from a
> calibration exercise, then these can be used without further optimization, in
> which case only two control points per image overlap are needed to accurately
> align the images with each other. More will be needed for viewpoint
> correction, though, and many more will be needed if the lens parameters are
> not known and do need to be evaluated.
>
> John

Yes, two images can be alined with only two control points, but sometime a line
is the only thing connecting two images. And having that line show up crooked in
the final output is very obvious.


--
Jim Watters
http://photocreations.ca

Reply all
Reply to author
Forward
0 new messages