SoMAS Mosaic Image Process

There’s a complicated process for capturing and processing the content that is used to build the mosaic images of the Breach at Old Inlet.  With Dr. Charlie Flagg capturing the images from his airplane, I process the video into a collection of PNG files and build a panoramic image and Dr. Flagg takes that image and georeferences it to identify the coordinates of the corners.  I then take the coordinates and build the KML file.

Here’s the long version:

Capturing the Images
Flights over the breach are conducted on roughly a monthly basis. Mounted to the plane is a camcorder with an extended battery pack. The camera is positioned in a way that points the lens directly down, and records video footage of the flight from that position. Dr. Flagg edits the full video (from takeoff to landing) to just the clips of the video that fly over the area of interest. For reference, the camcorder captures the full length video as an .MTS and the edited clips (done on the camcorder) are saved as .TS files.

I download the .TS files and process the video using VLC Player. VLC Player has an option to save video files as images. Unfortunately, the process needs to be run from the command line to add additional commands. Here is a sample script that I use under Windows:

C:\Program Files (x86)\VideoLAN\VLC>vlc “D:\path\to\movie\file\00148.ts” –rate=1 –video-filter=scene –vout=dummy –start-time=0 –stop-time=1200 –scene-format=png –scene-ratio=60 –scene-prefix=NAMEOFIMAGEFILE –scene-path=”D:\path\to\movie\file” vlc://quit

  • Note that my command prompt is running from the VLC player folder. I open VLC and the film clip and the other commands set playback and processing. A few notes:
  • the output is saved as .PNG (–scene-format=png)
  • the stop-time is set to 1200 seconds (set to the length of the video).
  • Scene-ratio sets the number of frames to capture (1 frame out of every 60)
  • Scene-prefix sets the PNG filename, adding a number to each subsequent image
  • Scene-path sets the save directory for the PNG files (in this example it is set to the same directory as the video file)

VLC needs to run through the complete playback of the video, so it may take a few minutes. Once completed, VLC should exit (vlc://quit) and your output folder should be filled with PNG images.

Building the Mosaic
The mosaic images are created using the free software Microsoft Image Composite Editor (ICE).

Once you install it, you may notice that one of the features is to create an image from a video file. I’ve tried it, but it’s never been successful and I end up using the images instead. In the ICE, create a new Panorama from images, find the folder of PNG files and select them all. Use the default options and let the image process. Depending on your system, it will take some time. Once it completes, you can modify some of the projection settings or simply save the image. Save the image as a PNG file with the alpha channel to enable the transparency.

I then send the image file over to Dr. Flagg, who georeferences the image based on several specific points that he has established. I know at one point he had set up large white squares on the beach to identify the area. His georeferencing reduces the image size and plots the lat/lon lines on the image. Additionally, he can determine the coordinates of the corners of the image, which I use to update the KML file for Google Earth.

A KML file links to live images on the web.  The KMZ file allows for offline usage (where Internet connectivity is not available).

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *