Save RAW files in DNG format instead of RAW

  • 392 Replies
  • 78619 Views
*

Offline vit40

  • ****
  • 276
Re: Save RAW files in DNG format instead of RAW
« Reply #320 on: 19 / December / 2008, 02:38:58 »
Advertisements
Wow! I got unexpected result:
- set custom WB on color target and shoot DNG
- read WB in camera settings from properycase #100 (first 4 values) for example: 647 1561 2268 647 (and write it to paper  ;))
- use this values in dcraw: dcraw -v  -W -o 0 -q 3 -4 -T -r 1561 647 2268 647 DNG_9012.DNG
 ... and colors in resulting tiff image are very similar to jpeg.
Tested at 3 images with different manual WB (on red, green, blue targets).

My question to gurus in color management: how to store these values in DNG (it is possible it to convert to AsShotNeutral  values)?

From my remembering, as I used to make my own experimental raw converter 2 years ago, these four values are simply multipliers for R, G, B , G pixel linear value (divided by 1000). dcraw multiplies every linear pixel value value with appropriate multiplier to get WB corrected values and that's it. After debayerization, RGB value of every pixel is transformet from sensor color space to output color space with matrix operation, using color matrix. There are 2 green multipliers - usually their values are the same, but some sensors have 2 types of greeen pixels (slightly different green filter) and in that case values are different. From my remembering, these 4 values are stored in this form in raw file of every camera and dcraw simply extracts them and uses for white balance

Unfortunately, I don't know how to convert these values to appropriate DNG tag (AsShot Neutral or AsShotXY)

« Last Edit: 19 / December / 2008, 02:41:21 by vit40 »

Re: Save RAW files in DNG format instead of RAW
« Reply #321 on: 19 / December / 2008, 02:56:35 »
Can you add  "dng via usb" feature for ixus860/sd870 ?

Great Job!!

Re: Save RAW files in DNG format instead of RAW
« Reply #322 on: 19 / December / 2008, 03:16:38 »
From my remembering, as I used to make my own experimental raw converter 2 years ago, these four values are simply multipliers for R, G, B , G pixel linear value (divided by 1000). dcraw multiplies every linear pixel value value with appropriate multiplier to get WB corrected values and that's it. After debayerization, RGB value of every pixel is transformet from sensor color space to output color space with matrix operation, using color matrix. There are 2 green multipliers - usually their values are the same, but some sensors have 2 types of greeen pixels (slightly different green filter) and in that case values are different. From my remembering, these 4 values are stored in this form in raw file of every camera and dcraw simply extracts them and uses for white balance

Unfortunately, I don't know how to convert these values to appropriate DNG tag (AsShot Neutral or AsShotXY)

maybe we need to ask Dave Coffin...  ;)   [email protected]

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #323 on: 19 / December / 2008, 04:21:56 »
Unfortunately, I don't know how to convert these values to appropriate DNG tag (AsShot Neutral or AsShotXY)

In my experiments if AsShotNeutral tag is (a,b,c) then dcraw reports "using multipliers : 1/a 1/b 1/c 1/b".
If green channels multipliers are equal (it seems correct for a710) WB settins maybe can be embedded in DNG (I can make test version to verify this).
« Last Edit: 19 / December / 2008, 04:24:07 by ewavr »


*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #324 on: 19 / December / 2008, 06:08:18 »
Can you add  "dng via usb" feature for ixus860/sd870 ?

In #644 this feature added to a610, a630, a640, s5is (dps, thm->dng) and ixus860 (cr2->dng).

Is somewhere available compilation log for autobuild (to quick fixing errors like in #643)?

*

Offline PhyrePhoX

  • *****
  • 2253
  • make RAW not WAR
    • PhyreWorX
Re: Save RAW files in DNG format instead of RAW
« Reply #325 on: 19 / December / 2008, 06:12:16 »
sent to you in pm.

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #326 on: 19 / December / 2008, 06:38:43 »
In #644 this feature added to a610, a630, a640, s5is (dps, thm->dng) and ixus860 (cr2->dng).

Damn! #644 also contains errors  :'(
Must be fixed in #645.

sent to you in pm.
Thanks.
It seems that GrAnd's autobuild server also works now (Compilation reporti, build 0.8.10, revision #644).
« Last Edit: 19 / December / 2008, 06:46:11 by ewavr »

*

Offline vit40

  • ****
  • 276
Re: Save RAW files in DNG format instead of RAW
« Reply #327 on: 19 / December / 2008, 15:26:14 »
Unfortunately, I don't know how to convert these values to appropriate DNG tag (AsShot Neutral or AsShotXY)

In my experiments if AsShotNeutral tag is (a,b,c) then dcraw reports "using multipliers : 1/a 1/b 1/c 1/b".
If green channels multipliers are equal (it seems correct for a710) WB settins maybe can be embedded in DNG (I can make test version to verify this).


ewavr,

check dcraw code, procedure parse_tiff_idf

FORCC cam_mul[c] = 1 / asn[c]

Well, I'm not an expert in C and it's hard to read coffin's very compact code, but I think that this confirms your conclusion above





*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #328 on: 20 / December / 2008, 08:49:58 »
Attached patch for "embedded WB".

*

Offline hotvedt

  • ***
  • 106
  • A540/SX110IS/350D
Re: Save RAW files in DNG format instead of RAW
« Reply #329 on: 20 / December / 2008, 16:21:36 »
Is there any tool available that can convert an uncompressed DNG to a compressed DNG?
I am 99% sure that "Adobe DNG Converter" does this....
Now i am 100% sure. I have tried it on dng-files from my a540, and adobe dng converter compresses them (and maybe updates thumbnail too?).
-
One small note: The DNG-files now shows and can be copied via explorer.
However, when i select all files, press delete, then only the jpegs goes away. When i re-select the remaining DNG's, then delete, they appear to go away, but still remains on my card.
This behavior looks like the "misc"-folder that is also visible in explorer.
Is this an issue with the windows driver?

 

Related Topics