RAW develop and CHDK DNG - RAW Shooting and Processing - CHDK Forum  

RAW develop and CHDK DNG

  • 9 Replies
  • 7764 Views
RAW develop and CHDK DNG
« on: 28 / February / 2009, 17:12:54 »
Advertisements
I understand that there are some EXIF like information that are saved in the DNG.
Are there sufficient information stored so that the RAW develop function can automatically use?
The user will not have to remember for example the white balance settings.
Nice to have for RAW develop.

*

Offline reyalp

  • ******
  • 14082
Re: RAW develop and CHDK DNG
« Reply #1 on: 28 / February / 2009, 17:22:44 »
It's not clear to me what you are trying to do. Do you want to develop DNG->JPEG, CRW->DNG  or something else ?

Currently, neither of those is supported.
Don't forget what the H stands for.

Re: RAW develop and CHDK DNG
« Reply #2 on: 28 / February / 2009, 22:04:45 »
It's not clear to me what you are trying to do. Do you want to develop DNG->JPEG, CRW->DNG  or something else ?

Currently, neither of those is supported.
Smart CRW to JPG develop.

Sorry I was day dreaming - just look into the DNG source - there is not white balance information in the DNG header. I was thinking of saving some of the shooting parameters in the area of the current CRW file not used by Canon (not exposed). I believe that the 8 first rows of the file is not storing anything useful (always at black level). The DCRAW source also seems to skip the first 8 rows. The in camera RAW develop can then make use of the information to develop CRW to JPG.

*

Offline reyalp

  • ******
  • 14082
Re: RAW develop and CHDK DNG
« Reply #3 on: 28 / February / 2009, 22:40:05 »
The number of border pixels depends on the camera. Also, they aren't always black level.

CHDK CRW files don't have anything to do with the canon CRW format, they are just a dump of the sensor data. There are no "unused fields" because there are no fields. Trying to stuff metadata into the sensor dump would be a terrible idea, as would creating a new RAW format. It would make far more sense to store an external metadata file.

The whole point of "develop raw" is that it uses the current settings, not whatever you took the photo with. If you want the original white balance, use the original jpeg that was taken with that raw!
Don't forget what the H stands for.


*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: RAW develop and CHDK DNG
« Reply #4 on: 01 / March / 2009, 00:39:53 »
just look into the DNG source - there is not white balance information in the DNG header.

Camera white balance information is stored in AsShotNeutral tag.

Re: RAW develop and CHDK DNG
« Reply #5 on: 02 / March / 2009, 01:43:32 »
The number of border pixels depends on the camera. Also, they aren't always black level.

CHDK CRW files don't have anything to do with the canon CRW format, they are just a dump of the sensor data. There are no "unused fields" because there are no fields. Trying to stuff metadata into the sensor dump would be a terrible idea, as would creating a new RAW format. It would make far more sense to store an external metadata file.

Yes that make sense. Although an external metadata file means extra management such as delete when the RAW file gets deleted.

Quote
The whole point of "develop raw" is that it uses the current settings, not whatever you took the photo with. If you want the original white balance, use the original jpeg that was taken with that raw!

It could be annoying if the picture was taken with AWB. That's a good idea to use the information from the JPG. I would guess I have to add some EXIF decoding function for RAW develop to read the JPG EXIF info. The RAW develop would then propose to use the original WB or current settings. There would also be an interesting exercise to track down the JPG which could be anywhere in the CANONxxxx directories.

The whole idea is to develop RAW to JPG using other tweak such as curves while keeping the original white balance.
« Last Edit: 02 / March / 2009, 01:46:43 by toinech »

Re: RAW develop and CHDK DNG
« Reply #6 on: 02 / March / 2009, 01:48:35 »

Camera white balance information is stored in AsShotNeutral tag.

Thanks, I would give it a try to reload the WB info back in the properties before developing the RAW.

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: RAW develop and CHDK DNG
« Reply #7 on: 02 / March / 2009, 02:49:00 »
Thanks, I would give it a try to reload the WB info back in the properties before developing the RAW.

It seems that properycase for WB tuning is read-only (tested on a710, sx100).
« Last Edit: 02 / March / 2009, 02:50:38 by ewavr »


Re: RAW develop and CHDK DNG
« Reply #8 on: 03 / March / 2009, 01:07:25 »
Thanks, I would give it a try to reload the WB info back in the properties before developing the RAW.

It seems that properycase for WB tuning is read-only (tested on a710, sx100).

That's the nail on the coffin. :-(

Re: RAW develop and CHDK DNG
« Reply #9 on: 27 / June / 2009, 12:15:26 »
Hi,
I experimented with DNG in-camera developing.  I modified process_dng_to_raw_files() to pass the converted filename to raw_prepare_develop().  Seems to work fine except the .CRW file is left over so it is wasteful of file space.
Jon

Here is the code.  Note that I only modified the second part that converts only one file.
Code: [Select]

void process_dng_to_raw_files(void){
 struct fitem *ptr;
 int i=0;
   started();
   msleep(100);
   finished();

 if (fselect_real_marked_count()) {
   for (ptr=head; ptr; ptr=ptr->next)
     if (ptr->marked && ptr->attr != 0xFF && !(ptr->attr & DOS_ATTR_DIRECTORY)) {
       sprintf(selected_file, "%s/%s", current_dir, ptr->name);
       gui_browser_progress_show(selected_file, (i++)*100/fselect_real_marked_count()) ;
       convert_dng_to_chdk_raw(selected_file);
      }
    }
 else {
   sprintf(selected_file, "%s/%s", current_dir, selected->name);//jh
   convert_dng_to_chdk_raw(selected_file);
   i=strlen(selected_file)-3;//jh
   strcpy(selected_file+i,"CRW");//jh
   gui_mbox_init((int)"", LANG_RAW_DEVELOP_MESSAGE, MBOX_BTN_OK|MBOX_TEXT_CENTER, NULL);//jh
   raw_prepare_develop(selected_file);//jh
 }
  gui_fselect_read_dir(current_dir);
}

 

Related Topics