Taking
Panoramic Pictures for Clearview 4.35
(9
APRIL 2006)
Othman
Ahmad
Introduction.
This tutorial is designed for those who are
already familiar with RC simulation, 360 degree panoramic pictures and basic
graphic editing.
However softwares mentioned in this tutorial
can lead to more tutorials on the foundations of the above topics. Help files
are also most helpful.
This tutorial is not only for beginners, but
also for myself. I tend to forget what I did after a few months, let alone
years.
Step
1: Taking Pictures.
a) Camera height.
Preferably, use a tripod such that the lens is
at a height of exactly 1.8 meter, based on my experiments with Clearview 4.35
using the new freeflight mode where coordinates and distances are shown.
http://www.rcflightsim.com/sceneries.html
To get a working photo scenery, it is not
necessary to go to this length. I used 1.3 meter as my camera height, but my
tripod can only support 1.4 meter.
Use this formula to have an estimate of the
error resulting in using different camera height compared to what Clearview
expects.
Actual distance= Actual Lens Height / Clearview
Camera Height(1.5m) * Clearview distance.
It may not even be necessary to use a tripod
but I’ve not tested this. Just make sure the photographer sets the cameras
perfectly horizontally and ensure that the centre of the focus for the lens
remain fixed or at least do not move so much.
b) Camera location.
The first picture taken will be the centre of
the panoramic picture, and coordinate 0,0,0 in Clearview, i.e. the position of
the viewer of the RC Sim. You cannot move from this position.
So choose a place where the RC Pilot is
located, not the place where the RC models will start. A mistake that I made in
my first attempt.
c) Overlapping
pictures.
Take a series of photographs that overlap by at
least 10% but preferably with distinct similar features between them. However
when the scene is so similar, autostich will fail to rearrange the pictures and
spoil the rest of the scenes, by overlapping with the other scenes. This occur
more obviously when the scale is low, i.e. 10%.
http://www.cs.ubc.ca/~mbrown/autostitch/autostitch.html
The most productive and giving the least
problem will be 30% overlap but I don’t really follow this rule.
With my camera with equivalent focal length of
54mm, i.e. 36 degree field of view, I take about 130 pictures for a full 360
degree by 180 degree pano picture, i.e. more than 12(30 degree) horizontally,
and more than 10 (18 degree) vertically, with my camera in the landscape mode.
The formula is useful in calculating field of
view which is important when viewing the completed panoramic picture using
Wenzel’s viewer distributed with hugin.
C4 is frame/film size( such as 35mm)
B4 is the focal length of the lens.
(2*ATAN(C4/(B4*2))/PI())*180
d) Potential problems.
i. Parallex error:
Due to the non-use of special panoramic head, there
is a possibility of parallex error but this is not obvious in my experience
with just ordinary tripod stand. Problems in stiching using autostich is solved
by using 100% scale and taking out a few pictures that cannot be rearranged.
ii. Moving objects:
This appear as ghosts in the final stiched
panoramic picture.
Step
2: Stiching the photos together
a) Automatic stiching.
My preferable method is to use autostich. I
tried hugin and panowizard but they are too troublesome and I discovered
autostich first.
I preferred to work out the problems with
autostich than learning how to use other software that also have problems.
Problems with autostich:
i) Does not produce 2:1 panoramic picture but
will produce pictures that is perspectively correct. Must use graphic editing
software to change “canvas size” to the right dimension for the viewer and
Clearview.
This is mostly due to problems with the
sky/ceiling shots. Ground shots are not so troublesome.
Panowizard on the other hand, will produce 2:1
picture that can be viewed. I’ve not tested hugin to the end because it is more
difficult to produce a final result compared to Panowizard.
http://www.egelberg.se/panowizard/
Panowizard comes complete with all software
necessary to stich photos conveniently(automatically) but does not have a pano
viewer.
Hugin does not have autopano that can create
control points automatically, but comes with a good pano viewer.
ii) Smudged pictures due to unplaced pictures
placed on top of good pictures. This situation is worse for low scale so try to
stich at 100% scale for better results. Also made worse by too many similar
photos overlapping over each other. Move to another folder pictures that are
not necessary and have too much overlap.
b) Manual stiching.
Autostich does not allow any manual
intervention apart from setting its settings. Hugin and panowizard allows
manual control. For beginners, I recommend installing panowizard but download
also hugin for its pano viewer and somewhat better manual control.
c)
Hardware requirements.
My hardware consists of
Processor: Hyperthreading Pentium IV 2.8Ghz
(Based on the performance indicator, this is
sufficient because processor usage is not all the time 100%)
Motherboard: FSB 800 Mhz
RAM: Dual Channel DDR400 512Mbyte just upgraded to 1.5Gbyte.
(When I still had 512Mbyte, I had to set the
resource to just 0.25 to avoid crashing autostich. When upgraded to 1.5Gbyte, I can set the
hardware to 1.0 but speed improvement is minor.
This could be true only for 2Mpixel pictures
resulting in output resolution of 14000x7000, which is more than adequate for
Clearview highest resolution of 8160x4080.
Of course I’ve other projects, I intend to use
my new Sony 6Mpixel camera to take beautiful pictures around our places, but
this is irrelevant to this tutorial.)
Hardisk: Dual Maxtor Diamond Max 8 SATA in a
RAID configuration
Display: 256Mbyte Radeon 9550 AGP 8X
(Should be irrelevant to stiching panoramic
pictures)
Despite these configurations, it took about 4
hours to stich 140 photos of 2Mpixel resolution at scale 100%, with 512Mbyte RAM, and about 2.5 hours for
1.5Gbyte RAM.
Step
3: Image Editing.
You can use Gimp 2 or Adobe Photoshop to edit
the stiched panoramic picture.
a) Adjusting size.
Canvas size must be adjusted to the correct 2:1
ratio. When changing canvas size, make sure the orientation of the original is
correct. Don’t chage the image resolution yet before the editing is finished.
This is where the taking of 360 degree by 180
degree pano is a better choice. The ground plane should be correct if the
tripod stand can be viewed correctly. This means that the bottom part is
correct. Usually the top part, i.e. the sky/ceiling, which are missing, so
anchor your pano picture at the bottom.
When filling the missing parts because the
canvas size is now bigger, you can choose to fill it with a single colour that
matches the edge of the sky or ceiling. Use the colour picker and fill
functions to achieve this.
b) Adjusting the
image.
It is not recommended to use normal graphic
editors to do the adjustments. Even with “panorama tools” plugin for Gimp and
Photoshop, it is difficult to achieve
the correct panoramic perspective.
http://panotools.sourceforge.net/
http://www.path.unimelb.edu.au/~dersch/PanoTools.zip
For simple photographic scenery importation,
limit the editing to just:
a) colour fills,
b) rotation,
c) offset up or down in order to adjust the horizon
to make it somewhat useable and the scaling error not too obvious.
Camera must be perfectly horizontal and at a certain height
above the ground(sea level), and rotate perfectly horizontally.
nombor of pixels below the centre of a 2:1 360 degree panoramic picture=
(arctan((actual distance of horizon)/(distance of camera height))) * (total
number of pixels vertically).
For example, we have a panoramic picture at 14700x7000 pixels which I tend to
get with my 2Mpixel photos.
First adjust the canvas to 14700x7350, and fill the space with a colour.
Try to adjust the horizon to roughly at the centre, and fill the space with the
nearest colour of the current sky.
Pick the colour of the current sky, and use it as the filler colour when
changing the size of the canvas. The ground will also be coloured the same way
as the sky, but this is not bad because it is not clearly visible when we are
flying RC planes.
It is the sky that is bothersome. The panoramic picture of tanjung aru that I
offered to the internet uses a greyish colour for the sky because when I took
the picture, it was cloudy.
(I shall take another picture when it is sunny at the correct camera height for
Clearview, i.e. 1.5m (or 1.6m as recommended by Stefan).)
Now try to make sure that the horizon is at that number of pixels below the
centre of the panorama.
If the horizon is at 20 km, and camera height is 1.3m, the approximate arctan
is 1.3/20000, so the number of pixels below the centre is 4.7 or the nearest,
i.e. 5 pixels below the centre.
This does not appear to be right. Need to check on the exact distance of the
horizon at Tg. Aru.
In a room, the joint between floor and wall is the horizon.
In my living room, the horizon can be 3m and camera height 0.4m.
The number of pixels below the centre of the picture should be:
arctan(0.4/3) * 7035 = 1451
This is only valid at the location right at the centre of the panoramic photo.
Because my camera is not rotated at an exact plane, the boundary does not
follow the wall.
To slightly correct for this, we need to rotate the whole panoramic photo until
we can get a reasonable boundary around the walls.
Better use Wenzel's viewer in adjusting these boundaries because it has lines
representing the boundaries, unlike Clearview and much faster because it is
just a viewer not an RC sim.
c) Image size
adjustments.
Adjust image size to 8160 x 4080 and save it to
the desired JPEG compression ratio.
Step
4: Importing Scenery.
a) Importing.
Import from Clearview at the Settings menu.
Cannot control RC models while scenery is being imported.
Output scenery folder is at:
D:\Program
Files\SVKSystems\ClearView\landscapes
Where the folder name is the name of the
original panoramic photo file.
b) Configuring
Landscape parameters.
A sample of Clearview scenery
set-up parameters stored in landscape-params.txt file:
gymX1 -40.0
gymX2 34.0
gymY1 -1.0
gymY2 9.5
gymZ1 -52.0
gymZ2 8.6
initModelPos 2.0 0.02 -5.0
initModelRot 0.0 2.5132742 0.0
1. Coordinates are written as X,Y,Z as used in parameter "initModePos".
2. When the program starts, we are put at the camera position of the panoramic
picture.
3. The default initial viewing angle is in the Z direction in the front and back , X direction to the right and left, Y direction upwards, a few feet above the ground. Not sure what the viewing height is but it could be extracted from the panoramic picture.
4. “initModelRot” is the rotation in degrees, about the X, Y, Z axes.
My preferred parameters are:
initModelPos 0.0 0.0 1.5
initModelRot 0.0 90.0 0.0
This means that my model will move in the
direction that I take the first photo of the series of photos of the whole
panoramic scene, just in front of myself.
Conclusion.
I am already satisfied with the quality of
photo sceneries that I can get at the moment. Although I have intentions to
find out more about editing panoramic pictures, this topic is just too
difficult at the moment for me to give good tutorials. In order to allow many
other Clearview users to quickly develop photo sceneries for their localities,
these techniques should be sufficient for most users.
New versions of this tutorial may be edited
based on the developments of Clearview. Stefan is so busy, he cannot even
afford the time to write a complete manual to describe how to prepare panoramic
pictures for Clearview in sufficient details for people like myself. This
tutorial is an attempt to prepare the manual before the official manual is
released.
Hopefully, this tutorial should save lots of
time for beginners to photo sceneries in general. In fact, many techniques are
also applicable to Reflex(verified to be just by changing file name and canvas
size to 8160x3060), and Realflight G3(by using the import command, probably
changing the canvas size to 8160x3060).