metadata-extractor icon indicating copy to clipboard operation
metadata-extractor copied to clipboard

Panasonic RW2 metadata does not show Lens

Open TSGames opened this issue 8 years ago • 6 comments

When parsing all data from a sample rw2 file, no tag shows the lens used although other metadata parsers can read it. All tags extracted by metadata-extractor (downloaded today, version 2.9.1):

Exif IFD0 Interoperability Index 0x0001: Unknown (48 51 49 48) Exif IFD0 Interoperability Version 0x0002: ? Exif IFD0 Unknown tag (0x0003) 0x0003: 3472 Exif IFD0 Unknown tag (0x0004) 0x0004: 4 Exif IFD0 Unknown tag (0x0005) 0x0005: 8 Exif IFD0 Unknown tag (0x0006) 0x0006: 3460 Exif IFD0 Unknown tag (0x0007) 0x0007: 4616 Exif IFD0 Unknown tag (0x0008) 0x0008: 1 Exif IFD0 Unknown tag (0x0009) 0x0009: 4 Exif IFD0 Unknown tag (0x000a) 0x000a: 12 Exif IFD0 Unknown tag (0x000b) 0x000b: 34316 Exif IFD0 Unknown tag (0x000d) 0x000d: 1 Exif IFD0 Unknown tag (0x000e) 0x000e: 3967 Exif IFD0 Unknown tag (0x000f) 0x000f: 3967 Exif IFD0 Unknown tag (0x0010) 0x0010: 3967 Exif IFD0 Unknown tag (0x0017) 0x0017: 160 Exif IFD0 Unknown tag (0x0018) 0x0018: 0 Exif IFD0 Unknown tag (0x0019) 0x0019: 0 Exif IFD0 Unknown tag (0x001a) 0x001a: 0 Exif IFD0 Unknown tag (0x001b) 0x001b: [42 values] Exif IFD0 Unknown tag (0x001c) 0x001c: 0 Exif IFD0 Unknown tag (0x001d) 0x001d: 0 Exif IFD0 Unknown tag (0x001e) 0x001e: 0 Exif IFD0 Unknown tag (0x0024) 0x0024: 781 Exif IFD0 Unknown tag (0x0025) 0x0025: 263 Exif IFD0 Unknown tag (0x0026) 0x0026: 399 Exif IFD0 Unknown tag (0x0027) 0x0027: [58 values] Exif IFD0 Unknown tag (0x0029) 0x0029: [36 values] Exif IFD0 Unknown tag (0x002a) 0x002a: [32 values] Exif IFD0 Unknown tag (0x002b) 0x002b: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Exif IFD0 Unknown tag (0x002c) 0x002c: [72 values] Exif IFD0 Unknown tag (0x002d) 0x002d: 4 Exif IFD0 Unknown tag (0x002e) 0x002e: [539648 values] Exif IFD0 Make 0x010f: Panasonic Exif IFD0 Model 0x0110: DMC-GH2 Exif IFD0 Strip Offsets 0x0111: 4294967295 Exif IFD0 Orientation 0x0112: Top, left side (Horizontal / normal) Exif IFD0 Rows Per Strip 0x0116: 3472 rows/strip Exif IFD0 Strip Byte Counts 0x0117: 0 bytes Exif IFD0 Minimum Sample Value 0x0118: 541696 Exif IFD0 Maximum Sample Value 0x0119: [32 values] Exif IFD0 X Resolution 0x011a: 2 dots per unit Exif IFD0 Y Resolution 0x011b: null Exif SubIFD Exposure Time 0x829a: 1/80 sec Exif SubIFD F-Number 0x829d: f/5,8 Exif SubIFD Exposure Program 0x8822: Program normal Exif SubIFD Exif Version 0x9000: 2.30 Exif SubIFD Date/Time Original 0x9003: 2016:07:01 21:55:15 Exif SubIFD Date/Time Digitized 0x9004: 2016:07:01 21:55:15 Exif SubIFD Exposure Bias Value 0x9204: -33/100 EV Exif SubIFD Max Aperture Value 0x9205: f/5,8 Exif SubIFD Metering Mode 0x9207: Multi-segment Exif SubIFD Flash 0x9209: Flash fired Exif SubIFD Focal Length 0x920a: 78 mm Exif SubIFD File Source 0xa300: Digital Still Camera (DSC) File File Name 0x0001: P1090688.RW2 File File Size 0x0002: 19432448 bytes File File Modified Date 0x0003: Mo Jul 11 16:45:12 +02:00 2016

