HughP / gpicsync

Automatically exported from code.google.com/p/gpicsync
Other
0 stars 0 forks source link

Image files should be sorted during tagging #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. have the app tag some photos
2. watch the files go by in seemingly-random order

What is the expected output? What do you see instead?
watch the files go by in some reasonable order

When observing the output in the GUI, it is helpful for the images to be 
sorted. This is particularly useful to see how offsets vary, thus getting a 
better sense of which direction the error is trending.

For example, to see that the offset is increasing for several photos in a row, 
I can look at the first image in that trend and decide based on where I was and 
what I was doing, how much of a time offset I'm willing to accept. If I was 
walking around a town square, I would accept a much bigger offset than if I was 
on a high-speed train.

Often the filenames can be sorted alphabetically, resulting in chronological 
order. For example IMG_0001.jpg, IMG_0002.jpg, etc. Thankfully python makes 
this trivial. See attached patch, which is against r962.

Original issue reported on code.google.com by mhriv...@hrivnak.org on 4 Sep 2013 at 3:50

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, I’ll add the patch. I didn’t realize and thought the files sorting 
was kind of automatic. I always saw them in  the right order on my Windows box 
at least.
>>> os.listdir("./")
['IMG_0001.jpg', 'IMG_0002.jpg', 'IMG_0003.jpg', 'IMG_0004.jpg']

But looking at the Python doc it says “The list is in arbitrary order.” so 
the sorting must be useful in some cases. 
http://docs.python.org/2/library/os.html#os.listdir

Original comment by francois...@gmail.com on 4 Sep 2013 at 10:26

GoogleCodeExporter commented 9 years ago
Thanks. I've just comited the patch.

Original comment by francois...@gmail.com on 5 Sep 2013 at 6:39