Badpixel Mapping for Different Exposures - page 3 - Feature Requests - CHDK Forum

Badpixel Mapping for Different Exposures

  • 48 Replies
  • 25742 Views
*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Badpixel Mapping for Different Exposures
« Reply #20 on: 08 / July / 2008, 17:21:58 »
Advertisements
Yeah, that's why I can't manage to get hold of it - it's down ;)

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Badpixel Mapping for Different Exposures
« Reply #21 on: 08 / July / 2008, 17:33:18 »
it was supposed to be online today, but atm they are trying to recover from a hardware failure. also, due to that they want to switch their hoster, i hope it doesnt take too long. first time in months i wanna committ something and the darn svn is down :(

keep up the good work :)

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Badpixel Mapping for Different Exposures
« Reply #22 on: 08 / July / 2008, 17:41:12 »
Hi PhyrePhoX,

go and repair the internet, we need stuff  :haha

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Badpixel Mapping for Different Exposures
« Reply #23 on: 09 / July / 2008, 08:46:42 »
Sess, here is an A650 build for you (from AllBest / trunk 430, as posted in the Subversion repo thread).

I've added that "use nearest shutter speed's badpixels list if none is found for this one" feature.

Hope it works. Use at your own risk, etc. Rename the file inside the ZIP to DISKBOOT.BIN as usual.


I'm also including the diff from trunk 430, hope someone is interested in merging, eventually.


Feedback / bug reports much appreciated.
« Last Edit: 10 / July / 2008, 07:05:05 by LjL »

*

Offline Sess

  • *
  • 28
Re: Badpixel Mapping for Different Exposures
« Reply #24 on: 10 / July / 2008, 13:59:44 »
So this is a modified version of allbest-a650-100d-51-430? Great! I'll try it out when I get home today.
Could you just tell me exactly what features out of all the ones we discussed are actually in this version so I know what to look for?

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Badpixel Mapping for Different Exposures
« Reply #25 on: 10 / July / 2008, 14:36:10 »
Ok, complete description:

- the software will NOT look for the usual "badpixels" file
- it will look, however, for files in a "BADPIXELS" directory
- each file in that directory should be named as a number corresponding to the shutter speed (as reported by propcase 264 after half-shoot on DIGIC III, and I think 69 on II)
- the files themselves are in the usual badpixel format, but the number after the "=" is NOT ignored
- if the "RAWconv" badpixel behavior is selected, it behaves as usual, but will use the badpixels file for the current shutter speed (or the closest it finds)
- if the "Average" behavior is selected, it will use the number after the "=" (let's call it "bias") to determine the pixel value: value=(value-bias)*((MAXVAL+bias)/MAXVAL) * (MAXVAL-bias)  +  nearest_neighbors_average * bias
- if no badpixels file is found for the current exposure, the one with the closest tv number is used; if there are two equally distant ones, the lower-numbered one (i.e. the one corresponding to a longer exposure) is used

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Badpixel Mapping for Different Exposures
« Reply #26 on: 10 / July / 2008, 14:52:30 »
Do you mean average of nearest neighbors of the same color as the faulty one with "nearest_neighbors_average"?

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Badpixel Mapping for Different Exposures
« Reply #27 on: 10 / July / 2008, 15:35:30 »
Yes - I mean exactly what the original code has, which I believe is what you described.

The original code went:


set_raw_pixel(x,y,(get_raw_pixel(x-2,y)+get_raw_pixel(x+2,y)+get_raw_pixel(x,y-2)+get_raw_pixel(x,y+2))/4);


My code goes:


nearest = (get_raw_pixel(x-2,y)+get_raw_pixel(x+2,y)+get_raw_pixel(x,y-2)+get_raw_pixel(x,y+2))/4;
renormalized = (((double)get_raw_pixel(x,y)-(double)bias) * ((double)(MAX_PIXVAL+bias)/(double)MAX_PIXVAL));
set_raw_pixel(x,y, (nearest*(bias) + renormalized*(MAX_PIXVAL-bias)) / MAX_PIXVAL);

*

Offline Sess

  • *
  • 28
Re: Badpixel Mapping for Different Exposures
« Reply #28 on: 11 / July / 2008, 13:40:38 »
Ok hmm... I don't quite get the naming convention you've come up with for the files in the bad pixel folder. What is propcase 264? If I have files for like 1/60, 1/2, 2, and 4 seconds, what should the file names be?

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Badpixel Mapping for Different Exposures
« Reply #29 on: 11 / July / 2008, 14:15:39 »
It's not my naming convention, it's the convention that the Canon software uses internally.
I could make it a bit more "human readable", but I'd need to modify the API a bit; I'll do that if the patch is merged.

Anyway, here's how to obtain the value:
1) Go to the CHDK menu, select "Debug parameters", enable "Shot PropCases", and select page 26
2) Set a shutter speed (let's say 1/5s)
3) Half-press the shutter release button
4) Look at the "264:" row - if it's like my camera, it'll say "224", and that's the filename you have to use for 1/5s

 

Related Topics


SimplePortal © 2008-2014, SimplePortal