summaryrefslogtreecommitdiff
path: root/README
blob: 9a6c4695f4d27f0e1234a360d97fbc02b306909a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
======
gipfel
======

gipfel helps to find the names of mountains or points of interest
on a picture.
It uses a database containing names and GPS data. With the given viewpoint
(the point from which the picture was taken) and two known mountains
on the picture, gipfel can compute all parameters needed to compute the
positions of other mountains on the picture.
Additionally, gipfel can try to guess these parameter if only one mountain
is known on the picture. In this case, a few other peaks need to be marked,
but it is not necassary to know their names.
gipfel can also be used to play around with the parameters manually. But be
warned: It is pretty difficult to find the right parameters for a given
picture manually.


Requirements
============
- fltk-1.1.x (http://www.fltk.org)
- libtiff (http://www.remotesensing.org/libtiff/)
- libjpeg (http://www.ijg.org/)
- exif utility (http://libexif.sourceforge.net/)
- ccmath library (http://freshmeat.net/projects/ccmath/)
- gipfel works on UNIX-like system (e.g. Linux, *BSD and probably others)


Installation
============
- Unpack the tar file and run ./configure; make; make install


Running
=======

To start gipfel, enter 

gipfel <image>

where <image> is the actual picture in JPEG format.

You should now see a control window and the actual picture.
Additionally a "Choose Viewpoint" window should pop up, where you can search
for the viewpoint from which the picture was taken. Select a viewpoint and 
click "Ok".
You can now use the controls in the control window to modify the view
parameters. These are:
- View direction
- Nick angle
- Tilt angle
- Scale 
- Visibility

Play around with these parameters, until you see the names of one or two 
mountains, which you already recognize on the picture.
Now click on the small cross at the left of the name to mark it and drag
them to the position of the mountain on the picture.
The marked mountains should have a red flag.
If you have positioned two mountains, you can now click on the "comp" button
in the control window. 
If you have only marked one mountain, you need to mark other peaks on the 
picture using the green flags which you find at the center of the picture.
Make sure, that the one marked mountain has a red flag containing a "1" if 
it has a "2" in its flag, just keep clicking on it until it changes to a "1".
Then click on the "guess" button. If the result is disapointing, try to adjust
the visibility parameter as only visible mountains are taken into account
during the "guess"-process.

You may also want to have a look at the screen video at
http://www.ecademix.com/JohannesHofmann/gipfel.avi
for an example session.


The Data File
=============
As stated before, gipfel needs GPS input data. The input data must be
an ASCII file with one line per mountain / point of interest.
Each line must contain the following values separated by a comma:

<SHORTNAME>,<NAME>,<DESCRIPTION>,<LATITUDE>,<LONGITUDE>,<HEIGHT>

<SHORTNAME> and <DESCRIPTION> may be left empty.

The following line is a valid example:
SMTSBG,Simetsberg,,47.56617,11.25358,1836

Fortunately, there is a great website http://www.alpin-koordinaten.de, where
you can download a suitable file containg quite a lot of data mostly 
concerning the alps:
Click on the "Suchen" button and the click on the diskette symbol below
the first table then select "Fugawi 3 TXT" format and click on "Download".

Obviously you can easily add your own entries to the data file or add them
to the database at http://www.alpin-koordinaten.de.

Thanks to the kind permission of the owners of www.alpin-koordinaten.de, the 
standard gipfel tarball now includes a default datafile generated by 
www.alpin-koordinaten.de


GPS Tracks
==========

Once you have determined the right parameters using the procedure described
above, you can load GPS tracks and display them on the picture. Use the
File->Load Track menu item. GPS tracks should be text files containing
one line per waypoint. Each line should be of the form:

<LATITUDE>,<LONGITUDE>,<HEIGHT>

GPS tracks are displayed with variable width depending on the distance 
of the way points from the current view point and the scale value. 
You can also modify the width using the "Track Width" slider.


Loading and Saving Images
=========================

gipfel allows to save the image paramters in the comment section of 
the JPEG image. Use the File->Save Image menu item. 
Note, that in the saved image all previous JPEG comments are removed.
If you open an image containing gipfel image parameters, they are 
automatcally set.


Hidden Object Detection
=======================

gipfel tries to identify objects in its database, that are hidden by others.
This is done by assuming that every object/peak has the form of a cone 
with a fixed steapness. If such imaginary cone would hide the view to a
point in the database, gipfel marks it as hidden. Hidden objects are
not shown by default, but you can enable the display of hidden objects using
the Option->Show Hidden menu entry. Hidden objects and hidden GPS way points
are displayed in blue.


Stitching
=========

If you have multiple images from the same viewpoint referenced with gipfel
you can stitch them together to form a panorama image.
For stitching the input images must all have been correctly referenced
with gipfel and saved (see "Loading and Saving Images").
You can then call gipfel -s <img1> <img2> ...
to see the result in a window. Alternatively you can call
gipfel -s -j <outimg> <img1> <img2> ...
to save the result as a JPEG image to <outimg> or 
gipfel -s -t <outdir> <img1> <img2> ...
to save the result as multiple TIFF images to <outdir>.
Use the multiple TIFF option for blending the result with enblend
(http://enblend.sourceforge.net/).
The width and height of the result images can be adjusted with the
-w and -h options.

The nice thing about stitching is that gipfel uses the same code that
it already had for positioning mountains on the pictures.
gipfel simply scans all directions needed for the panorama and determines
where these directions would end up on the various pictures. It can then
record the corresponding color values from the input images.

In contrast to other stitching programs, the input images don't need to 
overlap.

If you want to open a stitched image in gipfel to locate the mountains
on it, don't forget to choose Panoramic Projection!


Troubleshooting
===============

- Obviously gipfel can only be as good as its input data. If there is no 
data about the mountains on your picture, you are out of luck...
But as the data file format is pretty simple and GPS receivers are common, 
you can build up your own datafile.

- gipfel only works with full normal unmodified pictures taken with a 
non-distorting standard objektive. If you have a panorama picture, you
might want to try the experimental "Panoramic Projection" support (see
"Options" menu).

- I have no idea, whether gipfel works correctly on pictures taken on
the southern hemisphere, but I would appreciate any feedback about it.


Commercial Applications
=======================

If you are interested in a commercial application of the methods used in
gipfel, feel free to contact me.


Acknowledgements
================

Thanks to the guys from http://www.alpin-koordinaten.de for their public
GPS database. 
thanks to Carsten Clasohm for his great gallery at http://www.clasohm.com/.
His pictures are good test cases for gipfel!
Also have look at their other site http://www.alpen-panoramen.de/ !
Thanks to George J. Gesslein II for his great program mathomatic
(http://www.mathomatic.com/) which helped a lot to handle and simplify large
Expressions.
I also want to thank my brother Martin Hofmann for his suggestions and the
discussions.


DISCLAIMER
==========
gipfel must NOT be used for real navigation. You should not rely on the 
results of gipfel.


Johannes Hofmann
(Johannes.Hofmann@gmx.de)