(English) Mapillary ingest workflow for cameras

ขอโทษครับ บทความนี้มีแต่เวอร์ชั่น English เท่านั้น For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

Often one would use a camera such as Garmin Virb to capture images over the course of a journey and upload them all at once to Mapillary. These images are sometimes problematic due to artifacts cropping up due to malfunctioning mount, rain, car reversing. This workflow adds a preview step where one would preview and then upload in bulk. Some knowledge of Python, ImageMagick is required.

First we will create three folders:

010-Original
020-Sequence
030-Thumbs

Typically your images will appear in folders with names such as VIRB_123 VIRB_124 etc. Copy the folders into 010-Original, we will use this as a staging environment.

Next we want have all the files in a form that can be read by a sequence previewer, which reads each file as a single frame, such as 001.jpg 002.jpg 003.jpg etc. you can use this script that reads exif tags in the file, sorts by date and time and creates a hard link of those files ordered by time. Run it like this:

python sequence-maker.py 010-Original 020-Sequence

The issue is that if you have captured these images at full resolution, you will not be able to preview the JPEGs at a reasonable frame rate, so we need to create thumbnails for previewing.

find 020-Sequence -name "*.jpg" -print0 | xargs -0 mogrify -format jpg -path 030-Thumbs -thumbnail 800x600 -quality 15

This will output the thumbnails to 030-Thumbs

To preview, use a sequence viewer such as DJV, you can get it from here: http://djv.sourceforge.net/ 

Load up the sequence, press play and adjust the frame rate as comfortable. You will see the frame number along the bottom of the application, this corresponds to the JPG file. When you come across damaged frames or images captured in error, just delete the files from 020-Sequence

When all’s done, grab the mapillary tools and upload the sequence:

python mapillary_tools/python/upload_with_preprocessing.py --remove_duplicates --auto_done 020-Sequence

That’s it.

Share

Copyright © 2017. All Rights Reserved.

Leave a Reply

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