YAZAPA - yet another zooming and panning application

by Peter Houska, 2007

Doxygen-documentation | Download

Yazapa is a program that implements smooth and efficient zoomin and panning as presented in [1]. It was implemented during approximately 3 months for the course "Informationsvisualisierung" at the vienna technical university. The dataset that was chosen for testing the method is a 64K x 32K image of the earth from the NASA Blue Marble dataset. Since this RGB picture's size is 6 GB, it cannot be simply loaded into memory. A custom image coder that is based on the discrete wavelet transform (implemented through lifting [2]) and the EZW algorithm [3] was implemented. To achieve even better compression rates, an image-pyramid is build (similar to the method described in [4]); finally the complete datastructure fits in ~ 289 MB (compression factor ~ 21) and can be easily completely loaded into the RAM of todays standard home-computers. The random-access decompression works in near-realtime (the worst case yields ~8 FPS on a P4@2.4 GHz, 512 MB RAM, with bilinear interpolation turned off and the default render-window size 512 x 512 pixels).

Yazapa is a pure software-renderer. It uses the SDL library for window-creation and input-handling and the GTK+ library for the GUI. Zlib is used to compress some of the symbol-sequences that the EZW-coder generates.

Here are some screenshots:




only upsampled data

upsampled data + residuals

only upsampled data

upsampled data + residuals



the GUI



Short tutorial for using Yazapa:

When the focus is on the renderwindow, then the user can move the camera with the keys WSADRF (hold left Shift for faster or right Shift for slower movement). When the minimap is drawn, just left-click on a desired location to travel there [ of course "smooth & efficient" ;-) ]. The red cross on the minimap marks the camera's position.

The GUI gives you additional control over the behavior of Yazapa.

The slider labeled "velocity" lets the user adjust the animation speed.

The slider labeled "zoom-/pan- ratio" lets the user adjust how far the path "zooms out" (a small value means less zooming).

The slider labeled "timestep for animation" is an additional animation-speed control.

The "limit framerate to"-checkbox enables/disables the FPS-lock. If it is active, the user may specify the maximum FPS value.

The "bilinear interpolation"-checkbox enables/disables bilinear interpolation during map-rendering.

The "add compressed residuals"-checkbox enables/disables the blending of the upsampled data with the difference image (which is decompressed in realtime). If disabled, the framerate increases but image quality gets worse.

The "always highest resolution"-checkbox enables/disables the rendering of the highest detail, no matter how far the camera is away from the ground. Do not enable this option, if the camera is high above the ground, because the program might not respond for quite some time!

The "show minimap"-checkbox enables/disables the rendering of the minimap. If the minimap is enabled, the user can naviagate smoothly and efficiently across the entire map in no time by just clicking at the destination on the minimap!

The "draw crosshair"-checkbox enables/disables the white cross in the center of the screen. The cross may help focusing on a certain destination when zoomin in on it.

The "Exit"-button quits the program.



References:

[1] J. van Wijk, W. Nuij, "Smooth and efficient zooming and panning", Technische Universiteit Eindhoven
[2] A. Skodras et al, "The JPEG 2000 Still Image Compression Standard"
[3] B. E. Usevitch, "A Tutorial on Modern Lossy Wavelet Image Compression: Foundations of JPEG 2000"
[4] F. Losasso, H. Hoppe, "Geometry Clipmaps: Terrain Rendering Using Nested Regular Grids"


Special thanks to Lutz Justen (the creator of SimSpace, an amazing planet-renderer), for answering several questions about random-access decoding with EZW and for the discussions about the correct dwt 5/3-type filter values. On his homepage I also found a link to the paper by B.Usevitch [3] which was a perfect starting point for implementing an EZW-image coder!