mapillary / mapillary/mapillary_tools

Broken image ordering for OpenCamera subsecond sequences

Open
#677 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
315
Forks
145
Avg merge
3d 10h
Merged PRs (30d)
2

Description

Basic information
  • Release version: 0.11.1
  • System: Linux
  • Capture Device: Android OpenCamera

When capturing with OpenCamera, if the app takes photos less than 1 second apart for whatever reasons, it attaches a number in partentheses to the filename. Apparently the files are also sorted wrongly in the file system unexpectedly.
Now, this wrong order is apparently also used when uploading the sequence, resulting in something like three steps forward -- one step backword -- one large step forward -- three steps forward -- etc.
as can be seen in the resulting sequence:
https://www.mapillary.com/app/?pKey=1679786299214859

My speculation is that the file sorting does not properly take the exif subsecond entry into account, specifically if it conflicts with the file order.
In that case, the solution would be to use the exif subsecond entry when sorting, and ignoring the filenames.

excerpt of file listing:

$ ls
...
IMG_20231115_170430.jpg
IMG_20231115_170431 (1).jpg
IMG_20231115_170431.jpg
IMG_20231115_170432.jpg
IMG_20231115_170433.jpg
IMG_20231115_170434 (1).jpg
IMG_20231115_170434.jpg
IMG_20231115_170435.jpg
IMG_20231115_170436.jpg
IMG_20231115_170437 (1).jpg
IMG_20231115_170437.jpg
IMG_20231115_170438.jpg
IMG_20231115_170439.jpg
IMG_20231115_170440.jpg
IMG_20231115_170441 (1).jpg
IMG_20231115_170441.jpg
IMG_20231115_170442.jpg
IMG_20231115_170443.jpg
IMG_20231115_170444 (1).jpg
IMG_20231115_170444.jpg
IMG_20231115_170445.jpg
IMG_20231115_170446.jpg
IMG_20231115_170447 (1).jpg
IMG_20231115_170447.jpg

The exif data is correctly using Sub Sec Time.

$ exiftool IMG_20231115_170444.jpg | grep -i time
File Modification Date/Time     : 2023:11:15 17:04:44+01:00
File Access Date/Time           : 2024:05:20 19:25:16+02:00
File Inode Change Date/Time     : 2023:11:15 22:52:07+01:00
Date/Time Original              : 2023:11:15 17:04:44
Sub Sec Time Original           : 5010
Exposure Time                   : 1/200
Sub Sec Time                    : 5010
Sub Sec Time Digitized          : 5010
GPS Time Stamp                  : 16:04:44
Profile Date Time               : 2016:12:08 09:38:28
Date/Time Original              : 2023:11:15 17:04:44.5010
GPS Date/Time                   : 2023:11:15 16:04:44Z

$ exiftool IMG_20231115_170444\ \(1\).jpg | grep -i time
File Modification Date/Time     : 2023:11:15 17:04:44+01:00
File Access Date/Time           : 2024:05:20 19:25:16+02:00
File Inode Change Date/Time     : 2023:11:15 22:52:07+01:00
Date/Time Original              : 2023:11:15 17:04:44
Sub Sec Time Original           : 8207
Exposure Time                   : 1/200
Sub Sec Time                    : 8207
Sub Sec Time Digitized          : 8207
GPS Time Stamp                  : 16:04:44
Profile Date Time               : 2016:12:08 09:38:28
Date/Time Original              : 2023:11:15 17:04:44.8207
GPS Date/Time                   : 2023:11:15 16:04:44Z

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace how the CLI discovers, sorts, and uploads image sequences, then reproduce the issue with the listed OpenCamera filenames and their EXIF Sub Sec Time values. Done means the resulting sequence follows the EXIF capture order rather than filesystem or filename order, including same-second images.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.