Metadata extracted by ExifTool:

ExifTool Version Number : 10.00 File Name : P1090688.RW2 Directory : . File Size : 19 MB File Modification Date/Time : 2016:07:01 22:55:15+02:00 File Access Date/Time : 2016:07:03 16:18:49+02:00 File Inode Change Date/Time : 2016:07:01 22:41:29+02:00 File Permissions : rwx------ File Type : RW2 File Type Extension : rw2 MIME Type : image/x-panasonic-rw2 Exif Byte Order : Little-endian (Intel, II) Panasonic Raw Version : 0310 Sensor Width : 4760 Sensor Height : 3472 Sensor Top Border : 4 Sensor Left Border : 8 Sensor Bottom Border : 3460 Sensor Right Border : 4616 Black Level 1 : 1 Black Level 2 : 4 Black Level 3 : 12 Linearity Limit Red : 3967 Linearity Limit Green : 3967 Linearity Limit Blue : 3967 ISO : 160 High ISO Multiplier Red : 0 High ISO Multiplier Green : 0 High ISO Multiplier Blue : 0 Black Level Red : 0 Black Level Green : 0 Black Level Blue : 0 WB Red Level : 781 WB Green Level : 263 WB Blue Level : 399 Num WB Entries : 7 WB Type 1 : Fine Weather WB RGB Levels 1 : 611 256 427 WB Type 2 : Cloudy WB RGB Levels 2 : 643 256 403 WB Type 3 : Shade WB RGB Levels 3 : 694 256 379 WB Type 4 : Tungsten (Incandescent) WB RGB Levels 4 : 415 256 613 WB Type 5 : Flash WB RGB Levels 5 : 700 256 375 WB Type 6 : D55 WB RGB Levels 6 : 573 256 429 WB Type 7 : ISO Studio Tungsten WB RGB Levels 7 : 415 256 613 X Resolution : 180 Y Resolution : 180 Resolution Unit : inches Software : Ver.1.1 Modify Date : 2016:07:01 21:55:15 Y Cb Cr Positioning : Co-sited Sensitivity Type : Standard Output Sensitivity Components Configuration : Y, Cb, Cr, - Compressed Bits Per Pixel : 2 Light Source : Flash Image Quality : Raw Firmware Version : 0.1.1.0 White Balance : Auto Focus Mode : AF-S AF Area Mode : 1-area Image Stabilization : On, Mode 2 Macro Mode : Off Shooting Mode : Program Audio : No Data Dump : (Binary data 6152 bytes, use -b option to extract) Flash Bias : 0 Internal Serial Number : (X04) 2011:03:18 no. 0092 Panasonic Exif Version : 0330 Color Effect : Off Time Since Power On : 00:01:07.39 Burst Mode : Off Sequence Number : 0 Contrast Mode : High Noise Reduction : Standard Self Timer : Off Rotation : Horizontal (normal) AF Assist Lamp : Fired Color Mode : Normal Baby Age : (not set) Optical Zoom Mode : Standard Conversion Lens : Off Travel Day : n/a Contrast : Normal World Time Location : Home Text Stamp : Off Program ISO : n/a Advanced Scene Type : 1 Faces Detected : 0 Saturation : Normal Sharpness : Normal Film Mode : Standard (color) Color Temp Kelvin : 3500 Bracket Settings : No Bracket WB Shift AB : 0 WB Shift GM : -3 Flash Curtain : 1st Long Exposure Noise Reduction : On Panasonic Image Width : 4608 Panasonic Image Height : 3456 AF Point Position : 0.5 0.5 Num Face Positions : 0 Lens Type : LUMIX G VARIO 14-140/F4.0-5.8 Lens Serial Number : 11030500911 Accessory Type : NO-ACCESSORY Accessory Serial Number : 0000000 Lens Firmware Version : 0.1.4.0 Faces Recognized : 0 Title : Baby Name : Location : Intelligent Resolution : Off Burst Speed : 0 Intelligent D-Range : Off Maker Note Version : 0136 Scene Mode : Off Flash Fired : Yes Flashpix Version : 0100 Color Space : sRGB Exif Image Width : 1920 Exif Image Height : 1440 Interoperability Index : R98 - DCF basic file (sRGB) Interoperability Version : 0100 Sensing Method : One-chip color area Scene Type : Directly photographed Custom Rendered : Normal Exposure Mode : Auto Digital Zoom Ratio : 0 Focal Length In 35mm Format : 156 mm Scene Capture Type : Standard Gain Control : Low gain up PrintIM Version : 0250 Compression : JPEG (old-style) Thumbnail Offset : 11776 Thumbnail Length : 5002 Encoding Process : Baseline DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:2:2 (2 1) Jpg From Raw : (Binary data 539648 bytes, use -b option to extract) Make : Panasonic Camera Model Name : DMC-GH2 Strip Offsets : 4294967295 Orientation : Horizontal (normal) Rows Per Strip : 3472 Strip Byte Counts : 0 Raw Data Offset : 541696 Distortion Param 02 : 0.018707275390625 Distortion Param 04 : 0.00238037109375 Distortion Scale : 1 Distortion Correction : On Distortion Param 08 : 0.015350341796875 Distortion Param 09 : 0.001251220703125 Distortion Param 11 : 0.000885009765625 Exposure Time : 1/80 F Number : 5.8 Exposure Program : Program AE Exif Version : 0230 Date/Time Original : 2016:07:01 21:55:15 Create Date : 2016:07:01 21:55:15 Exposure Compensation : -0.33 Max Aperture Value : 5.8 Metering Mode : Multi-segment Flash : On, Fired Focal Length : 78.0 mm File Source : Digital Camera Advanced Scene Mode : Off Aperture : 5.8 Blue Balance : 1.51711 Image Height : 3456 Image Width : 4608 Lens ID : LUMIX G VARIO 14-140mm F4.0-5.8 Red Balance : 2.969582 Scale Factor To 35 mm Equivalent: 2.0 Shutter Speed : 1/80 Thumbnail Image : (Binary data 5002 bytes, use -b option to extract) Circle Of Confusion : 0.015 mm Field Of View : 13.2 deg Focal Length : 78.0 mm (35 mm equivalent: 156.0 mm) Hyperfocal Distance : 69.82 m Image Size : 4608x3456 Light Value : 10.7 Megapixels : 15.9

As shown, a lot more tags are read (especially the "Lens Type" which I'm particulary looking for). Is it possible to also read these tags?

The sample file is attached: P1090688.zip

TSGames avatar Jul 11 '16 14:07 TSGames

Actually there is very little support for the tags of RW2 in the library. It shouldn't be too hard to add them if you find a good reference.

There's already an issue for RW2 support: #17

drewnoakes avatar Jul 12 '16 22:07 drewnoakes

Hi, I'm glad to help if it's possible. However, I'm irritated since the data is not even found in the "Unknown" tags. Is there anything you can point me where I should start?

EDIT: I found out that tag 0x002e contains an Exif container where also the lens information is located, if that helps.

Regards Torsten

TSGames avatar Jul 14 '16 10:07 TSGames

I don't have any specific reference, and it's likely that there isn't an official one, but there are lots of online sources of information. The source of exiftool is available too.

Lens data is sometimes encoded as an ID to be looked up in a table of known values. There are some such tables in the project already for other manufacturers.

RAW files use TIFF, but generally use completely different tag definitions. Currently the library reuses the Exif tags for RAW files, which occasionally works but results in lots of unknown tags, and occasionally even mislabelled ones. The library will support new RW2 tags provided you make new directories/tags/descriptors.

drewnoakes avatar Jul 14 '16 19:07 drewnoakes

I believe this is fixed in #214 but please confirm.

kwhopper avatar Jan 25 '17 21:01 kwhopper

TSGames: "I found out that tag 0x002e contains an Exif container..."

In fact, it's tag corresponds to preview JPEG image with it own Exif. Exif IFD offset has tag 34665.

Theoristos avatar May 16 '17 18:05 Theoristos

ps: looks like some lens distortion data hides in 0х0119: http://thinkfat.blogspot.com/2009/02/dissecting-panasonic-rw2-files.html

Theoristos avatar May 16 '17 18:05 Theoristos