#11685 closed enhancement (fixed)
Use sub-second exif/xmp data
Reported by: | StephaneP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.02 |
Component: | Core | Version: | |
Keywords: | picture; gpx; correlation | Cc: |
Description
Is it possible to add the support of the subsecond time data in the "correlate with gpx" tool ?
The subsecond time could be stored with the exif SubSecTimeOriginal tag, or in the XMP DateTimeOriginal.
With this support, and if the correlate function could interpolate between two gpx "node", I won't have two successive pictures geotagged at exact the same location.
Revision: 8581 Repository Root: http://josm.openstreetmap.de/svn Relative URL: ^/trunk Last Changed Author: Don-vip Last Changed Date: 2015-07-07 23:45:23 +0200 (Tue, 07 Jul 2015) Build-Date: 2015-07-07 21:48:24 URL: http://josm.openstreetmap.de/svn/trunk Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last Changed Rev: 8581 Identification: JOSM/1.5 (8581 fr) Windows 8.1 64-Bit Memory Usage: 1362 MB / 5461 MB (549 MB allocated, but free) Java version: 1.8.0_45, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Dataset consistency test: No problems found
Attachments (2)
Change History (15)
comment:1 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
by , 10 years ago
Attachment: | 2015-07-11.zip added |
---|
pictures with exif subsectimeoriginal and xmp + gpx
comment:2 by , 10 years ago
Here it is a zip file with 2 pictures and a gpx.
The exif SubSecTimeOriginal tag, and the XMP DateTimeOriginal were added manualy with ExifToolGui. I hope the values are correct. I just asked the Opencamera dev to directly add these tags to the pictures, I hope it will be included in the next release.
comment:3 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
comment:5 by , 9 years ago
Milestone: | → 16.02 |
---|
comment:6 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
org.openstreetmap.josm.tools.ExifReaderTest.testReadTime is often failing with JDK8, why?
the error that happens regularly is:
junit.framework.AssertionFailedError: expected:<Sat May 15 17:12:05 CEST 2010> but was:<null> at org.openstreetmap.josm.tools.ExifReaderTest.testReadTime(ExifReaderTest.java:46) ERROR: org.openstreetmap.josm.tools.UncheckedParseException: The date string ([540 bytes]) could not be parsed. org.openstreetmap.josm.tools.UncheckedParseException: The date string ([540 bytes]) could not be parsed. at org.openstreetmap.josm.tools.date.DateUtils.tsFromString(DateUtils.java:135) at org.openstreetmap.josm.tools.date.DateUtils.fromString(DateUtils.java:72) at org.openstreetmap.josm.tools.ExifReader.readTime(ExifReader.java:65) at org.openstreetmap.josm.tools.ExifReaderTest.testReadTime(ExifReaderTest.java:45)
comment:7 by , 9 years ago
The 540 bytes
originate from a Sony Makernote Directory and its Unknown tag (0x9004):
-
src/org/openstreetmap/josm/tools/ExifReader.java
diff --git a/src/org/openstreetmap/josm/tools/ExifReader.java b/src/org/openstreetmap/josm/tools/ExifReader.java index b61ba1a..3159da0 100644
a b public static Date readTime(File filename) { 50 50 } 51 51 if (tag.getTagType() == ExifIFD0Directory.TAG_DATETIME /* 0x0132 */ || 52 52 tag.getTagType() == ExifSubIFDDirectory.TAG_DATETIME_DIGITIZED /* 0x9004 */) { 53 System.out.println(dirIt); 54 System.out.println(tag); 55 System.out.println(tag.getTagType()); 53 56 if (dateStr != null) { 54 57 // prefer TAG_DATETIME_ORIGINAL 55 58 dateStr = tag.getDescription();
Exif SubIFD Directory (28 tags) [Exif SubIFD] Date/Time Digitized - 2010:05:15 17:12:05 36868 Sony Makernote Directory (43 tags) [Sony Makernote] Unknown tag (0x9004) - [540 bytes] // <---- 36868 Exif IFD0 Directory (9 tags) [Exif IFD0] Date/Time - 2010:05:15 17:12:05 306 Exif Thumbnail Directory (9 tags) [Exif Thumbnail] Date/Time - 2010:05:15 17:12:05 306
follow-up: 10 comment:9 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It seems that Josm doesn't read the SubSecTimeOriginal tag correctly.
This value is a part of a second, a value of 5 or 5000 is the same, it's always 0.5 second.
I have a picture with
DateTimeOriginal=2015:11:08 15:33:27
SubSecTimeOriginal=500000
Josm tells that the picture's time is 15:41:47
comment:10 by , 9 years ago
Replying to StephaneP:
I have a picture with
DateTimeOriginal=2015:11:08 15:33:27
SubSecTimeOriginal=500000
Josm tells that the picture's time is 15:41:47
Can you please attach it?
by , 9 years ago
Attachment: | 2015-11-08_15-33-27-Xiaomi_YI-Y0030832.jpg added |
---|
comment:11 by , 9 years ago
Picture attached.
Exif spec, page 30 :
SubsecTimeOriginal
A tag used to record fractions of seconds for the
DateTimeOriginal
tag.
Tag = 37521 (9291.H)
Type = ASCII
N = Any
Default = none
Can you please attach example files? (One track and two images). Thanks