using artificial imagery for augmented panoramas

42 views
Skip to first unread message

kfj

unread,
Dec 2, 2011, 4:02:35 AM12/2/11
to hugin and other free panoramic software
I have an idea and I'd like some echo on it. Consider this:

If you have used Google Earth in a more than casual fashion, you may
have noticed that you can use it to 'land' on any place it covers and
'look around' - it presents you with a virtual panorama of your
landing place. This technology is easily accessible via Google Earth,
but they aren't the only ones providing these services. You can, for
example, use free data and methods available from or via viewfinder
panoramas:

http://www.viewfinderpanoramas.org/

This brilliant website and their elevation data (which I know because
I also do a bit of GIS and use their DEM for contour lines) makes it
possible to calculate virtual panoramas as well. The DEM data are
based on SRTM data (which cover the whole globe and are free) - but
they are augmented in areas which interst Jonathan de Ferranti who
runs the website, and I think his licensing terms would make it
possible to use the data in a free project like hugin.

My idea is to extract the location from an image set's geotag, feed it
into a bit of software to calculate the virtual panorama and then
insert the virtual panorama into the 'real' panorama.

Just a few clicks onwards, you could 'pin' a few mountaintops to their
virtual equivalents, and there you go: your horizon should be
perfectly level and your image altogether as close to nature as
possible.

Go one step further and generate the virtual panorama with a bit of
augmentation: names of prominent peaks spring to mind, hovering over
the peaks in the sky. Let them hover on a transparent background, make
the 'land' below also transparent and add the names layer to the
panorama: there you go, homemade AR. Or have it alongside the panorama
as it's 'legend'.

A more advanced use would be to automatically know where the sky is
and remove CPs from the sky rather than having to rely on celeste,
which isn't totally reliable and takes a good while to run.

There is free software around for the virtual panorama creation, but
it's a bit awkward to use. Nevertheless, writing the mashup code to
automatically create the panorama from the given geotag (and date and
time info to get the lighting right) shouldn't be too hard - if all
else failed, one could use povRay on the raw data. Finally, the code
could be put into a python plugin to make the addition of the
artificial panorama a matter of clicking with the mouse.

I'd dub the technology 'augmented panorama'.

Comments welcome. Might be a fun project to play around with :)

Kay

Carl von Einem

unread,
Dec 2, 2011, 4:45:46 AM12/2/11
to hugi...@googlegroups.com
Do you know <http://udeuschle.de/Panoramen.html>?

kfj schrieb am 02.12.11 10:02:

kfj

unread,
Dec 2, 2011, 7:03:15 AM12/2/11
to hugin and other free panoramic software

On 2 Dez., 10:45, Carl von Einem <c...@einem.net> wrote:
> Do you know <http://udeuschle.de/Panoramen.html>?

Thanks! That's just the type of data I meant. They're using the Alps
1' data from viewfinderpanoramas.org.

This service makes it really easy to calculate the panorama, and it
demonstrates the feasibility of my proposition - it even does the
augmentation with the peak names! I had it make a panorama from a Peak
I've made a panorama from myself - now I just have to get the data out
in TIFF or JPEG to put it into my own panorama and see how well I've
done - straight from the website it's HTML and consists of lots of
idividual parts.

Kay

Carl von Einem

unread,
Dec 2, 2011, 7:15:00 AM12/2/11
to hugi...@googlegroups.com
I also tried it with a mountain panorama I did this summer where I
recorded height and GPS coordinates. It even shows a horizon which could
help a lot to straighten panoramas!

Carl

kfj schrieb am 02.12.11 13:03:

kfj

unread,
Dec 2, 2011, 10:27:40 AM12/2/11
to hugin and other free panoramic software
On 2 Dez., 13:15, Carl von Einem <c...@einem.net> wrote:

> I also tried it with a mountain panorama I did this summer where I
> recorded height and GPS coordinates. It even shows a horizon which could
> help a lot to straighten panoramas!

So did I - and I routinely carry a GPS these days, so my last two
year's worth of panoramas are all geotagged and I could doublecheck
and augment them :)

I wrote to the guy running the website if he could think of an easy
way to get the data as TIFF or JPEG so it would be convenient to pull
into a panorama.

Kay

kfj

unread,
Dec 2, 2011, 12:30:25 PM12/2/11
to hugin and other free panoramic software

On 2 Dez., 16:27, kfj <_...@yahoo.com> wrote:

> I wrote to the guy running the website if he could think of an easy
> way to get the data as TIFF or JPEG so it would be convenient to pull
> into a panorama.

I did a proof of concept: I took the GIFs and put them together into
one picture (used nip2), then put that into hugin (as 360° hfov
cylindrical, a guess, equirect made little difference), plus one of my
360X180s spherical from the 'same spot'. Added 8 CPs and otimized for
e in the artificial image (it's horizon isn't in the middle) and for
y,p,r in the 360X180. It optimized fine considering the not-too-
precise rendition of the closer-by features in the artificial image
(came to 7 mean distance, the images being 6000X3000 and 7200X3600,
respectively) and came up with a pitch of 1.4 for my 360X180, so I
suppose that's by how much I must have been off true horizon. The fit
is quite convincing (layered them in gimp to check), and the better
the further away the peak is.

Kay

JohnPW

unread,
Dec 2, 2011, 5:57:07 PM12/2/11
to hugin and other free panoramic software
Interesting idea.
I made a panorama from the Mt Baldy Colorado images. Unfortunately he
hasn't made one for Mt. Evans CO, which is probably one of the the
most visited high peaks in the US (and one which I made a panorama
from.)

kfj

unread,
Dec 3, 2011, 4:52:44 AM12/3/11
to hugin and other free panoramic software
On 2 Dez., 23:57, JohnPW <johnpwatk...@gmail.com> wrote:

> Interesting idea.
> I made a panorama from the Mt Baldy Colorado images. Unfortunately he
> hasn't made one for Mt. Evans CO, which is probably one of the the
> most visited high peaks in the US (and one which I made a panorama
> from.)

The website which Carl has linked to only does Panoramas from the Alps
and Himalayas. I'm confident there are similar services for the rest
of the world.

I can now propose a work flow to integrate them into a hugin panorama:

First, in

http://www.google.com/url?sa=D&q=http://udeuschle.de/Panoramen.html&usg=AFQjCNGM_yZOw7tdbE4ekusI7Stwyycspw

you select your position and viewing angle (you can get the full
360°). Next you lower the vertical stretch to 1.0 to get an
undistorted image - there are other options as well which you may find
helpful.

Once the panorama is displayed in the browser, you need to use a
screen-capture tool to grab the whole URL (the image I got was 7200
pixels wide, so a mere screenshot won't do). The author of the website
recommended Fireshot, but on my Linux box that wasn't available, so I
went for 'snapshot pimp' which does the trick.

Once you have the image, you can feed it into hugin. It has some
additional information at the right margin, so it covers more than 360
degrees - in my case the webshot was 362.9 degree's worth, which hugin
accepted together with cylindrical projection (I guessed the
cylindrical).

Next I set the image crop to right=7200, to only use the 360°.

Finally I had to shift the image vertically (I came up with e=147.2)
to have the horizon precisely at the image center - but if the
panorama is correlated with real images and only e is optimized for
the artificial panorama, this works as well.

Now I could correlate peaks from the artificial panorama to peaks in
the real images, and I got a wonderfully level panorama.

Kay

kfj

unread,
Dec 3, 2011, 10:59:43 AM12/3/11
to hugin and other free panoramic software

On 3 Dez., 10:52, kfj <_...@yahoo.com> wrote:

> Now I could correlate peaks from the artificial panorama to peaks in
> the real images, and I got a wonderfully level panorama.

A curious footnote:

While I was working on this panorama, I stumbled into problems with
cpfind. When I ran it on the full image set, including the artificial
panorama with it's 362.9 hfov in cylindrical projection, cpfind
detected the feature points, then proceeded to use large amounts of
processing power and memory and finally failed with the infamous bad
allocation error. I presume it must have tried something silly, like
converting my cylindrical image to stereographic projection, and died
in the futile attempt to reach the complex equivalent of the south
pole...

So I excluded the artificial pano from CP detection. The panorama
wouldn't really align very well and I did a fair amount of fiddling.
Eventually I decided to run woa on it. Since at the time the
artificial image was active, woa swallowed it and worked it's usual
magic on it - it found all the intersections with real images,
reprojected them to a common format and ran cpfind on the resulting
reprojected images. And, to my surprise, it found plenty of CPs
between the real and the artificial images! Not just some, but really
hundreds! And they weren't false positives but mostly real, good CPs.

One optimizer run onwards my fit was near-perfect, including the
artificial image. It seems the rendering of the artificial image was
so good that CPfind could match real images with it. I'll have to have
a good hard look at the parameters of cpfind to figure out what
options may make it detect CPs with the images unmodified...

Kay

JohnPW

unread,
Dec 3, 2011, 6:26:02 PM12/3/11
to hugin and other free panoramic software
In looking for a similar website that covers north America, I came
across this:
http://panoramascope.com/index.html
Looked pretty interesting to me.

JohnPW

unread,
Dec 3, 2011, 7:42:12 PM12/3/11
to hugin and other free panoramic software
Reading the reviews, it looks like it may not work very well.

On Dec 3, 5:26 pm, JohnPW <johnpwatk...@gmail.com> wrote:
> In looking for a similar website that covers north America, I came
> across this:http://panoramascope.com/index.html
> Looked pretty interesting to me.

Has anyone been able to find a similarly easy to use and high quality
website to

http://www.viewfinderpanoramas.org/

that covers the US? Everything I found is really more of a tool for
cartographers or is a paid service.
Just curious.

--John

Reply all
Reply to author
Forward
0 new messages