Save RAW files in DNG format instead of RAW - page 32 - Feature Requests - CHDK Forum

Save RAW files in DNG format instead of RAW

  • 392 Replies
  • 201117 Views
*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #310 on: 17 / December / 2008, 07:11:48 »
Advertisements
Bad luck, the links to the uploader are lost. I'll have to google it to see if I can find it.
Indeed...
So, I attach my copy to this post (please, perform virus scan before run). Or download any official firmware update (Official Canon firmware updates - CHDK Wiki, I use files from A75 (my old camera)), extract files and correct FirmInfo.txt file.

*

Offline quietschi

  • ***
  • 116
  • Ixus70 102a
Re: Save RAW files in DNG format instead of RAW
« Reply #311 on: 17 / December / 2008, 07:23:50 »
Hi

link to the uploader on this page at the bottom (My old instruction on raw-enabler usage, etc.) Shooting to RAW with Canon PowerShot (DIGIC II Only) // DNG4PS homepage
direct link - http://www.digicanon.narod.ru/files/PS_Upload.zip

May be interesting found a link about cr2 decoding
cr2 decoding


*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Save RAW files in DNG format instead of RAW
« Reply #312 on: 17 / December / 2008, 07:45:03 »
The original ps_uploader.rar file is also on the chdksoft drop

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #313 on: 17 / December / 2008, 13:21:00 »
we need to have a look which tags are used by dcraw/RawTherapee/Photoshop/etc.
and about these tags:
 - AsShotNeutral
 - AsShotWhiteXY

So, I trying to add AsShotNeutral tag to image:

const int cam_AsShotNeutral[]={100,100,152,100,85,100}; // for daylight WB
const int cam_AsShotNeutral[]={100,100,166,100,104,100}; // for cloudy WB
const int cam_AsShotNeutral[]={100,100,92,100,59,200}; // for tungsten WB

and

 {0xC628, T_RATIONAL, 3, (int)cam_AsShotNeutral},

to IFD0 structure.
Now in ACR WB settings (temperature/tint) for "as shot" preset match corresponding preset (daylingt/cloudy/tungsten).

Can somebody (MartinBudden?) test it in another camera?
« Last Edit: 17 / December / 2008, 13:23:23 by ewavr »


*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #314 on: 17 / December / 2008, 16:17:33 »
And few words about Properycase for white balance (#100 for digic 2).
It contains not 2 or 4, but 28 bytes (7 ints)!
For example, if I set custom WB on white screen, it shows: 908, 1985, 1318, 908, -386, 224, 58
if I set custom WB on red (255,0,0) screen, it shows: 637, 211, 3632, 637, 2751, 2099, -723
if I set custom WB on blue (0,0,255) screen, it shows: 557, 3733, 272, 557, -2267, 1399, -938
if I set custom WB on green (0,255,0) screen, it shows: 389, 2862, 1483, 389, -370, -1758, 2034

Can this numbers be useful for CHDK?

Re: Save RAW files in DNG format instead of RAW
« Reply #315 on: 18 / December / 2008, 03:20:14 »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #316 on: 18 / December / 2008, 06:01:17 »
Where did you find these values? from the camera or from another source?
Using manual selection  :). Criterion was coincidence of "Temperature"  and "Tint" adjustments in Adobe Camera Raw when WB was switched from "as shot" to corresponding preset (daylight etc...)

Quote
Did you test it with dcraw?

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)?

edit : Maybe I did it: now colors in dcraw (but not in ACR!) are very similar to jpeg for any custom WB
in dng_hdr.c :

int cam_AsShotNeutral[]={1000,1000,1000,1000,1000,1000};

in IFD0 structure:
 {0xC628, T_RATIONAL,  3,  (int)cam_AsShotNeutral},

and in capture_data_for_exif():
{
   int arr[3];
   get_property_case(100, &arr, sizeof(arr));  // only for digic 2
   cam_AsShotNeutral[1]=arr[1];
   cam_AsShotNeutral[3]=arr[0];
   cam_AsShotNeutral[5]=arr[2];
 }


« Last Edit: 18 / December / 2008, 06:31:58 by ewavr »

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #317 on: 18 / December / 2008, 16:39:34 »
okay, will try to follow this for s3is and a620.
So, in both cameras required stuff is absent  :(.
It was not my day  :(

a620:
DEF(some_f_for_dng, 0x9B4C)
DEF(second_ext_for_dng, 0x9B70)

s3is:
DEF(some_f_for_dng, 0x9480)
DEF(second_ext_for_dng, 0x94A4)

for both cameras:
#define DNG_EXT_FROM ".DPS"
#define DNG_EXT_TO   ".DNG"




*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Save RAW files in DNG format instead of RAW
« Reply #318 on: 18 / December / 2008, 18:24:55 »
... and colors in resulting tiff image are very similar to jpeg.

 :o

Now this sounds like a hugely great big wonderful thing...

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Save RAW files in DNG format instead of RAW
« Reply #319 on: 18 / December / 2008, 20:52:11 »
okay, will try to follow this for s3is and a620.
So, in both cameras required stuff is absent  :(.
It was not my day  :(

a620:
DEF(some_f_for_dng, 0x9B4C)
DEF(second_ext_for_dng, 0x9B70)

s3is:
DEF(some_f_for_dng, 0x9480)
DEF(second_ext_for_dng, 0x94A4)

for both cameras:
#define DNG_EXT_FROM ".DPS"
#define DNG_EXT_TO   ".DNG"




works like a charm on s3is. i didnt test on a620. i didnt test not because i dont have the a620 here right now, but because i am lazy and trust your pure genius skills anyways :) thanks!

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal