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

Save RAW files in DNG format instead of RAW

  • 392 Replies
  • 202847 Views
Re: Save RAW files in DNG format instead of RAW
« Reply #70 on: 16 / November / 2008, 03:00:37 »
Advertisements
In my s3is I get 3 sets of factory marked badpixel counts.

shutter speed 1/30sec or less, bad pixel count = 1117
shutter speed 1/25sec to 1/8sec, bad pixel count = 2451
shutter speed 1/6sec or greater,  bad pixel count = 8773

As I get 3 badpixel.bin files covering the whole range of shutter speeds should I use the one with highest count.

Can one use badpixel.txt file along with this file to remove hot pixels in long exposed (say 64s) astro images (multiple stacked) without balanking out the dim stars.



*

Offline vit40

  • ****
  • 276
Re: Save RAW files in DNG format instead of RAW
« Reply #71 on: 16 / November / 2008, 05:04:18 »
give that man a break, he just introduced that feature and ur already asking for optimizations :D

Sorry  :-[   I was just asking questions or trying to help with some idea ...

*

Offline hotvedt

  • ***
  • 106
  • A540/SX110IS/350D
Re: Save RAW files in DNG format instead of RAW
« Reply #72 on: 16 / November / 2008, 06:06:04 »
DNG-format: 1970
DNG-format: 4430 (unchecked buffer cache)
RAW-format: 870

Theese speeds i get in my a540. Speed is for me not really any issue, as long as i can choose "the faster way" when or if i need it.
Thanks for this dng-feature, i plan to use it a lot in the future, also for new users i think it will be easyer to have something that opens directly in say for ex. photoshop.

Re: Save RAW files in DNG format instead of RAW
« Reply #73 on: 16 / November / 2008, 08:43:57 »
I've also done some work on saving in DNG format. This is in a less advanced stage to the work that ewavr has done, but I've also done some work in areas that ewavr has not (yet).

My code is at:

chdkmartin - Google Code

I've taken a slightly different approach that has some advantages and some disadvantages. ewavr's data-driven handling of the TIFF tags in the .DNG file is supperior to my code-driven approach (I used a code-driven approach for expediency). Also this is the first work that I've done with CHDK, so I've probably not done some things in the most straightforward way. My code has the following characteristics:

1) All differences between cameras can be handled just by changes to camera.h - no changes to any files in the platform subdirectories are required. This probably makes it easier to support more cameras.

2) The code does not require the camera color profile. Of course it's better to have this, but if one is not available for your camera you can still shoot in DNG format. It is possible to add the color profile later (for example using Adobe's DNG Profile Editor)

3) I've started work on including a thumbnail in the DNG file

4) The DNG file includes all the tags required by Adobe's dng_validate program. This comes as part of Adobe's DNG SDK, see
Adobe DNG Software Development Kit (SDK)

5) I haven't yet included the EXIF data in the DNG file

Rather than continue in parallel with ewavr, I'm quite happy to donate my code to the cause. ewavr - if there is anything you feel is useful in my code, feel free to use/copy it in your code.

And finally ewavr - you haven't built a version for my camera, the IXUS 850 IS. Would it be possible for you to build one for this camera. Or even better could you point me to where your code is so that I can build it myself?

Martin

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Save RAW files in DNG format instead of RAW
« Reply #74 on: 16 / November / 2008, 09:07:17 »
Nice work martin. Ewavrs code is in a diff at the same place he hosts the binaries at :)

Re: Save RAW files in DNG format instead of RAW
« Reply #75 on: 16 / November / 2008, 16:50:39 »
Well I've built this for the IXUS 850 and it works fine. So I have an entry in camera_dng.h to contribute back. However I guessed the values for the active area - is there a way these can be definitively obtained?

Some feedback:

a) resulting DNG file validates correctly using Adobe's dng_validate
b) DNG version is set to 1.1.0.0. Should it not be 1.2.0.0?
c) My comment (1) above does not apply. No platform variant required here either.
d) It would be useful to allow a file extension of .DNG (I've added this change in my build).
e) Making inclusion of colorMatrix optional is straightforward

Martin

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #76 on: 16 / November / 2008, 17:27:29 »
I've also done some work on saving in DNG format.

I see that you planned saving in Canon CRW format and compressed DNG. Nice!

Quote
I've started work on including a thumbnail in the DNG file
I also started , but my thumbnail cannot be recognized by some programs (for example, XNView, but FastStone shows it). Maybe is something wrong in my tags  :(. Image is generated from 'live image' buffer before shooting, but its generation from RAW buffer is more correct (what about colors in this case?).

DNG version is set to 1.1.0.0. Should it not be 1.2.0.0?
Because this DNG version uses DNG4PS2 :). I am not DNG expert and copied DNG tags from here.
Quote
It would be useful to allow a file extension of .DNG (I've added this change in my build).
Yes, but files with this extension cannot be copied from camera via USB. I'm trying to add 'dng' extension to 'white list of extensions' (crw,cr2,jpg,wav,fir,avi,thm,mrk), but without success  :(.

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Save RAW files in DNG format instead of RAW
« Reply #77 on: 16 / November / 2008, 17:46:54 »
Are there any chances of making dng save time comparable with old raw format, say like saving a header, appending the bayer image from buffer and then fixing several exif tags and bad pixels in saved dng (this is probably a dumb question, but anyway ...)

My timings (A710, 7MP) in milliseconds:

- creating DNG header: 0
- interpolation of 7000 bad pixels: 110
- reverting bytes order in RAW buffer: 650
- writing DNG header: 10 (if size of this header is not divisible by 512, saving time can reach 1 s!)
- writing RAW buffer, closing the file: 1000
- reverting bytes order in RAW buffer back (if we want to see correct jpeg): 650

total: ~2400ms

Most time waste happens in reverting bytes order in RAW buffer, but I don't know how avoid this procedure or decrease its time (now 2.5 CPU instructions/byte).

*

Offline lrossel

  • **
  • 53
  • CHDK - Take it underwater
    • My Photos
Re: Save RAW files in DNG format instead of RAW
« Reply #78 on: 16 / November / 2008, 20:23:32 »
Hi guys,
Today a was playing with this new DNG feature in my A720. I went to took some shots in order to play with HDR.

I was very surprised when two of the programs I use processed without any problem the DNG raw files created with CHDK.

First, with Geosetter I tagged with geoposition data all the CRW images. Fantastic, a lot of time saving.

And the best, the DNG images were tooked fine by Photomatix for HDR processing. Excellent.

A lot of time saved, in just a few minutes I uploaded the resulting photos to my Flickr.

Thanks again Ewavr, and I have a lot of expectations with the collaborative work you will have with Martin. Hopefully.
If you saw me on land, It was just the surface interval
G10 without CHDK

*

Offline vit40

  • ****
  • 276
Re: Save RAW files in DNG format instead of RAW
« Reply #79 on: 17 / November / 2008, 03:02:08 »
Most time waste happens in reverting bytes order in RAW buffer, but I don't know how avoid this procedure or decrease its time (now 2.5 CPU instructions/byte).

Ewavr, thanks for detailed explanation, everything clear now

Maybe ... we could have a menu option to leave the REVERSED byte order in a dng file, in connection with a small and general program that would correct byte order on the PC ... not a very good idea though, because DNG out of the camera wouldn't be a proper DNG ... but nothing better coming to my mind at the moment

 

Related Topics


SimplePortal © 2008-2014, SimplePortal