usage of XMP-CRS metadata (color correction)
Posted: 2012-06-05T07:42:59-07:00
Hi,
we're facing the problem of using DNG files with imagemagick.
It basically works through ufraw.
The first problem was to use the crop area defined in the metadata.
I've done it manually with convert options.
The second problem is to get the most exact preview of the file, with the color modifications. (The parameters are stored in the metadata)
Would it be technically possible to use those parameters ?
Here is the metadata, as seen by exiftool:
I can provide some DNG for test (I also have TIFF for seeing the expected result).
Thank you
we're facing the problem of using DNG files with imagemagick.
It basically works through ufraw.
The first problem was to use the crop area defined in the metadata.
I've done it manually with convert options.
The second problem is to get the most exact preview of the file, with the color modifications. (The parameters are stored in the metadata)
Would it be technically possible to use those parameters ?
Here is the metadata, as seen by exiftool:
Code: Select all
ExifTool Version Number : 8.65
File Name : 53254.dng
File Size : 20 MB
File Modification Date/Time : 2012:05:25 09:57:56+02:00
File Permissions : rw-rw-r--
File Type : DNG
MIME Type : image/x-adobe-dng
Exif Byte Order : Little-endian (Intel, II)
Make : Canon
Camera Model Name : Canon EOS 5D Mark II
Strip Offsets : 57452
Orientation : Rotate 270 CW
Rows Per Strip : 171
Strip Byte Counts : 131328
Software : Adobe Photoshop Lightroom 3.6
Modify Date : 2012:04:02 12:44:04
Image Width : 5792
Image Height : 3804
Bits Per Sample : 16
Compression : JPEG
Photometric Interpretation : Color Filter Array
Samples Per Pixel : 1
Planar Configuration : Chunky
Tile Width : 256
Tile Length : 256
Tile Offsets : (Binary data 2931 bytes, use -b option to extract)
Tile Byte Counts : (Binary data 2069 bytes, use -b option to extract)
CFA Repeat Pattern Dim : 2 2
CFA Pattern 2 : 0 1 1 2
CFA Plane Color : Red,Green,Blue
CFA Layout : Rectangular
Black Level Repeat Dim : 2 2
Black Level : 1024 1024 1024 1024
White Level : 15600
Default Scale : 1 1
Default Crop Origin : 10 5
Default Crop Size : 5616 3744
Bayer Green Split : 0
Anti Alias Strength : 1
Best Quality Scale : 1
Active Area : 51 158 3804 5792
Subfile Type : Reduced-resolution image
Preview Image Start : 188780
Preview Image Length : 37314
Y Cb Cr Coefficients : 0.299 0.587 0.114
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Y Cb Cr Positioning : Co-sited
Reference Black White : 0 255 128 255 128 255
XMP Toolkit : Adobe XMP Core 5.3-c007 1.136881, 2010/06/10-18:11:35
Date Created : 2012:03:30 12:00:17+02:00
Rating : 1
Metadata Date : 2012:04:02 12:45:06+02:00
Creator Tool : Adobe Photoshop Lightroom 3.6
Approximate Focus Distance : 7.27
Flash Compensation : 0
Firmware : 2.1.1
Document ID : xmp.did:0DFA840509206811822AB5421B1A4BB4
Original Document ID : E81D710CE0081E5A7FBE9C3E991CE66F
Instance ID : xmp.iid:DD7C3E6C17206811822AB5421B1A4BB4
Format : image/dng
Marked : True
Version : 6.6
Process Version : 5.7
Tint : +15
Exposure : +0.25
Shadows : 0
Brightness : +50
Sharpness : 75
Luminance Smoothing : 30
Color Noise Reduction : 100
Chromatic Aberration R : 0
Chromatic Aberration B : 0
Vignette Amount : 0
Shadow Tint : 0
Red Hue : +10
Red Saturation : 0
Green Hue : 0
Green Saturation : 0
Blue Hue : 0
Blue Saturation : 0
Fill Light : 30
Vibrance : +50
Highlight Recovery : 16
Clarity : +100
Defringe : 0
Hue Adjustment Red : -30
Hue Adjustment Orange : +13
Hue Adjustment Yellow : 0
Hue Adjustment Green : 0
Hue Adjustment Aqua : 0
Hue Adjustment Blue : 0
Hue Adjustment Purple : 0
Hue Adjustment Magenta : 0
Saturation Adjustment Red : -15
Saturation Adjustment Orange : +10
Saturation Adjustment Yellow : -50
Saturation Adjustment Green : 0
Saturation Adjustment Aqua : 0
Saturation Adjustment Blue : 0
Saturation Adjustment Purple : 0
Saturation Adjustment Magenta : 0
Luminance Adjustment Red : -30
Luminance Adjustment Orange : 0
Luminance Adjustment Yellow : 0
Luminance Adjustment Green : 0
Luminance Adjustment Aqua : 0
Luminance Adjustment Blue : 0
Luminance Adjustment Purple : 0
Luminance Adjustment Magenta : 0
Split Toning Shadow Hue : 0
Split Toning Shadow Saturation : 0
Split Toning Highlight Hue : 55
Split Toning Highlight Saturation: 20
Split Toning Balance : -100
Parametric Shadows : -100
Parametric Darks : 0
Parametric Lights : 0
Parametric Highlights : 0
Parametric Shadow Split : 25
Parametric Midtone Split : 50
Parametric Highlight Split : 75
Sharpen Radius : +1.0
Sharpen Detail : 25
Sharpen Edge Masking : 0
Post Crop Vignette Amount : +5
Post Crop Vignette Midpoint : 50
Post Crop Vignette Feather : 80
Post Crop Vignette Roundness : +10
Post Crop Vignette Style : 1
Grain Amount : 10
Grain Size : 5
Grain Frequency : 45
Luminance Noise Reduction Detail: 30
Color Noise Reduction Detail : 0
Luminance Noise Reduction Contrast: 30
Lens Profile Enable : 0
Lens Manual Distortion Amount : 0
Perspective Vertical : 0
Perspective Horizontal : 0
Perspective Rotate : 0.0
Perspective Scale : 100
Convert To Grayscale : False
Tone Curve Name : Medium Contrast
Camera Profile : Canon EOS 5D Mark II-ludo-v5
Camera Profile Digest : 3DA8CE4A626CE36A1D0C55BF157793C9
Lens Profile Setup : LensDefaults
Has Settings : True
Crop Top : 0.092401
Crop Left : 0.330953
Crop Bottom : 0.973387
Crop Right : 0.918277
Crop Angle : 0
Crop Constrain To Warp : 0
Has Crop : True
Already Applied : False
Raw File Name : M514193-36_Forme.dng
History Action : derived, saved, saved
History Parameters : converted from image/x-canon-cr2 to image/dng, saved to new location
History Instance ID : xmp.iid:0DFA840509206811822AB5421B1A4BB4, xmp.iid:DD7C3E6C17206811822AB5421B1A4BB4
History When : 2012:04:02 11:02:03+02:00, 2012:04:02 12:45:06+02:00
History Software Agent : Adobe Photoshop Lightroom 3.6 (Macintosh), Adobe Photoshop Lightroom 3.6 (Macintosh)
History Changed : /, /metadata
Derived From Document ID : E81D710CE0081E5A7FBE9C3E991CE66F
Derived From Original Document ID: E81D710CE0081E5A7FBE9C3E991CE66F
Exposure Time : 1/100
F Number : 10.0
Exposure Program : Manual
ISO : 100
Exif Version : 0230
Date/Time Original : 2012:03:30 12:00:17
Create Date : 2012:03:30 12:00:17
Shutter Speed Value : 1/100
Aperture Value : 10.0
Max Aperture Value : 1.8
Subject Distance : 7.27 m
Flash : Off, Did not fire
Focal Length : 85.0 mm
Sub Sec Time Original : 3
Sub Sec Time Digitized : 3
Focal Plane X Resolution : 3849.211789
Focal Plane Y Resolution : 3908.141962
Focal Plane Resolution Unit : inches
Custom Rendered : Normal
Exposure Mode : Manual
Scene Capture Type : Standard
Lens Info : 85mm f/?
GPS Version ID : 2.2.0.0
Image Number : 0
DNG Version : 1.3.0.0
DNG Backward Version : 1 1 0 0
Unique Camera Model : Canon EOS 5D Mark II
Color Matrix 1 : 0.6037 -0.025 -0.1038 -0.6898 1.4865 0.2165 -0.1756 0.2097 0.6776
Camera Calibration 1 : 1.0147 0 0 0 1 0 0 0 0.9855
Camera Calibration 2 : 1.0147 0 0 0 1 0 0 0 0.9855
Analog Balance : 1 1 1
As Shot Neutral : 0.448336 1 0.634842
Baseline Exposure : 0.4
Baseline Noise : 0.8
Baseline Sharpness : 1.2
Linear Response Limit : 1
Camera Serial Number : 3331615551
DNG Lens Info : 85mm f/?
Shadow Scale : 1
Macro Mode : Normal
Self Timer : Off
Quality : RAW
Canon Flash Mode : Off
Continuous Drive : Single
Focus Mode : One-shot AF
Record Mode : CR2
Canon Image Size : Unknown (-1)
Easy Mode : Manual
Digital Zoom : None
Contrast : Normal
Saturation : Normal
Metering Mode : Evaluative
Focus Range : Not Known
Canon Exposure Mode : Manual
Lens Type : Canon EF 85mm f/1.8 USM
Long Focal : 85 mm
Short Focal : 85 mm
Focal Units : 1/mm
Max Aperture : 1.8
Min Aperture : 23
Flash Activity : 0
Flash Bits : (none)
Zoom Source Width : 0
Zoom Target Width : 0
Manual Flash Output : n/a
Color Tone : Normal
SRAW Quality : n/a
Auto ISO : 100
Base ISO : 100
Measured EV : 6.62
Target Aperture : 10
Target Exposure Time : 1/102
Exposure Compensation : 0
White Balance : Manual Temperature (Kelvin)
Slow Shutter : None
Shot Number In Continuous Burst : 0
Optical Zoom Code : n/a
Camera Temperature : 24 C
Flash Guide Number : 0
Flash Exposure Compensation : 0
Auto Exposure Bracketing : Off
AEB Bracket Value : 0
Control Mode : Camera Local Control
Measured EV 2 : 6.625
Bulb Duration : 0
Camera Type : EOS High-end
ND Filter : n/a
Canon Image Type : Canon EOS 5D Mark II
Canon Firmware Version : Firmware Version 2.1.1
Owner Name :
Serial Number : 3331615551
Flash Metering Mode : Off
Camera Orientation : Rotate 270 CW
Focus Distance Upper : 11.91 m
Focus Distance Lower : 2.88 m
Firmware Version : 2.1.1
File Index : 8368
Directory Index : 100
Contrast Standard : 0
Sharpness Standard : 3
Saturation Standard : 0
Color Tone Standard : 0
Contrast Portrait : 0
Sharpness Portrait : 2
Saturation Portrait : 0
Color Tone Portrait : 0
Contrast Landscape : 0
Sharpness Landscape : 4
Saturation Landscape : 0
Color Tone Landscape : 0
Contrast Neutral : 0
Sharpness Neutral : 0
Saturation Neutral : 0
Color Tone Neutral : 0
Contrast Faithful : 0
Sharpness Faithful : 0
Saturation Faithful : 0
Color Tone Faithful : 0
Contrast Monochrome : 4
Sharpness Monochrome : 3
Filter Effect Monochrome : None
Toning Effect Monochrome : None
Contrast User Def 1 : 0
Sharpness User Def 1 : 3
Saturation User Def 1 : 4
Color Tone User Def 1 : 4
Filter Effect User Def 1 : None
Toning Effect User Def 1 : None
Contrast User Def 2 : 0
Sharpness User Def 2 : 3
Saturation User Def 2 : 0
Color Tone User Def 2 : 0
Filter Effect User Def 2 : None
Toning Effect User Def 2 : None
Contrast User Def 3 : 0
Sharpness User Def 3 : 3
Saturation User Def 3 : 0
Color Tone User Def 3 : 0
Filter Effect User Def 3 : None
Toning Effect User Def 3 : None
User Def 1 Picture Style : Standard
User Def 2 Picture Style : Standard
User Def 3 Picture Style : Standard
Canon Model ID : EOS 5D Mark II
Thumbnail Image Valid Area : 0 159 7 112
Serial Number Format : Format 2
AF Area Mode : Single-point AF
Num AF Points : 9
Valid AF Points : 9
Canon Image Width : 5616
Canon Image Height : 3744
AF Image Width : 5616
AF Image Height : 3744
AF Area Widths : 84 84 101 84 84 84 101 84 123
AF Area Heights : 101 101 74 101 101 101 74 101 131
AF Area X Positions : -1173 -561 0 561 1173 561 0 -561 0
AF Area Y Positions : 0 280 501 280 0 -280 -501 -280 0
AF Points In Focus : 8
AF Points Selected : 8
Original Decision Data Offset : 0
Bracket Mode : Off
Bracket Value : 0
Bracket Shot Number : 0
Raw Jpg Size : Large
Long Exposure Noise Reduction 2 : Off
WB Bracket Mode : Off
WB Bracket Value AB : 0
WB Bracket Value GM : 0
Live View Shooting : Off
Flash Exposure Lock : Off
Lens Model : EF85mm f/1.8 USM
Internal Serial Number :
Dust Removal Data : (Binary data 1024 bytes, use -b option to extract)
Crop Left Margin : 0
Crop Right Margin : 0
Crop Top Margin : 0
Crop Bottom Margin : 0
Exposure Level Increments : 1/3 Stop
ISO Speed Increments : 1/3 Stop
ISO Expansion : Off
AEB Auto Cancel : On
AEB Sequence : 0,-,+
Safety Shift : Disable
Flash Sync Speed Av : Auto
Long Exposure Noise Reduction : Off
High ISO Noise Reduction : Standard
Highlight Tone Priority : Disable
Auto Lighting Optimizer : Standard
Lens Drive No AF : Focus search on
Lens AF Stop Button : AF stop
AF Point Selection Method : Normal
Superimposed Display : On
AF Assist Beam : Emits
Mirror Lockup : Disable
AF Point Area Expansion : Disable
AF Microadjustment : Disable; 0; 0; 0; 0
Shutter Button AF On Button : Metering + AF start
AF On AE Lock Button Switch : Disable
Set Button When Shooting : Normal (disabled)
Dial Direction Tv Av : Normal
Focusing Screen : Eg-A
Add Original Decision Data : Off
Assign Func Button : LCD brightness
Aspect Ratio : 3:2
Cropped Image Width : 5616
Cropped Image Height : 3744
Tone Curve : Standard
Sharpness Frequency : n/a
Sensor Red Level : 0
Sensor Blue Level : 0
White Balance Red : 0
White Balance Blue : 0
Color Temperature : 5700
Picture Style : Faithful
Digital Gain : 0
WB Shift AB : 0
WB Shift GM : 0
Measured RGGB : 519 1024 1024 613
Color Space : Adobe RGB
VRD Offset : 0
Sensor Width : 5792
Sensor Height : 3804
Sensor Left Border : 168
Sensor Top Border : 56
Sensor Right Border : 5783
Sensor Bottom Border : 3799
Black Mask Left Border : 0
Black Mask Top Border : 0
Black Mask Right Border : 0
Black Mask Bottom Border : 0
Color Data Version : 6 (50D/5DmkII)
WB RGGB Levels As Shot : 2284 1024 1024 1613
Color Temp As Shot : 5716
WB RGGB Levels Auto : 2123 1024 1024 1748
Color Temp Auto : 5072
WB RGGB Levels Measured : 2121 1023 1024 1746
Color Temp Measured : 5072
WB RGGB Levels Daylight : 2171 1024 1024 1722
Color Temp Daylight : 5200
WB RGGB Levels Shade : 2491 1024 1024 1423
Color Temp Shade : 7000
WB RGGB Levels Cloudy : 2335 1024 1024 1551
Color Temp Cloudy : 6000
WB RGGB Levels Tungsten : 1661 1099 1099 2903
Color Temp Tungsten : 3200
WB RGGB Levels Fluorescent : 1930 1057 1057 2598
Color Temp Fluorescent : 3674
WB RGGB Levels Kelvin : 2284 1024 1024 1613
Color Temp Kelvin : 5716
WB RGGB Levels Flash : 2351 1024 1024 1535
Color Temp Flash : 6127
Raw Measured RGGB : 318476 572564 616669 368437
Custom Picture Style File Name :
AF Micro Adj Active : No
AF Micro Adj Value : 0
Peripheral Lighting : Off
Peripheral Lighting Value : 0
Original Image Width : 5616
Original Image Height : 3744
Peripheral Lighting Setting : Off
Calibration Illuminant 1 : D50
Raw Data Unique ID : FB0D1FCC3B4342C03BB30193F41A741F
Original Raw File Name : M514193-36_Forme.CR2
Camera Calibration Sig : com.adobe
Profile Name : Canon EOS 5D Mark II-ludo-v5
Profile Hue Sat Map Dims : 6 6 3
Profile Hue Sat Map Data 1 : 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 -2.64167165756226 1.0728919506073 1.01031124591827 -2.11207818984985 1.01897716522217 1.01048231124878 -0.905377984046936 1.0130763053894 0.999761998653412 -0.400793224573135 1.01064193248749 0.995189309120178 -0.0863745138049126 1.00095403194427 1.01952075958252 -5.06731605529785 1.03411471843719 1 -5.06731605529785 1.03411471843719 1.0156717300415 -1.75790393352509 0.997467458248138 1.01420629024506 -0.851567685604095 0.997795104980469 1.00996446609497 -1.04556119441986 1.01144540309906 0.99588668346405 -0.780955910682678 0.996265172958374 1.00079822540283 0.778133630752563 0.963459312915802 1 0.778133630752563 0.963459312915802 0.995913863182068 2.42598366737366 1.00546216964722 1.00155711174011 0.653218865394592 0.995486199855804 1.01487720012665 -0.338425099849701 0.999341487884521 1.01273810863495 0.112011380493641 0.997011005878448 1.01312232017517 -0.104393504559994 0.977509558200836 1 -0.104393504559994 0.977509558200836 0.981817841529846 -0.688305556774139 1.02922427654266 0.969217300415039 -0.112652808427811 1.01094007492065 0.985381364822388 -0.00545886671170592 0.998366951942444 1.00531458854675 -0.407302588224411 0.995958387851715 1.01351380348206 3.89881038665771 1.02309203147888 1 3.89881038665771 1.02309203147888 0.996048212051392 1.02069294452667 1.01017940044403 1.00556755065918 0.494631141424179 1.00418865680695 1.04342663288116 0.543152809143066 0.997115969657898 1.12829291820526 0.23537814617157 0.996821165084839 1.09809732437134 1.7050713300705 1.09624290466309 1 1.7050713300705 1.09624290466309 1.0046454668045 -0.801150441169739 1.05301892757416 1.00842821598053 -0.463790535926819 1.02882564067841 1.01620054244995 -0.268692225217819 1.01150858402252 1.0321239233017 0.0201705284416676 1.00007402896881 1.03820872306824 0 1 1 1.91478276252747 1.15542793273926 1.00009000301361 0.940934062004089 1.06231415271759 0.983607172966003 0.719067811965942 1.04366207122803 0.966084837913513 0.0625138133764267 1.01604831218719 0.98222029209137 -0.0528024844825268 1.00136709213257 1.00879096984863 -6.73153877258301 1.17188119888306 1 -6.73153877258301 1.17188119888306 1.00531053543091 -2.58969402313232 1.08074140548706 0.985875427722931 -1.69512152671814 1.05627954006195 0.971177935600281 -1.30768537521362 1.03361356258392 0.962252974510193 -0.737442374229431 0.996261656284332 0.980185806751251 -7.86842775344849 1.08957040309906 1 -7.86842775344849 1.08957040309906 0.969686686992645 -3.13434815406799 1.05812132358551 0.961287260055542 -1.87536180019379 1.03438794612885 0.967555403709412 -0.775561213493347 1.01138925552368 0.988801181316376 0.104652613401413 0.996888637542725 1.01516211032867 -7.38857316970825 0.953978836536407 1 -7.38857316970825 0.953978836536407 0.960292816162109 -5.30494785308838 1.02140939235687 0.939088881015778 -3.38790082931519 1.01151621341705 0.948858261108398 -2.00964188575745 1.00262904167175 0.967957139015198 -1.12617063522339 1.00008642673492 0.984956085681915 6.094970703125 0.965356409549713 1 6.094970703125 0.965356409549713 0.95991587638855 1.42511296272278 0.99012279510498 0.950629889965057 0.669523656368256 1.00130081176758 0.982638955116272 0.473401337862015 0.999255478382111 1.04814028739929 0.22570589184761 0.999908804893494 1.03021359443665 8.33130931854248 1.12744629383087 1 8.33130931854248 1.12744629383087 0.983965277671814 3.63999366760254 1.05750358104706 0.964640855789185 2.28920555114746 1.03356063365936 0.966997146606445 1.24042439460754 1.01322031021118 0.992245018482208 0.508874654769897 1.00221109390259 1.01023507118225
Profile Embed Policy : Allow Copying
Preview Application Name : Adobe Photoshop Lightroom
Preview Application Version : 3.6
Preview Settings Digest : 54f9f4761a557f46f375a9f4b5c4986f
Preview Color Space : 2
Preview Date Time : 2012:04:02 11:02:02+02:00
Raw Image Digest : 7b8de39f909653e4cdc4bcf102d93f97
Noise Profile : 1.73525597009232e-05 1.79219872347985e-07
Aperture : 10.0
CFA Pattern : [Red,Green][Green,Blue]
Drive Mode : Single-frame Shooting
File Number : 100-8368
Image Size : 5792x3804
Lens : 85.0 mm
Lens ID : Canon EF 85mm f/1.8 USM
Preview Image : (Binary data 37314 bytes, use -b option to extract)
Scale Factor To 35 mm Equivalent: 1.0
Shooting Mode : Manual
Shutter Speed : 1/100
Create Date : 2012:03:30 12:00:17.3
Date/Time Original : 2012:03:30 12:00:17.3
WB RGGB Levels : 2284 1024 1024 1613
Blue Balance : 1.575195
Circle Of Confusion : 0.031 mm
Depth Of Field : 4.91 m (5.57 - 10.48)
Field Of View : 24.5 deg
Focal Length : 85.0 mm (35 mm equivalent: 83.0 mm)
Hyperfocal Distance : 23.47 m
Lens : 85.0 mm (35 mm equivalent: 83.0 mm)
Light Value : 13.3
Red Balance : 2.230469
Thank you