DNG 1.3 bad pixel handling - testers required please. - page 3 - RAW Shooting and Processing - CHDK Forum supplierdeeply

DNG 1.3 bad pixel handling - testers required please.

  • 34 Replies
  • 11852 Views
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #20 on: 11 / April / 2012, 23:03:24 »
Advertisements
Is this too complicated and are we better off just sticking with the old system?
Its not too complicated - seems like a good step forward. 

The only part that worries me is if there are existing s/w packages on the PC that will not handle the 1.3 version ?   That would not be good.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #21 on: 11 / April / 2012, 23:35:38 »
The only part that worries me is if there are existing s/w packages on the PC that will not handle the 1.3 version ?   That would not be good.

Good point, hadn't thought of that.

So if the DNG bad pixel removal option is selected the DNG version should be set to 1.1 and the opcodes left out of the file.

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)

*

Offline reyalp

  • ******
  • 13390
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #22 on: 12 / April / 2012, 00:05:34 »
So if the DNG bad pixel removal option is selected the DNG version should be set to 1.1 and the opcodes left out of the file.
Sounds good to me, although it might be clearer to just make DNG format an enum option.

Some other random thoughts:
Implementing the badpixel opcodes in the image programs shouldn't be hard. If some motivated person got patches accepted to the open source tools, that would solve much of the problem.

A standalone tool that just patched the badpixels based on the opcodes should be pretty easy too.

Down the road, the distortion and vignette opcodes could be useful.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #23 on: 12 / April / 2012, 00:15:10 »
So if the DNG bad pixel removal option is selected the DNG version should be set to 1.1 and the opcodes left out of the file.
Sounds good to me, although it might be clearer to just make DNG format an enum option.

Do you mean instead of the 'bad pixel removal' option, the user selects DNG version (defaulted to 1.3)?
If they select 1.1 then it does the 'badpixel.bin' check.

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)


*

Offline reyalp

  • ******
  • 13390
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #24 on: 12 / April / 2012, 00:42:16 »
Do you mean instead of the 'bad pixel removal' option, the user selects DNG version (defaulted to 1.3)?
If they select 1.1 then it does the 'badpixel.bin' check.
That's what I had in mind.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #25 on: 12 / April / 2012, 01:05:35 »
Do you mean instead of the 'bad pixel removal' option, the user selects DNG version (defaulted to 1.3)?
If they select 1.1 then it does the 'badpixel.bin' check.
That's what I had in mind.

Revision 1801 replaces the 'bad pixel removal' option with the 'DNG version' enum.

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: DNG 1.3 bad pixel handling - testers required please.
« Reply #26 on: 12 / April / 2012, 03:35:38 »
When I revisited it for this patch, I discovered I had interpreted the sample DNG file for the IXUS220 incorrectly and the actual bad pixel values go from 0-3 (assuming I got it right this time).
Well, that's good and looks like it's the same as on other cameras.
And by the way, values 1-3 are present only in masked areas, in active area it's always zero.
At least on those RAW files for which I've gathered statistics.

A standalone tool that just patched the badpixels based on the opcodes should be pretty easy too.
It looks like Adobe DNG Converter should do the job if you convert from DNG to DNG, but select compatibility with older versions of CameraRAW in the preferences.

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #27 on: 12 / April / 2012, 04:00:36 »
And by the way, values 1-3 are present only in masked areas, in active area it's always zero.
At least on those RAW files for which I've gathered statistics.

That's what I thought should be the case.

Have a look at the IXUS220 DNG files posted in this thread:
http://chdk.setepontos.com/index.php?topic=6341.msg81892#msg81892
When I check the sensor pixels in the active area I'm getting values from 0-3.
Edit2: When I change the active area in this one to match the same value as I fixed for the one below I also get only 0 value bad pixel ???

I also found this one in the same thread (while searching for the above link)
http://chdk.setepontos.com/index.php?topic=6341.msg82709#msg82709
When I checked this one I'm seeing values from 0-5.
Edit: This one (IMG_0030.DNG) has a bad active area set in the DNG file, when I fix this the bad pixels are all 0.

I'd appreciate a second opinion here in case I'm looking at this wrong.

Phil.
« Last Edit: 12 / April / 2012, 05:09:17 by philmoz »
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)


*

Offline funnel

  • ****
  • 349
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #28 on: 12 / April / 2012, 04:57:00 »
Do you get the same behaviour with the previous code, where CHDK maps out the bad pixels?
Normal CHDK badpixel removal works ok.

Quote
Do you know what the bad pixel count found by CHDK was?
~42000 at normal iso, ~84000 high iso.

Quote
Lastly can you post a sample at the lowest ISO and zoomed to telephoto (to get rid of the vignetted corners).
I tried and it doesn't make any difference.

Looks like the green badpixels don't get interpolated only on yellow colors.



*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: DNG 1.3 bad pixel handling - testers required please.
« Reply #29 on: 12 / April / 2012, 05:24:55 »
Do you get the same behaviour with the previous code, where CHDK maps out the bad pixels?
Normal CHDK badpixel removal works ok.

Quote
Do you know what the bad pixel count found by CHDK was?
~42000 at normal iso, ~84000 high iso.

Based on the image you posted the active area in platform_camera.h is wrong for the SX220

Currently it is:
    #define CAM_ACTIVE_AREA_X1              96
    #define CAM_ACTIVE_AREA_Y1              24
    #define CAM_ACTIVE_AREA_X2              4168
    #define CAM_ACTIVE_AREA_Y2              3060

but should be:
    #define CAM_ACTIVE_AREA_X1              120
    #define CAM_ACTIVE_AREA_Y1              36
    #define CAM_ACTIVE_AREA_X2              4136
    #define CAM_ACTIVE_AREA_Y2              3040

so the badpixel count is including some of the masked area of the sensor.
I count 27,764 with a value of 0 in the actual active area of the image posted.

Quote
Quote
Lastly can you post a sample at the lowest ISO and zoomed to telephoto (to get rid of the vignetted corners).
I tried and it doesn't make any difference.

Looks like the green badpixels don't get interpolated only on yellow colors.


It would help me to have a sample file at low ISO and telephoto zoom.

Edit: Never mind - my IXUS 310 does the same thing, it's most obvious on bright yellow which is why I didn't notice before. Now to try and work out what is going on.

Phil.
« Last Edit: 12 / April / 2012, 06:22:27 by philmoz »
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)

 

Related Topics