Is there a way to do badpixel mapping for both JPG and RAW? - General Help and Assistance on using CHDK stable releases - CHDK Forum

Is there a way to do badpixel mapping for both JPG and RAW?

  • 13 Replies
  • 2540 Views
Is there a way to do badpixel mapping for both JPG and RAW?
« on: 10 / August / 2010, 11:13:57 »
Advertisements
I've done a search and read through the posts which describe the badpixel.lua routine, but I wanted to see if there is a way to handle bad pixels in JPG captures as well as RAW. Is there a way to do this using chdk?

*

Offline reyalp

  • ******
  • 12109
Re: Is there a way to do badpixel mapping for both JPG and RAW?
« Reply #1 on: 10 / August / 2010, 13:07:58 »
I've done a search and read through the posts which describe the badpixel.lua routine, but I wanted to see if there is a way to handle bad pixels in JPG captures as well as RAW. Is there a way to do this using chdk?
Both CHDK badpixel methods are done before the jpeg process, so anything fixed in the raw is fixed in the jpeg.

That said, badpixel.bin created by badpixel.lua only affects pixels the camera already knows are bad, so presumably they would be fixed in the jpeg anyway.

The other badpixel method described at http://chdk.wikia.com/wiki/Badpixel_removal should work to fix bad pixels not known to the canon firmware.


Don't forget what the H stands for.

Re: Is there a way to do badpixel mapping for both JPG and RAW?
« Reply #2 on: 10 / August / 2010, 13:54:04 »
You mean the show_bad_b method?

*

Offline reyalp

  • ******
  • 12109
Re: Is there a way to do badpixel mapping for both JPG and RAW?
« Reply #3 on: 10 / August / 2010, 17:01:01 »
You mean the show_bad_b method?
No. Read the  badpixel <--> badpixel.bin section.
Don't forget what the H stands for.


Re: Is there a way to do badpixel mapping for both JPG and RAW?
« Reply #4 on: 10 / August / 2010, 19:32:27 »
Okay. It sounds like show_bad generates a badpixel file. I downloaded it and saw there is a .c file and an executable. How do I use the executable?

*

Offline reyalp

  • ******
  • 12109
Re: Is there a way to do badpixel mapping for both JPG and RAW?
« Reply #5 on: 10 / August / 2010, 22:57:57 »
See the first link on the wiki page I linked.
Don't forget what the H stands for.

Re: Is there a way to do badpixel mapping for both JPG and RAW?
« Reply #6 on: 11 / August / 2010, 08:24:12 »
Ah, I see. I'll give this a try. Does this processing add any significant time to the image capture timeline?

Also, what does the X tolerance actually do? I see the range is 32 < X < 1023, but how does the result change as X takes different values in this range?

*

Offline reyalp

  • ******
  • 12109
Re: Is there a way to do badpixel mapping for both JPG and RAW?
« Reply #7 on: 11 / August / 2010, 15:33:46 »
Ah, I see. I'll give this a try. Does this processing add any significant time to the image capture timeline?
Should be very little, obviously depending on the number of pixels. We measured this for DNG, I don't remember the value but it was insignificant compared to the other parts of DNG processing.
Quote
Also, what does the X tolerance actually do? I see the range is 32 < X < 1023, but how does the result change as X takes different values in this range?
I suggest inspecting the source.

It appears to be the value required for the pixel to be marked as bad. Note that for 12bpp cameras, the range should go up to 4095, and the black level is ~128 so the "normal" value would be higher.
Don't forget what the H stands for.


Re: Is there a way to do badpixel mapping for both JPG and RAW?
« Reply #8 on: 11 / August / 2010, 17:39:02 »
Thanks again. Is the G9 a 12bpp camera?

*

Offline reyalp

  • ******
  • 12109
Re: Is there a way to do badpixel mapping for both JPG and RAW?
« Reply #9 on: 11 / August / 2010, 20:20:43 »
Don't forget what the H stands for.

 

Related Topics