bug: badpixels are not patched using DNG 1.1 - General Discussion and Assistance - CHDK Forum

bug: badpixels are not patched using DNG 1.1

  • 6 Replies
  • 4487 Views
bug: badpixels are not patched using DNG 1.1
« on: 22 / October / 2013, 02:47:11 »
Advertisements
I use "a570-101a-1.3.0-3170-full.zip" that is the last CHDK now.
I meet a bug that badpixels are not patched using DNG 1.1 .

[I don't meet the bug]
power on my Powershot A570 which has been set up to save DNG 1.1 file
shoot
CHDK save a DNG file of which badpixels are patched

[I meet the bug]
power on my Powershot A570 which has been set up to save DNG 1.1 file
enter CHDK Alt mode
disable DNG by Erace button
enabele DNG by Erace button
leave CHDK ALt mode
shoot
CHDK save a DNG file of which badpixels are *NOT* patched

Althought I do not know a lot about CHDK, I attempt to view its source code.

In "CHDK/core/gui.c",
Code: [Select]
int gui_chdk_kbd_process()
{
...
            conf.save_raw = !conf.save_raw;
...
}

there is a part that "conf.save_raw" value is changed.
But "conf_change_dng()" function is not called.

In "CHDK/core/conf.c"
Code: [Select]
static ConfInfo conf_info[] = {
...
    CONF_INFO( 20, conf.save_raw,                               CONF_DEF_VALUE, i:0),
...
};

...
void conf_info_func(unsigned short id)
{
    switch (id)
    {
    case  20:
    case  36:
    case  37:
        conf_change_dng();
        break;
...

I think that this part may mean that "conf_change_dng()" function
have to be called when "conf.save_raw" value is changed.

I guess...

> [I meet the bug]
> disable DNG with Erace button

In this operation, "conf.save_raw" value change to 0.
because "_module_can_unload()" function of "CHDK/module/dng.c" to return true,
"module_tick_unloader()" call of "CHDK/core/main.c" unload dng module.
dng module release badpixels infomation.

> [I meet the bug]
> enabele DNG with Erace button

In this operation, "conf.save_raw" value change to 1.
because "conf_change_dng()" function is not called,
badpixels infomation is not loaded from "badpixel.bin".

If "conf_change_dng()" function have to be called
when "conf.save_raw" value is changed, please change to do so.

Thank you for reading my poor English.
I'm sorry my English is bad.

Re: bug: badpixels are not patched using DNG 1.1
« Reply #1 on: 22 / October / 2013, 04:43:50 »
You might want to look at this thread as well:
http://chdk.setepontos.com/index.php?topic=10805.0

Briefly, CHDK will detect and patch dead pixels (R=G=B=0), but not hot pixels (those with a constant value, regardless of exposure). If your "bad" pixels" are coloured dots, then they are hot, not dead, and CHDK cannot do anything about them. You will need to use some other software such as rawtherapee.

(For more on the behaviour of CHDK's bad pixels, see http://www.skeptic.d/chdk/bad pixels/index.htm.)

Unfortunately I cannot comment on the code, as that is beyond my depth.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: bug: badpixels are not patched using DNG 1.1
« Reply #2 on: 22 / October / 2013, 04:59:26 »
I use "a570-101a-1.3.0-3170-full.zip" that is the last CHDK now.
I meet a bug that badpixels are not patched using DNG 1.1 .

Thanks for the detailed report.

Should be fixed in revision 3171 (trunk) and 3172 (release-1.2).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: bug: badpixels are not patched using DNG 1.1
« Reply #3 on: 22 / October / 2013, 07:54:09 »
Briefly, CHDK will detect and patch dead pixels (R=G=B=0), but not hot pixels (those with a constant value, regardless of exposure).

Thank for the answer.
I was not able to explain the bug well.
Sorry.


Should be fixed in revision 3171 (trunk) and 3172 (release-1.2).

Thanks for the fixes and development of CHDK.
I checked that I did not meet the bug using the new CHDK.
Thanks.


*

Offline reyalp

  • ******
  • 14121
Re: bug: badpixels are not patched using DNG 1.1
« Reply #4 on: 22 / October / 2013, 13:19:49 »
If your "bad" pixels" are coloured dots, then they are hot, not dead, and CHDK cannot do anything about them.
If you are looking at a de-bayered DNG, this is not necessarily correct. A single dead R, G or B element will give you a colored dot.
Don't forget what the H stands for.

Re: bug: badpixels are not patched using DNG 1.1
« Reply #5 on: 22 / October / 2013, 16:01:19 »
If you are looking at a de-bayered DNG, this is not necessarily correct. A single dead R, G or B element will give you a colored dot.

Agreed. So what do you call such pixels where ((R=0) or (G=0) or (B=0))? And what about pixels where ((R=0) and (G=0) and (B=0)) (black dots)? Which of these pixels are recorded in the badpixel.bin file?

*

Offline reyalp

  • ******
  • 14121
Re: bug: badpixels are not patched using DNG 1.1
« Reply #6 on: 22 / October / 2013, 16:27:02 »
Agreed. So what do you call such pixels where ((R=0) or (G=0) or (B=0))? And what about pixels where ((R=0) and (G=0) and (B=0)) (black dots)? Which of these pixels are recorded in the badpixel.bin file?
Everything in CHDK related to bad pixels operates only on individual sensor pixels, which are red, blue OR green elements in the bayer filter. When we refer to a "pixel" in CHDK raw or DNG, it always refers to a sensor pixel.

A black dot simply means there are several zero-valued pixels together.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal