Summary: | sensitivity is not shown for rw2 files | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | S. Burmeister <sven.burmeister> |
Component: | Metadata-Raw | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ahuggel, caulier.gilles, matze |
Priority: | NOR | ||
Version: | 0.10.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.0.0 | |
Sentry Crash Report: | |||
Attachments: |
sensible information for RW2 files
drop JPEG engine tags on rw2 files |
Description
S. Burmeister
2009-01-26 19:36:31 UTC
metadata are extracted using Exiv2, not dcraw. Look how exiv2 command line tool work... Gilles Caulier exiv2 pr p1000209.rw2 ate Photos/2009-01-06 Bochum hin und zurü Warning: Directory Image, entry 0x0111: Strip 0 is outside of the data area; ignored. File name : p1000209.rw2 File size : 12335616 Bytes MIME type : image/x-raw Image size : 3656 x 2742 Camera make : Panasonic Camera model : DMC-LX3 Image timestamp : 2009:01:06 12:36:57 Image number : Exposure time : 1/1600 s Aperture : F8 Exposure bias : 0 EV Flash : No, compulsory Flash bias : Focal length : 12.8 mm Subject distance: ISO speed : Exposure mode : Auto Metering mode : Multi-segment Macro mode : Image quality : Exif Resolution : White balance : Thumbnail : None Copyright : Exif comment : I just noticed, why are the image sizes shown by dcraw and exiv2 not the same? (In reply to comment #2) Does libexiv2 v0.18 even support rw2 files fully? I had to pull a very recent version from svn to make it work (I'm using a Pana DMC-G1). No. Exiv2 0.18 do not support RW2. Only current code from svn support it (included in next Exiv2 release) Gilles Caulier Re comment #3: Which one is correct? Can you show the output of exiv2 -pa too? -ahu. exiv2 -pa p1000209.rw2 Warning: Directory Image, entry 0x0111: Strip 0 is outside of the data area; ignored. Exif.Image.0x0001 Undefined 4 48 51 49 48 Exif.Image.0x0002 Short 1 3724 Exif.Image.0x0003 Short 1 2754 Exif.Image.0x0004 Short 1 6 Exif.Image.0x0005 Short 1 8 Exif.Image.0x0006 Short 1 2742 Exif.Image.0x0007 Short 1 3656 Exif.Image.0x0008 Short 1 1 Exif.Image.0x0009 Short 1 4 Exif.Image.0x000a Short 1 12 Exif.Image.ProcessingSoftware Short 1 34316 Exif.Image.0x000d Short 1 1 Exif.Image.0x000e Short 1 4095 Exif.Image.0x000f Short 1 4095 Exif.Image.0x0010 Short 1 4095 Exif.Image.0x0017 Short 1 80 Exif.Image.0x0018 Short 1 0 Exif.Image.0x0019 Short 1 0 Exif.Image.0x001a Short 1 0 Exif.Image.0x001b Undefined 26 3 0 100 0 1 0 1 0 1 0 200 0 2 0 2 0 2 0 144 1 4 0 4 0 4 0 Exif.Image.0x001c Short 1 0 Exif.Image.0x001d Short 1 0 Exif.Image.0x001e Short 1 0 Exif.Image.0x0024 Short 1 502 Exif.Image.0x0025 Short 1 263 Exif.Image.0x0026 Short 1 451 Exif.Image.0x0027 Undefined 58 7 0 9 0 242 1 0 1 177 1 10 0 34 2 0 1 148 1 11 0 95 2 0 1 117 1 3 0 79 1 0 1 93 2 4 0 52 2 0 1 138 1 20 0 1 2 0 1 182 1 24 0 79 1 0 1 93 2 Exif.Image.0x002d Short 1 4 Exif.Image.0x002e Undefined 603136 (Binäre Werte sind unterdrückt) Exif.Image.Make Ascii 10 Panasonic Exif.Image.Model Ascii 8 DMC-LX3 Exif.Image.StripOffsets Long 1 4294967295 Exif.Image.Orientation Short 1 oben - links Exif.Image.RowsPerStrip Short 1 2754 Exif.Image.StripByteCounts Long 1 20511792 Exif.Image.0x0118 Long 1 604672 Exif.Image.0x0119 Undefined 32 51 164 85 132 119 0 0 0 239 255 0 0 120 2 1 0 123 2 103 0 1 1 72 0 232 8 91 2 240 60 17 106 Exif.Image.XResolution Short 1 1 Exif.Image.YResolution Undefined 64 91 Exif.Image.ExifTag Long 1 708 Exif.Photo.ExposureTime Rational 1 1/1600 s Exif.Photo.FNumber Rational 1 F8 Exif.Photo.ExposureProgram Short 1 Automatisch Exif.Photo.ExifVersion Undefined 4 2.21 Exif.Photo.DateTimeOriginal Ascii 20 2009:01:06 12:36:57 Exif.Photo.DateTimeDigitized Ascii 20 2009:01:06 12:36:57 Exif.Photo.ExposureBiasValue SRational 1 0 EV Exif.Photo.MaxApertureValue Rational 1 F2 Exif.Photo.MeteringMode Short 1 Mehr-Segment Exif.Photo.Flash Short 1 Blitz nicht ausgelöst, festgelegter Modus Exif.Photo.FocalLength Rational 1 12.8 mm Exif.Photo.FileSource Undefined 1 Digitalkamera rabauke@linux-fpxk:/media/Bueffel/Bilder/Private Photos/2009-01-06 Bochum hin und zurück> export LANG=en_US.UTF-8 rabauke@linux-fpxk:/media/Bueffel/Bilder/Private Photos/2009-01-06 Bochum hin und zurück> exiv2 -pa p1000209.rw2 Warning: Directory Image, entry 0x0111: Strip 0 is outside of the data area; ignored. Exif.Image.0x0001 Undefined 4 48 51 49 48 Exif.Image.0x0002 Short 1 3724 Exif.Image.0x0003 Short 1 2754 Exif.Image.0x0004 Short 1 6 Exif.Image.0x0005 Short 1 8 Exif.Image.0x0006 Short 1 2742 Exif.Image.0x0007 Short 1 3656 Exif.Image.0x0008 Short 1 1 Exif.Image.0x0009 Short 1 4 Exif.Image.0x000a Short 1 12 Exif.Image.ProcessingSoftware Short 1 34316 Exif.Image.0x000d Short 1 1 Exif.Image.0x000e Short 1 4095 Exif.Image.0x000f Short 1 4095 Exif.Image.0x0010 Short 1 4095 Exif.Image.0x0017 Short 1 80 Exif.Image.0x0018 Short 1 0 Exif.Image.0x0019 Short 1 0 Exif.Image.0x001a Short 1 0 Exif.Image.0x001b Undefined 26 3 0 100 0 1 0 1 0 1 0 200 0 2 0 2 0 2 0 144 1 4 0 4 0 4 0 Exif.Image.0x001c Short 1 0 Exif.Image.0x001d Short 1 0 Exif.Image.0x001e Short 1 0 Exif.Image.0x0024 Short 1 502 Exif.Image.0x0025 Short 1 263 Exif.Image.0x0026 Short 1 451 Exif.Image.0x0027 Undefined 58 7 0 9 0 242 1 0 1 177 1 10 0 34 2 0 1 148 1 11 0 95 2 0 1 117 1 3 0 79 1 0 1 93 2 4 0 52 2 0 1 138 1 20 0 1 2 0 1 182 1 24 0 79 1 0 1 93 2 Exif.Image.0x002d Short 1 4 Exif.Image.0x002e Undefined 603136 (Binary value suppressed) Exif.Image.Make Ascii 10 Panasonic Exif.Image.Model Ascii 8 DMC-LX3 Exif.Image.StripOffsets Long 1 4294967295 Exif.Image.Orientation Short 1 top, left Exif.Image.RowsPerStrip Short 1 2754 Exif.Image.StripByteCounts Long 1 20511792 Exif.Image.0x0118 Long 1 604672 Exif.Image.0x0119 Undefined 32 51 164 85 132 119 0 0 0 239 255 0 0 120 2 1 0 123 2 103 0 1 1 72 0232 8 91 2 240 60 17 106 Exif.Image.XResolution Short 1 1 Exif.Image.YResolution Undefined 64 91 Exif.Image.ExifTag Long 1 708 Exif.Photo.ExposureTime Rational 1 1/1600 s Exif.Photo.FNumber Rational 1 F8 Exif.Photo.ExposureProgram Short 1 Auto Exif.Photo.ExifVersion Undefined 4 2.21 Exif.Photo.DateTimeOriginal Ascii 20 2009:01:06 12:36:57 Exif.Photo.DateTimeDigitized Ascii 20 2009:01:06 12:36:57 Exif.Photo.ExposureBiasValue SRational 1 0 EV Exif.Photo.MaxApertureValue Rational 1 F2 Exif.Photo.MeteringMode Short 1 Multi-segment Exif.Photo.Flash Short 1 No, compulsory Exif.Photo.FocalLength Rational 1 12.8 mm Exif.Photo.FileSource Undefined 1 Digital still camera dcraw repport a lots of possible image sizes from metadata: Thumb size: 1920 x 1440 The jpeg preview image embeded in RAW. Full size: 3724 x 2754 Image size: 3724 x 2754 Output size: 3724 x 2754 Here these values are the same, but can be different between camera model. dcraw take a care of frame abound RAW data image. Some pixels lines are not used around CCD sensor, for technical reasons. This is why you can see 3 image sizes. Gilles Caulier exiv2 -pp should also report the thumbnail image (with -ep you can extract it) There are two pairs of tags in the Panasonic images which look like size tags, but I'm not yet sure what exactly they mean: Exif.Image.0x0002 Short 1 3724 Exif.Image.0x0003 Short 1 2754 and Exif.Image.0x0006 Short 1 2742 Exif.Image.0x0007 Short 1 3656 The first two contain the same numbers as those shown by dcraw, maybe I should use these as the pixel size values. Any suggestions as to the meaning of these tags from the Panasonic camera owners? Can you confirm which pair corresponds to the actual image size? -ahu. 0x0002 and 0x0003 according to exiftool are the sensor width and height, while 0x0006 and 0x0007 are Image height and width. 0x0004 is sensor top border, 0x0005 is sensor left border. Now, for my camera this is as follows: Exif.Image.0x0002 Short 1 4060 Exif.Image.0x0003 Short 1 3016 Exif.Image.0x0004 Short 1 4 Exif.Image.0x0005 Short 1 8 Exif.Image.0x0006 Short 1 3004 Exif.Image.0x0007 Short 1 4008 I would have assumed that sensor height - 2* top border = image height, but as you can see the numbers don't add up. The out-of-camera JPEGs are 4000x3000, which corresponds to (image height - top border) x (image width - left border). I think now that the tags 0x4 to 0x7 are only hints for the processing software about how many usable pixels are there. The raw image is probably the size of the sensor, so I'm tempted to say 0x2 and 0x3 are the correct raw image size. its then up to the processor to chose a suitable portion of the sensor area. regards, matthias what about the original issue of sensitivity now showing/being extracted? This is a question for Andreas (:=))) Gilles You mean the ISO value, right? Apparently it is the value of Exif.Image.0x0017, i.e., it is decoded but the tag doesn't have a name. The RW2 decoding code in Exiv2 is not complete yet. Many of these Exif.Image.* tags don't have names (some even have wrong names currently) because I'm simply using the standard IFD0 tag table, instead of a new Panasonic RAW image specific tag table. Also, and a bit more difficult to get at, most of the Exif data is embedded in the JPEG preview image of the RW2 image. But no worries, we'll get there too. -ahu. Seems o, yes. At least http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Panasonic.html and http://search.cpan.org/~exiftool/Image-ExifTool-7.60/lib/Image/ExifTool/TagNames.pod#Panasonic_Raw_Tags list that address as the ISO speed aka sensitivity in digikam. The latest revision in the Exiv2 repository improves RW2 decoding: http://dev.exiv2.org/repositories/revision/exiv2/1740 + there is now a dedicated tag table for the IFD0 tags in these images + additional Exif data from the embedded preview image is decoded The ISO speed is now labeled but there is still no lens information. Chances are that it's there somewhere just not yet reverse-engineered. I appreciate if you test with more RW2 images but also all other formats. -ahu. (In reply to comment #15) > The latest revision in the Exiv2 repository improves RW2 decoding: > http://dev.exiv2.org/repositories/revision/exiv2/1740 > + there is now a dedicated tag table for the IFD0 tags in these images > + additional Exif data from the embedded preview image is decoded > > The ISO speed is now labeled but there is still no lens information. Chances > are that it's there somewhere just not yet reverse-engineered. I didn't find any lens information inside the RW2 tags (not in clear text anyway), but since you are fetching Exif data from the embedded preview image anyway, chances are you'll find it there. For the Lumix G1, the lens model and serial number are encoded in the maker notes, tag 0x0051 and 0x0052. There are of course chances the lens information is also available in some binary encoded format. Also, there is still that rumor about lens defect correction data embedded in the RW2 files... Yes, these lens tags are there: ahuggel@mowgli> ./exiv2 -PEkycxt P1010158.RW2 | grep -e 0x005[12] -e Exif.PanasonicRaw.Model 0x0110 Exif.PanasonicRaw.Model Ascii 7 DMC-G1 0x0051 Exif.Panasonic.LensType Ascii 34 LUMIX G VARIO 14-45/F3.5-5.6 0x0052 Exif.Panasonic.LensSerialNumber Ascii 14 08SG1171038 But images from some other models don't have these tags (eg, DMC-LX3, DMC-FZ28). -ahu. (In reply to comment #17) > Yes, these lens tags are there: > > ahuggel@mowgli> ./exiv2 -PEkycxt P1010158.RW2 | grep -e 0x005[12] -e > Exif.PanasonicRaw.Model > 0x0110 Exif.PanasonicRaw.Model Ascii 7 DMC-G1 > 0x0051 Exif.Panasonic.LensType Ascii 34 LUMIX G > VARIO 14-45/F3.5-5.6 > 0x0052 Exif.Panasonic.LensSerialNumber Ascii 14 08SG1171038 > > But images from some other models don't have these tags (eg, DMC-LX3, > DMC-FZ28). > The DMC-LX3 has a fixed lens, Leica DC Vario-Summicron, the DMC-FZ28 has also a fixed lens, Leica DC Vario-Elmarit. Maybe that's the reason why it's not encoded in the files... Sensitivity works now, the lens is simply not available for the LX3 I guess. Thanks a lot for fixing! (In reply to comment #15) > The latest revision in the Exiv2 repository improves RW2 decoding: > http://dev.exiv2.org/repositories/revision/exiv2/1740 > + there is now a dedicated tag table for the IFD0 tags in these images > + additional Exif data from the embedded preview image is decoded > > The ISO speed is now labeled but there is still no lens information. Chances > are that it's there somewhere just not yet reverse-engineered. > > I appreciate if you test with more RW2 images but also all other formats. > I've tested the new release, there's much more information now extracted from the RW2 files. However, a bit too many. Not all data from the embedded preview image applies to the raw data, for example: White balance information - doesn't apply to raw data, the processing software needs to apply that Sharpness, Contrast, Saturation, Film mode - also not applicable to RAW data, these are attributes of the cameras' JPEG rendering process Digital Zoom - also not applicable to RAW data. It should display "0" anyway, I think no camera allows enabling digital zoom while shooting RAW. Not a comprehensive list, I'll make one this weekend. > -ahu. > Created attachment 31080 [details]
sensible information for RW2 files
Comment on attachment 31080 [details]
sensible information for RW2 files
I've made a list of tags with sensible information for RW2 files. All tags are marked with KEEP or DROP. I've not commented on undecoded tags
Created attachment 31114 [details]
drop JPEG engine tags on rw2 files
This is the patch implementing dropping my suggested list of JPEG engine tags from the exif data.
Andreas, Look comment #23, it's a patch for Exiv2 Gilles Thanks, Matthias! The patch looks good, I'll apply it tonight. It will pose a challenge once we can write to RW2 images though, as the current logic doesn't have any provision to ignore tags. But we can worry about this later. -ahu. Not reproducible with digiKam 7.0.0-beta1. |