Stitched panoramas editor viewer

From ElphelWiki
Jump to: navigation, search


  • Database setup is not required


A web-based WebGL Panorama Editor/Viewer. Some older PCs and browsers might not be able to handle the graphics.

Stitched results WebGL Editor/Viewer snapshot

Sample Route

Sample route in WebGL Pano Editor/Viewer.

Source Code

or in a terminal window (Linux)

git clone

Note: There might be problems with the Google Maps API key. It's personal and needs to be regenerated.


  • A stitched panorama of 14268x7135 in size in JPEG format splitted into 8 square 3568x3568 tiles with a 1 pixel overlapping.
  • A KML route file created manually or extracted from the source files.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="">
  • Note 1:
    • Both cutting on tiles and KML records extracting is done with php scripts.
  • Note 2:
    • If the panorama name in KML is sample.jpeg then the tile names will be named by adding indices starting from the top-left tile and finishing with the bottom-right tile from left to right:

Name in KML:
Tile names:
 sample_1_8.jpeg (top-left)
 sample_4_8.jpeg (top-right)
 sample_5_8.jpeg (bottom-left)
 sample_8_8.jpeg (bottom-right)

  • Note 3:
    • <href>-tag in the KML file must have an absolute or relative from the WebGL Editor's index.html http-path. Images and the Editor files must be stored on the same web server - WebGL fails to load images from external servers due to its security reasons.


Footage procedures page

More information is on the documentation page.

There's the "Footage Procedures" webpage on the Eyesis PC bookmarked in both - Firefox and Chrome:

Footage Procedures page

Step 3 covers actions for the WebGL Viewer/Editor:

  • Stitch-button launches the stitch.php script that takes the "Processing root folder"/"ImageJ-processed subfolder" as a parameter and stitches all the matching files in the folder putting results into "Processing root folder/results"
  • Split-button runs the prepare_images_for_wpe.php - using Imagemagick it converts and cuts the already stitched panoramas into the tiles described above.
  • Generate KML for WebGL Editor-button execs the exif2kml_3.php. The script scans the files in the "Processing root folder"/"Sources subfolder" and creates the KML file with the chosen Path prefix, visibility and Starting index.
  • After that images and the KML files can be uploaded to the server (A local Editor version comes with the Eyesis PC).


3.1 Viewing:

3.1.1 (or just index.html?!) - clicking a link in the 1st column opens the WebGL Editor/Viewer. 
3.1.2 Route IDs named as *.kml are kml files stored in "/data/webgui/webgl_editor/webgl-editor-db/kml_files".
3.1.3 (Optional) A number as a Route ID - route stored in the database (MySQL).
3.1.4 Rows can be selected for creating an editable copy in "/data/webgui/webgl_editor/webgl-editor-db/kml_files".
3.1.5 Works only for routes with >1 panoramas + internet connection for google maps and openstreet maps.

3.2 (Optional) Database interface:

3.2.1 Structure described here:
3.2.2 User/Password for PHP to connect to the DB are in "/data/webgui/webgl_editor/webgl-editor-db/pano_db_functions.php".
3.2.4 When importing a kml file into the DB the "path" field points to "/data/webgui/webgl_editor/webgl-editor-db/kml_files". Enter "test.kml" and try to import, for example. 
3.2.5 Export KML - copy the output into a text file and save it as *.kml.