Modify

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#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)

2015-07-11.zip (1.9 MB ) - added by StephaneP 9 years ago.
pictures with exif subsectimeoriginal and xmp + gpx
2015-11-08_15-33-27-Xiaomi_YI-Y0030832.jpg (3.8 MB ) - added by StephaneP 8 years ago.

Change History (15)

comment:1 by Don-vip, 9 years ago

Owner: changed from team to StephaneP
Status: newneedinfo

Can you please attach example files? (One track and two images). Thanks

by StephaneP, 9 years ago

Attachment: 2015-07-11.zip added

pictures with exif subsectimeoriginal and xmp + gpx

comment:2 by StephaneP, 9 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.

Last edited 9 years ago by StephaneP (previous) (diff)

comment:3 by simon04, 9 years ago

Owner: changed from StephaneP to team
Status: needinfonew

comment:4 by simon04, 8 years ago

Resolution: fixed
Status: newclosed

In 9499/josm:

fix #11685 - Use sub-second exif/xmp data

comment:5 by simon04, 8 years ago

Milestone: 16.02

comment:6 by Don-vip, 8 years ago

Resolution: fixed
Status: closedreopened

org.openstreetmap.josm.tools.ExifReaderTest.testReadTime is often failing with JDK8, why?

See jenkins/job/JOSM/lastCompletedBuild/jdk=JDK8/testReport/junit/org.openstreetmap.josm.tools/ExifReaderTest/testReadTime/history/

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 simon04, 8 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) {  
    5050                    }
    5151                    if (tag.getTagType() == ExifIFD0Directory.TAG_DATETIME /* 0x0132 */ ||
    5252                        tag.getTagType() == ExifSubIFDDirectory.TAG_DATETIME_DIGITIZED /* 0x9004 */) {
     53                        System.out.println(dirIt);
     54                        System.out.println(tag);
     55                        System.out.println(tag.getTagType());
    5356                        if (dateStr != null) {
    5457                            // prefer TAG_DATETIME_ORIGINAL
    5558                            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

comment:8 by simon04, 8 years ago

Resolution: fixed
Status: reopenedclosed

In 9648/josm:

fix #11685 - Obtain EXIF fields only from EXIF directories

Fixes unit test ExifReaderTest.testReadTime

comment:9 by StephaneP, 8 years ago

Resolution: fixed
Status: closedreopened

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

Last edited 8 years ago by StephaneP (previous) (diff)

in reply to:  9 comment:10 by Don-vip, 8 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?

comment:11 by StephaneP, 8 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

comment:12 by Don-vip, 8 years ago

Resolution: fixed
Status: reopenedclosed

In 9672/josm:

fix #11685 - parse subsecond exif information correctly

comment:13 by StephaneP, 8 years ago

It works ! Thank You !

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.