Author Topic: Save RAW files in DNG format instead of RAW  (Read 56333 times)

Offline binsurf

  • Rookie
  • *
  • Posts: 26
Re: Save RAW files in DNG format instead of RAW
« Reply #210 on: 01 / December / 2008, 22:57:41 »
  • Publish
  • Is there a way to use Lua for generating a badpixel.bin file? Or is it not robust enough yet to handle that?
    ________________________
    Jim Manning
    Canon Powershot S5 IS (1.01b)

    Offline ewavr

    • Developers
    • Hero Member
    • ****
    • Posts: 1057
    • A710IS
    Re: Save RAW files in DNG format instead of RAW
    « Reply #211 on: 01 / December / 2008, 23:40:31 »
  • Publish
  • So would an SX100 owner be so kind as to share which shutter speeds they had cycle through to arrive at
    a correct badpixel.bin ?
    On SX100IS: shutter speed 1/6 s. and longer - maximum bad pilxel count (at lowest ISO). But this is ISO dependent and may be temperature dependent.

    Quote
    ... would of course be a lot better !!!
    So, I started this work (bad pixels list creation in camera). Scan rate (using get_raw_pixel() function) is approximately 1 sec/Mp for digic3).

    Offline PhyrePhoX

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 2254
    • make RAW not WAR
      • PhyreWorX
    Re: Save RAW files in DNG format instead of RAW
    « Reply #212 on: 01 / December / 2008, 23:51:51 »
  • Publish
  • considering it is a one-time thing only, this is pretty fast :)

    Offline fudgey

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 1695
    • a570is
    Re: Save RAW files in DNG format instead of RAW
    « Reply #213 on: 02 / December / 2008, 00:56:23 »
  • Publish
  • considering it is a one-time thing only, this is pretty fast :)

    Excuse me for being ignorant, but is this truly a one time thing? I mean, are we reading something Canon wrote to FLASH at a production test bench (which will gradually become more and more inaccurate due to new bad pixels), or something that will change when new bad pixels appear?

    Offline whim

    • Guru Member
    • ******
    • Posts: 1977
    • A620/A630/A590-101b/i70-101b/i870-101a/i300
    Re: Save RAW files in DNG format instead of RAW
    « Reply #214 on: 02 / December / 2008, 01:07:57 »
  • Publish
  • @ewavr

    Quote
    So, I started this work (bad pixels list creation in camera). Scan rate (using get_raw_pixel() function) is approximately 1 sec/Mp for digic3).

    Excellent ! I guess i'll stop work on doing the badpixel thingy in CardTricks ...
    I tend to agree with PhyrePhox: time doesn't matter for a once-only process.

    thanks,

    wim

    @fudgey
    well... if you notice this in your DNG's, couldn't you just kill your badpixel,bin and have CHDK refresh it ?
    « Last Edit: 02 / December / 2008, 01:10:43 by whim »

    Offline PhyrePhoX

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 2254
    • make RAW not WAR
      • PhyreWorX
    Re: Save RAW files in DNG format instead of RAW
    « Reply #215 on: 02 / December / 2008, 01:22:29 »
  • Publish
  • besides - one or two badpixels more or less - depending on the raw editing software you wont notice them anyways (for example adobe converter automatically detects and fixes bad pixels - Faststone Image Viewer does not).

    Offline ewavr

    • Developers
    • Hero Member
    • ****
    • Posts: 1057
    • A710IS
    Re: Save RAW files in DNG format instead of RAW
    « Reply #216 on: 02 / December / 2008, 02:18:01 »
  • Publish
  • Is there a way to use Lua for generating a badpixel.bin file?

    So, I propose for this: small CHDK modification (diff attached) and lua script (also attached).
    Tested on sx100is, produces same result as show_bad_b.exe

    warning: this message is for developers only, script alone don't work properly with current CHDK.

    « Last Edit: 02 / December / 2008, 02:21:22 by ewavr »

    Offline fudgey

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 1695
    • a570is
    Re: Save RAW files in DNG format instead of RAW
    « Reply #217 on: 02 / December / 2008, 03:15:16 »
  • Publish
  • well... if you notice this in your DNG's, couldn't you just kill your badpixel,bin and have CHDK refresh it ?

    Oh, I only asked because I was curious how this works and what's going on here. I don't really use RAW much at all and DNG is even worse because I don't have much software that eats it. I was under the impression that the old badpixels files for CRW interpolation have like four pixels. If we now have thousands, there's clearly a difference between the two.

    To formulate the question better, are we creating badpixels lists by deducing things from photos or are we duplicating Canon's lists, or are we almost duplicating Canon's lists with some inaccuracies due to noise and new bad pixels?

    If it's the first one, refreshing won't do squat, will it (unless the file has become corrupt)?

    Offline ewavr

    • Developers
    • Hero Member
    • ****
    • Posts: 1057
    • A710IS
    Re: Save RAW files in DNG format instead of RAW
    « Reply #218 on: 02 / December / 2008, 05:04:26 »
  • Publish
  • To formulate the question better, are we creating badpixels lists by deducing things from photos or are we duplicating Canon's lists, or are we almost duplicating Canon's lists with some inaccuracies due to noise and new bad pixels?
    Badpixel.bin is attempt to duplicate Canon's list, because at present we cannot read it from camera's adjustment table.
    So, because internal list can be refreshed only in service, creating badpixel.bin is one-time operation for most cameras.

    CHDK Forum

    Re: Save RAW files in DNG format instead of RAW
    « Reply #218 on: 02 / December / 2008, 05:04:26 »

    Offline reyalp

    • Guru Member
    • ******
    • Posts: 4826
    Re: Save RAW files in DNG format instead of RAW
    « Reply #219 on: 02 / December / 2008, 08:20:11 »
  • Publish
  • Rather than the lua script, how about checking if the users has a badpixel.bin, and creating it the first time the user takes a (raw or dng ?) shot without one ?

    You could pop up a message when dng is enabled without one present.

    You'd need to sanity check the exposure setting too maybe.
    Don't forget what the H stands for.

    HMrKzsy

    • Guest
    Re: Save RAW files in DNG format instead of RAW
    « Reply #220 on: 02 / December / 2008, 12:05:45 »
  • Publish
  • So, DNG support now in trunk for all cameras, except:
     - g9 (DNG for g9?)
     - a590, ixus50(sd400), ixus75(sd750) - because DNG4PS2 don't support them
     - ixus40(sd300) - due to mismatch in RAW size between CHDK and DNG4PS2 (what RAW size is correct?)

    FWIW:
    I have the Ixus 50 and it and the Ixus 55 seems to be basically the same camera. The DNG4PS2 Windows Beta does support the latter. I tried that profile and the results are as good as can be expected. YMMV.
    « Last Edit: 02 / December / 2008, 12:19:29 by HMrKzsy »

    Offline PhyrePhoX

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 2254
    • make RAW not WAR
      • PhyreWorX
    Re: Save RAW files in DNG format instead of RAW
    « Reply #221 on: 02 / December / 2008, 15:08:12 »
  • Publish
  • if a badpixel.bin was created in camera, it *should* also contain at least the platform id of the camera it was created in. and if loaded, should be matched against the platformid of the camera that is loading it. people who swap their sdcards between different cameras will get wrong results if there isnt a precaution coded like this (even people who swap cards between same models, but i guess we cannot detect that).

    Offline j13l

    • Rookie
    • *
    • Posts: 5
    • S5IS 1.01B
    Re: Save RAW files in DNG format instead of RAW
    « Reply #222 on: 02 / December / 2008, 22:01:30 »
  • Publish
  • Keep up the good work.

    The suffix .DNG seems not possible.
    Is the prefix DNG_ would be possible?

    Thank you

    Offline fudgey

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 1695
    • a570is
    Re: Save RAW files in DNG format instead of RAW
    « Reply #223 on: 02 / December / 2008, 23:35:37 »
  • Publish
  • if a badpixel.bin was created in camera, it *should* also contain at least the platform id of the camera it was created in. and if loaded, should be matched against the platformid of the camera that is loading it. people who swap their sdcards between different cameras will get wrong results if there isnt a precaution coded like this (even people who swap cards between same models, but i guess we cannot detect that).

    Yea, although serial number would be better, people are using SDM with multiple cameras of the same model after all.

    Offline PhyrePhoX

    • Global Moderator
    • Guru Member
    • *****
    • Posts: 2254
    • make RAW not WAR
      • PhyreWorX
    Re: Save RAW files in DNG format instead of RAW
    « Reply #224 on: 02 / December / 2008, 23:46:29 »
  • Publish
  • oh, can we access the s/n number? i guess it is in the params somewhere. yes, serial number would be better than platform id.

     


    SimplePortal 2.3.3 © 2008-2010, SimplePortal