Project

General

Profile

Support #929

Support Panasonic Makernote

Added by Nicolas Nicofo about 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
metadata
Target version:
Start date:
22 Oct 2013
Due date:
08 Sep 2014
% Done:

100%

Estimated time:

Description

There are a lot of Panasonic exif tags that are not visible using exiv2 (or are not correctly displayed).
- Example of such jpg picture: http://nicofo.tuxfamily.org/tmp/panasonic-tz40-GPSinfo.JPG
- Panasonic tags displayed using exiv2 (as shown by digikam, using libexiv2): http://nicofo.tuxfamily.org/tmp/Screenshot_Digikam.jpg
- Panasonic tags displayed by other software that deal correctly with Panasonic exif tags (like exiftool or ExifView (available on android)): http://nicofo.tuxfamily.org/tmp/Screenshot_ExifViewer(Android).jpg

As you can see,
- missing tags include country name, city, landmark, etc...
- tags not correctly displayed include 'Baby Age' ("9999 .." instead of nothing) ; 'Time since power on' ("14987" instead of "149,87 sec") ; ...

Thanks in advance to take these tags into account.

<Remark: bug initially reported on digikam bugzilla: https://bugs.kde.org/show_bug.cgi?id=326409 >


Files

panasonicmn.cpp.patch (20.6 KB) panasonicmn.cpp.patch Patch T Modes, 29 Oct 2013 12:45
panasonicmn.cpp.patch (22.6 KB) panasonicmn.cpp.patch Updated patch T Modes, 30 Oct 2013 09:25
panasonicmn.cpp.patch (28.4 KB) panasonicmn.cpp.patch Further updated patch T Modes, 31 Oct 2013 08:19
panasonicmn.cpp.patch (31.5 KB) panasonicmn.cpp.patch Further extended patch T Modes, 09 Nov 2013 02:01
panasonicmn.cpp.patch (32.1 KB) panasonicmn.cpp.patch Improved patch: numbers added for duplicated tags Nicolas Nicofo, 16 Nov 2013 14:09
panasonicmn.cpp.patch (34.7 KB) panasonicmn.cpp.patch Further extended patch, v2 T Modes, 04 Dec 2013 11:14
Panasonic_-_AdvancedSceneMode.ods (6.2 KB) Panasonic_-_AdvancedSceneMode.ods AdvancedSceneMode values (tags 0x003d and 0x8001) Nicolas Nicofo, 08 Jan 2014 14:21
panasonicmn.cpp.patch (35.3 KB) panasonicmn.cpp.patch Numbers added for duplicated tags and baby_age_1|2 swapped Nicolas Nicofo, 08 Jan 2014 14:23
panasonicmn.cpp.patch (35.2 KB) panasonicmn.cpp.patch updated patch Nicolas Nicofo, 13 Aug 2014 15:09

Associated revisions

Revision 3357 (diff)
Added by Niels Kristian Bech Jensen about 7 years ago

Fix issues #929 and #972: Improve Panasonic makernotes support. Thanks goes to numerous people for patches and input.

History

#1

Updated by T Modes about 8 years ago

Find attached a patch for the Panasonic makernotes. It adds some new decoded tags and adds new values for known tags.

#2

Updated by Nicolas Nicofo about 8 years ago

Great, thank you !
I have tested your patch. The missing tags are now well visible, but are not correctly presented:
Here is an sample of 'exiv2 -pa <picture>' output:

...
Exif.Panasonic.FlashWarning                  Short       1  No
Exif.Panasonic.Title                         Undefined  64  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Panasonic.BabyName                      Undefined  64  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Panasonic.Location                      Undefined  64  85 83 65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Panasonic.Country                       Undefined  72  85 110 105 116 101 100 32 83 116 97 116 101 115 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Panasonic.State                         Undefined  72  78 101 119 32 89 111 114 107 0 121 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Panasonic.City                          Undefined  72  78 101 119 32 89 111 114 107 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Panasonic.Landmark                      Undefined 128  87 104 105 116 110 101 121 32 77 117 115 101 117 109 32 97 116 32 80 104 105 108 105 112 32 77 111 114 114 105 115 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Panasonic.IntelligentResolution         Byte        1  Standard
Exif.Panasonic.MakerNoteVersion              Undefined   4  1.43
Exif.Panasonic.SceneMode                     Short       1  Intelligent auto
Exif.Panasonic.WBRedLevel                    Short       1  2135
...

I have tried to modify the patch file: I have changed 'undefined' by 'asciiString' (for instance line 451 of panasonicmn.cpp, for the Country tag). But I'm not familiar with it at all -> this was not very successful ...

One remark: why is there 2 lines for the tag 'Baby Age' (0x0033 and 0x8010 tags) ?

