Data used in the VIPER Project

Fabio Cozman
Carlos Ernesto Guestrin

Some of the data we have used to test the VIPER system is freely available. You can freely download it, but if you do so, please drop us a note so that we know who is interested in the project. Thanks.

Our intention is to gradually collect here all the data we use; this is still in a somewhat embryonic stage and we only have preliminary data here, mostly to test our distribution format.

We decided to make data from Pittsburgh, PA, available as a test. You can download the topographic map of this area and the images we have used.


Each dataset comes as a separate compressed tar file, containing: After you download the dataset, use the gunzip utility to uncompress it and the tar utility to obtain the distribution.

How to get this data

You can get all of it by anonymous ftp. For example, for the Pittsburgh dataset:
ftp  (as anonymous)
cd /afs/cs/project/lri-3/ftp/outgoing/Viper (enter full path in a single command!)
get pgh.tar.gz
uncompress pgh.tar.gz
tar xf pgh.tar

You should get the DEM and the panorama, and the sample code that reads the DEM into memory (read7.5minDEM.c).

If you have any problems with this, please let us know!

How to interpret this data

Interpreting data is always the most complicated step. We have tried hard to make things simple but we are open to suggestions.

Map format

The format of the topographic map is usually the USGS format for 7.5 minute Digital Elevation Maps, which is best described by publications available at USGS web site. The DEM is a large ASCII file which basically contains an array of heights for a 30meter grid; some links with useful information about USGS are collected in a bookmarks file.

In the distribution, you will find sample code that reads the DEM into memory, in the file read7.5minDEM.c.

Note that the code in read7.5minDEM.c was produced for AVSTM (Advanced Visualization System); if you're not an AVS user, you will not be able to use the code directly. But the code should be (relatively) easy to understand and port; look at the comments at the beginning of the file.

If you're an AVS user, then you may be interested in modules (with source code and documentation) that read in 7.5 minute DEMs. If so, the you can get such a package by anonymous ftp:

ftp  (as anonymous)
cd /afs/cs/project/lri-3/ftp/outgoing/Viper (in a single step; no intermediate steps
get avs-usgs.tar.gz
uncompress avs-usgs.tar.gz
tar xf avs-usgs.tar
If we happen to distribute some maps in less standardized formats, we will include format descriptions in the related distribution.

Image format

The format for the panorama is less standard, as it contains not only the image but also information about viewing location and orientation, camera parameters, etc.

Basically, every panorama is an AVSTM (Advanced Visualization System) uniform field. If you do not use AVS, then you probably need information on how to read AVS fields. In short, an AVS field contains some ASCII information in the header and a binary dump of the contents of the field. The header is easy to read and understand, containing information such as type of data and dimensions of the field.

For example, here is the header for the Pittsburgh panorama:

# AVS field file (@(#)write_field.c Stellar 93/05/12)
# creation date: Mon Jun  2 18:20:19 1997
ndim=2                          # number of dimensions in the field
dim1=3494                       # dimension of axis 1
dim2=246                        # dimension of axis 2
nspace=2                        # number of physical coordinates per point
veclen=4                        # number of components at each point
data=byte                       # native format of sg
field=uniform                   # field type (uniform, rectilinear, irregular)
label= "1_0_0_3493_245_74_123_5.23599_0.000000_235.766464_317.412781_1078.126587_1081.504883_-0.004071_0.00179797_0.00173801_1_47.474337_-79.965446 XC003.B/lens8m" null null null 

Comments start with the symbol #. All panoramas are of type uniform (i.e., a uniform grid) and are 2-dimensional (nspace and ndim are equal to 2).

Most panoramas are in color (i.e., veclen is equal to 4). That means that data is given as (ALPHA, RED, GREEN, BLUE) for each pixel in the image; you should discard the ALPHA value as it is not used for anything. Some panoramas may be black-and-white (i.e., veclen is equal to 1). That means that each value in the field corresponds to a pixel in the image.

The only non-standard aspect of VIPER fields is the label. Each AVS field has a label with as many strings as the value of veclen. In the example above the label has four strings since the panorama is in color. VIPER only uses the first label; all other labels (if present) are set to null.

The VIPER label contains important information about the panorama; to parse it, replace every underscore symbol by a space. Each one of the numbers in the string has a meaning; the list below explains each one of them.

To properly process the panorama, you have to understand two things; first, the concept of a center pixel, and second, the resolution of the panorama.

First, let's look at what we mean by the center pixel. This is a pixel that we selected, when we built the panorama, as the center of the panorama; generally it corresponds to the center of the first image used to build the panorama. The center pixel is important because we accurately measure the azimuth and elevation for the point that corresponds to the pixel. In other words, if you want to know the azimuth and elevation of any pixel in the panorama, you have to use the information about the center pixel to get what you want.

Note that azimuth is measured from north in clockwise fashion; elevation is zero at horizontal, and increases as you look up, and decreases as you look down.

Second, let's look at what we mean by the panorama resolution This is a number that gives you the (angle in radians per panorama pixel) ratio. In fact, there is a horizontal resolution and a vertical resolution (these numbers may be different because the CCD sensors may have different sizes in different directions.

Let's call (w0, h0) the center pixel, where w0 is the index from left to right and h0 is the pixel from top to bottom; (theta0, alpha0) the azimuth and elevation of the center pixel; rW, rH the resolutions in the horizontal and vertical positions respectively. Now suppose you pick a panorama feature at (w,h). The azimuth for this feature is [theta0 + (w-w0) * rW]. The elevation for this feature is -[alpha0 + (h-h0) * rH] (note the minus sign!!).

The information contained in the label should allow you to obtain angles for features in the images and compare the image content with the topographic features in the map. The images were taken with a special platform containing a marine digital compass, two digital inclinometers, a color camera and a GPS receiver, so all data is calibrated to the best of current technology.

Pittsburgh data

This page describes how to get to:
A 7.5 minute Digital Elevation Map of the Pittsburgh area. The map was supplied by the USGS (United States Geological Survey) and can be freely distributed. If you know Pittsburgh, you recognize the two rivers: the Allegheny (above) and the Monongahela (below), which meet downtown. Carnegie Mellon University is approximately at the middle of the map.
A panorama taken at Pittsburgh. The panorama was composed from images taken May 1997, at 43rd Street (where it meets the Allegheny river). A GPS measurement indicated that the images were acquired at 40.474350 degrees North (latitude) and 79.965698 degrees West (longitude). The heading of the camera was measured with a digital compass, and corrected for the magnetic variation at Pittsburgh, which is +8.5 degrees westerly. The camera was kept horizontal to within 0.1 degree with help from a dual inclinometer system.
As mentioned above, you can get this data by ftp:
ftp  (as anonymous)
cd /afs/cs/project/lri-3/ftp/outgoing/Viper (enter full path in a single command!)
get pgh.tar.gz
uncompress pgh.tar.gz
tar xf pgh.tar

You should get the DEM and the panorama, and the sample code that reads the DEM into memory (read7.5minDEM.c).

This work has been conducted at the Robotics Institute at the School of Computer Science, Carnegie Mellon University. It has been partially funded by NASA; Fabio Cozman has a scholarship from CNPq (Brazil). We thank these four organizations for all their support.