Capturing and preprocessing photos from Ricoh Theta S for Mapillary

Ricoh Theta S camera has a two lens, and can make a 360×180 panoramic photos every 8 seconds.

Walking equipment

You need an anything selfie-stick and gpx logger in your mobile device.

Cycling equipment

  • Backpack with side straps and side pocket
  • Anything tripod. May be tripod for studio light, without side handle will be better.
  • Selfie-stick, mounted beetwen tripod and camera.
  • Software gpx logger in mobile device, or hardware gpx logger.
  • External USB battery
  • Optionally: Camera Thread Screw Rod for allow connect USB power cable while camera mounted at tripod.

Capturing

  1. Seal all LEDs at camera by duct tape, for your less visible.
  2. Make sure it gpx logger is on at maximum record frequency.
  3. Begin capture at timer mode, with shutter sound.
  4. Turn off WiFi at camera (middle side button), and in your mobile device too, for power save.
  5. Just go. Don’t think about the camera tilt, photos can be rotated at pre-processing.

Avoid tree branches while cycling! (i now have a scratches at lens, их можно заполировать пастой ГОИ?)

Avoid rain!

Pre-processing at PC

You need:

  • JOSM with plugins photo_geotagging, photo_adjust
  • Hugin (nona.exe from Hugin)
  • exiftool
  • Total Commander with exif plugin, GeoSetter, or some other program, where you can find photos with null “GPS Img Direction” tag

Camera produces a 360×180 frames with Google Photosphere tags in EXIF:

exiftool R0038875.JPG

Date/Time Original              : 2016:09:17 19:42:26
Accelerometer                   : 3 -4.5
Compass                         : 135
GPS Img Direction Ref           : True North
GPS Img Direction               : 135
Full Pano Height Pixels         : 2688
Full Pano Width Pixels          : 5376
Pose Heading Degrees            : 135
Pose Pitch Degrees              : -4.5
Pose Roll Degrees               : 3.0
Projection Type                 : equirectangular
Use Panorama Viewer             : True
GPS Position                    : 55 deg 48' 50.44" N, 37 deg 36' 6.91" E

So we have “Use Panorama Viewer” – describe it is a photosphere, GPS Position – it gets from smartphone, but we turn off WiFi for power save, GPS Img Direction (some times, after turn on camera it field is empty, so we need set it manually), and “Accelerometer” – value of this tag we can send to nona.exe, witch will rotate shot, even if the camera was tilted, or upside-down.

  1. Add gps coordinates into photos, using gps tracks and photo_geotagging plugin in JOSM. Also you can correct here position manually, if signal was bad. Save positions in EXIF.
  2. Find all photos with empty value in “GPS Img Direction” tag. I can’t find a Ubuntu software for this, so i use a exif.wdx plugin for Total Commander for MS Windows.
  3. Drag-and-drop these files in JOSM. Set direction (azimuth) for center of photos with Ctrl key, and save positions in EXIF.
  4. photo_adjust plugin may be produces a strange values for “GPS Img Direction” tag, so it not acceptable for Google Street View program (i want to upload photos to many sites, not just one). So i run all photos through

exiftool -overwrite_original -P -ProjectionType="equirectangular" -UsePanoramaViewer="True" -"GPSImgDirection<$exif:GPSImgDirection" -"PoseHeadingDegrees<$exif:GPSImgDirection" -"CroppedAreaImageWidthPixels<$ImageWidth" -"CroppedAreaImageHeightPixels<$ImageHeight" -"FullPanoWidthPixels<$ImageWidth" -"FullPanoHeightPixels<$ImageHeight" -CroppedAreaLeftPixels="0" -CroppedAreaTopPixels="0" "' + filepath + '"

  1. Correction of camera tilt. Ricoh Theta viewer and Google Street View rotate photos at client, we must rotate photos before uploading using nona.exe Try to rotate one picture in hugin, open a .pto file, and you must generate it for all photos, and run it through nona exe. Also you need reset “Accelerometer”, “Pose Pitch Degrees”, “Pose Roll Degrees” tags, using exiftool.
  2. That’s all, now you upload photos to Mapillary with web-uploader, or upload scripts.

Ricoh Theta S correction python scripts at github: https://github.com/trolleway/theta_tools

Street view for Apsheronsk narrow gauge railway

In 2012 Google Maps was get huge promotion: they hired a special train at some of Swizerland mountain railway, and make a streetview from flatcar.

In 2016 i am repeat this technology stack with panoramic camera Ricoh Theta S at Apsheronsk narrow-gauge mountain railway.
Continue reading

Новая последовательность на mapillary – вид из окна электрички Москва – Одинцово одним куском

Я продолжаю испытывать разные способы пополнения сервиса Mapillary – краудмаппинговых уличных панорам, данные которого распространяются под cc-by-sa.

Новая последовательность на mapillary – вид из окна электрички Москва – Одинцово одним куском.
Снят на беззеркалку стоящую на штативе в видео-режиме. Из видеофайла и GPS-трека с помощью самописного скрипта были получены JPG-фотографии с геопривязкой, и загружены на mapillary.
В отличие от загрузки видео сразу на mapillary при этом рабочем процессе обработка картинок на сервере занимает меньше времени. Так же можно вручную выкидывать кадры снимаемые во время стоянок на станциях, и склеивать кадры из разных последовательностей.

Интересные места:
mСтроительство путепровода под дополнительные главные пути через Шмидтовский проезд у платформы Тестовская.
Конструкции нового моста 3 и 4 пути через Москву-Реку
 

Исходное видео:

На сервис mapillary добавили загрузку видео.

Теперь можно зайти в веб-интерфейс, загрузить видео в mp4, gpx-трек, и сделать там корреляцию видео с треком. Далее на сервере из видео вытаскиваются отдельные кадрики, и склеиваются в последовательность.

Теперь съёмка протяженных маршрутов для последующего картирования в osm стала удобнее.

Попробовал грузить видео снятое на планшет: http://www.mapillary.com/map/im/LjtzRapq4ql_PbcFlUwG8w
У него оказалось не очень хорошее качество.

Потом попробовал снять видео на фотоаппарат Olympus.
Конвертация из MOV в MP4 на Ubuntu:
avconv -i P4020460.MOV -c:v libx264 -strict experimental 3.mp4

Получилось получше. Однако, выдержка при съёмке видео не регулируется, поэтому вывески часто получаются смазанными. Потенциально, используя его высокую светочуствительность, на него можно снимать например ночное видео.

Вид через открытую форточку трамвая: http://www.mapillary.com/map/im/krLRAwp1UmhwjDwBv4C-GA
Съёмка пешком: http://www.mapillary.com/map/im/-GakRmxEjFBfucLqQoIb7w

Теперь я планирую найти в продаже крепление на присоске для видеокамеры, со стандартным винтом.