Thanks in advance

#3

Updated by T Modes about 8 years ago

Find attached a modified patch, which should now correctly display the wrong tag values.

Concerning the double Baby age tags:
  • maybe the cam writes the values twice
  • or can can have 2 baby ages for different children in the cam.
#4

Updated by Nicolas Nicofo about 8 years ago

Thank you, it's better !! But it can still better. Here are a few remarks:

1) Exif.Panasonic.InternalSerialNumber -> should also use your printPanasonicText function (panasonicmn.cpp line 405)

2) Exif.Panasonic.ProgramISO displays '65534' instead of 'Intellent ISO' (according to exiftool) (see example on picture [1])

3) if not set, Exif.Panasonic.TravelDay displays '65535' instead of 'not set' [1] ; otherwise it displays the correct number of days

4) the Face Detection information is not correctly displayed. I have seen 3 exif tags:
4.1) Exif.Panasonic.FacesDetected -> number of detected faces: OK (there are 2 in the picture given as example in [1])
4.2) Exif.Panasonic.FaceDetInfo -> it is a list of the position of the faces on the picture
4.3) Exif.Panasonic.FaceRecInfo -> it is a list of information concerning the recognized persons: each recognized person has his Age + Name + position on the picture
Points 4.2 and 4.3 are not shown with exiv2.
For information, exiftool output for [1] is:

exiftool Desktop/TEST_FACE_DETECTION.jpg | grep -i face
File Name                       : TEST_FACE_DETECTION.jpg
AF Area Mode                    : Face Detect
Faces Detected                  : 2
Num Face Positions              : 2
Face 1 Position                 : 92 110 25 25
Face 2 Position                 : 251 103 24 24
Faces Recognized                : 2
Recognized Face 1 Name          : POUTINE
Recognized Face 1 Position      : 92 110 25 25
Recognized Face 1 Age           : 0009:00:05 00:00:00     '9 year old, 0 month, 5 days: it is correct since I have not put the correct age in my camera ;-)
Recognized Face 2 Name          : OBAMA
Recognized Face 2 Position      : 251 103 24 24
Recognized Face 2 Age           : 0015:04:00 00:00:00

5) Exif.Panasonic.TimeSincePowerOn not correctly diplayed (shows the time in milliseconds instead of a readable format in hour/minute/second). Just to try, I have add the following function 'printTimeSincePowerOn' in panasonicmn.cpp following your 'printPanasonicText' function (+ added it on line 409 + in panasonicmn_int.hpp file).
And it works (but needs amelioration to have a better format). For [1], it outputs "0:4:31.48" (instead of "00:04:31.48")

    std::ostream& PanasonicMakerNote::printTimeSincePowerOn(std::ostream& os,
                                                  const Value& value,
                                                  const ExifData*)
    {
    //if(value.size()>0 ) //not needed ?
        //{
        long time=value.toLong();
        //TODO: add something like  <<std::setw(2)<<std::setfill('0') to format the output
        os << time/360000<<":"<<(time%360000)/6000<<":"<<(time%6000)/100<<"."<<time%100;
        return os;
        //}
        //else
        //{
        //    return os << value;
        //};
    } // PanasonicMakerNote::printTimeSincePowerOn

[1] > see example on the picture http://nicofo.tuxfamily.org/tmp/TEST_FACE_DETECTION.jpg where I have added the face detection of Poutine and Obama ;)

#5

Updated by T Modes about 8 years ago

A further improved patch.

Points 1, 2, 3 and 5 are fixed.

The face detection information is a little bit more complicated. It is saved as sub tags. This requires some more changes. But I'm not so firm with the exiv2 code base to write this code. So I leave this point open.

#6

Updated by Nicolas Nicofo about 8 years ago

Excellent, thanks again, it works as expected, I have no other remark except concerning the "baby age2": you changed the second 'BabyAge' into 'BabyAge2': maybe you should also change the description i.e. 'Baby (or pet) age' -> 'Baby (or pet) age2'. Rem: exiftool has only one tag 'Baby age'.

For the Face detection information, I can eventually fill a new bug report so that this one can be closed. I don't know if it is useful ??? (eventually to have your patch included in the next release of exiv2 even if Face Detection is not fixed)

#7

Updated by T Modes about 8 years ago

I extended the patch with some newly decoded tag values.

#8

Updated by Nicolas Nicofo about 8 years ago

Thanks again.

1) Concerning your last patch, is it normal that I don't see any RollAngle nor PitchAngle tags using exiv2 ? (maybe it's just my camera that don't handle them ?)
I see well the other tags you added (Accelerometer...)

2) There is a slight improvement to do: there are several tags that have the same description which is a little bit confusing.
For instance digikam displays 4 tags "Text Stamp" :-( It would be better if it states "Text stamp 1" ; "Text Stamp 2" ; ...)

