What is Panodroid?
Since I enjoy taking panorama photos and wanted to watch them on my Android phone, I developed Panodroid: an interactive panorama image viewer for Google’s Android platform targeted at smart phones and tablets. It displays equirectangular panorama images (360 deg x 180 deg spherical panoramas) hosted at Flickr, local images stored on the device, or from any user-defined URL. The user can rotate the view by 360 degrees horizontally and 180 degrees vertically. Panodroid supports kinetic rotation and tag-based image queries. It can also act as generic panorama image viewer for other third-party apps (see developer information below).
If you want to get an impression of Panodroid, I recommend to watch this short video:
After a while I realized that I do not have enough time to add further features to Panodroid. Therefore, I decided to make Panodroid open source. This open version is called OpenPanodroid. I hope the community will give OpenPanodroid a hand, and add some more features or bug fixes — if there are any 😉 I also hope that the source code is helpful for other projects that require a fast high-quality panorama image viewer, or just to learn how OpenPanodroid converts and renders panoramas (e.g., using OpenGL and native code). I am looking forward to any feedback how you modified or used Panodroid!
The full source code can be downloaded from github:
git clone git://github.com/duerrfk/OpenPanodroid.git
You can download Panodroid from Google Play using one of the following links, or simply by scanning the QR code below:
Supported Image Formats
To display your panorama image with Panodroid, it must fulfill some properties. It must be a full-spherical panorama covering 360 degrees horizontally and 180 degrees vertically. It must be stored as single JPG or PNG image using the equirectangular projection. Such images have an image resolution where the image width is two times the image height. This is a common format for panorama images and should be supported by most applications for creating panorama images.
Panodroid can be used by other applications to display panorama images. To call the panorama viewer activity, you have to supply an URI pointing at the panorama image (remote file URL (http://), local file path (file://), content URI (content://)). The following code example shows how to invoke Panodroid:
Uri panoUri = Uri.parse("https://www.frank-durr.de/pano-6000.jpg"); ComponentName panoViewerComponent = new ComponentName("de.frank_durr.panodroid", "de.frank_durr.panodroid.PanoViewerActivity"); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setComponent(panoViewerComponent); intent.setData(panoUri); startActivity(intent);
Frequently Asked Questions
- Question: Why are some panoramas only displayed in poor quality?
- Answer: On the one hand, display quality depends on the resolution of the input panorama image. In general, images with a resolution of 3000 pixel x 1500 pixel and higher will give good quality on devices with a screen resolution of 800 pixel x 480 pixel (WVGA smart phones). About 6000 pixel x 3000 pixel will give optimal quality for WVGA screens. If you display images from Flickrs, please note that many Flickr users do not have a pro account and therefore can only offer images of 1024 pixel x 512 pixel. These images can only be displayed with low quality. You can exclude such low resolution images in the panorama search dialog. Moreover, high resolution images are tagged with a star in the panorama list view. On the other hand, display quality depends on the texture size used for the 3D visualization. The default (1024 pixel x 1024 pixel) should be sufficient for smart phones with WVGA screens. To further increase the display quality, e.g., on tablets with larger screens, you can select a texture size of 2048 pixel x 2048 pixel in the preferences menu. However, this requires more memory and leads to longer image conversion times.
- Question: What does the star in the panorama list view mean?
- Answer: The star marks high resolution images that can be displayed with higher quality.
- Question: Why is image conversion slow on my device?
- Answer: Images are stored at Flickr as equirectangular images. This format cannot be display directly as 3D image and, therefore, has to be converted into another format (cubic panorama). This step is complex for mobile devices with (compared to desktop and server CPUs) slow CPUs. We have optimized this step as much as possible using a native implementation for the conversion routine which reduces the conversion time from several minutes to about 30 seconds on a current mobile phone. Unfortunately, users of older devices might experience longer delays.
- Question: Why does Panodroid require a network connection?
- Answer: Because it has to download panorama images from Flickr.
- Question: Why does Panodroid require a lot of memory (RAM)?
- Answer: Panodroid was carefully designed, to keep memory usage to a minimum. However, as described above, Panodroid has to convert panorama images from the equirectangular format to cubic format in order to display it as 3D image. In this step, Panodroid has to store the original (downloaded) image in memory. Depending on the size of the original image, this can take a lot of RAM. To give you an impression of the required memory. An image of resolution 3000 pixel x 1500 pixel requires 18 MByte. An image of size 6000 pixel x 3000 pixel requires 72 MByte. For a current PC with gigabytes of memory, this does not sound too much. However, note that your mobile phone might only have about 500 MByte RAM or less, and other applications and the operating system also need some memory.
- Question: Why can’t I load large panorama images?
- Android restricts the amount of RAM for each app. For instance, for second generation Android devices (~ Android v2.x), the limit is often 24 MB. A panorama image of size 3000 pixel x 1500 pixel consumes about 18 MB. Therefore, with a limit of 24 MB you could not load much larger images than this. Fortunately, there are possibilities to increase the amount of memory available for images. For instance, we were able to load images of size 6000 pixel x 3000 pixel (~ 72 MB) on smart phones running Android 2.x. However, some Android 3.x devices seem to be more restrictive. Some suppport per app memory sizes up to 256 MB, some only allow for 48 MB. Since this is a restriction imposed by Android, we cannot get around this. (We won’t downsample images since this degrades quality too much.)
- Question: I have stored a panorama image at Flickr. How can it be displayed with Panodroid? It seems that currently it is not found by Panodroid.
- Answer: In order to be considered by Panodroid, your images must fulfill a few properties. It must be an equirectangular panorama image covering the full sphere, i.e., 360 degrees horizontally and 180 degrees vertically. Such images have an image resolution where the image width is two times the image height. If your image does not fulfill this requirement, it will be ignored. Moreover, you must tag your image with the tag “equirectangular”.
- Question: How can I create panorame images with Panodroid?
- Answer: You can’t. Panodroid is a panorama image viewer, not a creator.
Panodroid is a free non-commercial application.