This concerns the following tags:
- Baby Age 1,2
- Text Stamp 1,2,3,4
- Transform 1,2

I have updated your patch to add a number (so "Text stamp" becomes "Text stamp 1" etc.)

#9

Updated by Andreas Huggel almost 8 years ago

  • Category set to metadata
  • Status changed from New to Assigned
  • Assignee set to Andreas Huggel
  • Target version set to 0.25
#10

Updated by T Modes almost 8 years ago

Attached a version with some more tags.

Concerning the tags with the same name: it seems they are duplicate information. But I don't know how exiv2 should handle them.

#11

Updated by Nicolas Nicofo almost 8 years ago

Thank you.
Concerning the tag 0x003d "Advanced Scene Type" you just added, you just use the 'printValue' method to display it. As a result a code (1 to 14) is displayed. Here are the information that should be printed (instead of the number):

1    normal        Normal
2    outdoor        Outdoor/Illuminations/Flower/HDR Art
3    indoor        Indoor/Architecture/Objects/HDR B&W
4    creative    Creative
5    auto        Auto
7    expressive    Expressive
8    retro        Retro
9    pure        Pure
10    elegant        Elegant
12    monochrome    Monochrome
13    dynamic        Dynamic Art
14    silhouette    Silhouette

(I found the information http://www.hugsan.com/exifutils/exifutils-fieldref.pdf page 111 and can confirm it, at least for the common 1, 4 and 5 modes)

Rem: I have updated your patch to swap baby age 1 and 2 (according to the same pdf and other programs) and add a number (so "Text stamp" becomes "Text stamp 1" etc.)

#12

Updated by T Modes almost 8 years ago

According to http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Panasonic.html the tag 0x003d can contain more values and should be seen with tag 0x8001 SceneMode (see composite tag AdvancedSceneMode). Your implementation covers only a small subset of the values. So I don't agree with your changes.

#13

Updated by Nicolas Nicofo almost 8 years ago

Yes, I had seen your page too, but what I read there did not correspond to my pictures metadata (or all the combinations of 003d and 8001 are not listed).
Unless I don't interpret it correctly.

For instance, for a picture made using full automatic control (and where the camera detects a night scene), I have:
- Advanced Scene Type = 5
- Scene Mode = "Handheld Night Shot" (55)

For another picture made using the scene mode 'night scene', I have:
- Advanced Scene Type = 1
- Scene Mode = "Handheld Night Shot" (55)

-> How should I understand that with your table ?

#14

Updated by T Modes almost 8 years ago

or all the combinations of 003d and 8001 are not listed

That may be. So if you found other combination report them also to Phil Harvey from ExifTool.

Just one example:
- Advanced Scene Type = 3
can mean
- Indoor Portrait
- Architecture
- Indoor Sports
- Object
- HDR B&W
- High Key
- Color Select
- Old Day
depending on the value of SceneMode. (At least these are the already decoded combinations. Not all combinations are used by all cameras. The possible combination depends on the actual camera model.)
So which value should be printed for tag AdvancedSceneType? All like in your example? This would not be helpful.

#15

Updated by Nicolas Nicofo almost 8 years ago

I have made some tests with my camera (TZ40) and I have listed all the tags for the 'creative control' mode (and also the common values for the other modes: full automatic (iA), Program (P), Aperture (A)/Shutter (S) priority and scene mode (SCN).
-> See document ods attached.
(Rem: also the patch from my comment #11 that I have forgotten to attach)

#17

Updated by Nicolas Nicofo over 7 years ago

Hi,
I have added a new tag ('City') to the new metadata list (see http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,5997.0.html for detail).
Here is the new patch.

#18

Updated by Niels Kristian Bech Jensen about 7 years ago

  • Assignee changed from Andreas Huggel to Niels Kristian Bech Jensen
#19

Updated by T Modes about 7 years ago

Hi,
I don't agree with the last version of the patch.
The tag 0x6d is used for the "City" tag. All (previous) models are using this nomenclature.
Only for the newer TZ40 the meaning changed and the city tag moved to 0x80 and tag 0x6d is used for the county.
So this version would not so fine for all (older) cameras.

So maybe City for 0x6d and City2 for 0x80 is more appreciate (and also used by exiftool).

#20

Updated by Niels Kristian Bech Jensen about 7 years ago

  • Due date set to 08 Sep 2014
  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Thanks to all for patches and input. I have submitted the latest patch with the County->City and City->City2 changes. I prefer to follow ExifTool in these matters.

Please test and report any issues.

Best regards,
Niels Kristian Bech Jensen

#21

Updated by Andreas Huggel over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF