0

Dcraw contains a following algorithm to process image colors: https://gist.github.com/1047302.
Is it a formal (named) image processing algorithm?

If not, what should I read to understand reasoning behind it?

Andrey Shchekin
  • 21,101
  • 19
  • 94
  • 162

1 Answers1

1

It's not processing an image. It's generating a lookup table (curve[]) used to perform gamma correction.

Oliver Charlesworth
  • 267,707
  • 33
  • 569
  • 680
  • Is it a specific approach to gamma correction or just a common sense based on the linked article? I am looking at it and do not yet see direct formula correspondence. – Andrey Shchekin Jun 26 '11 at 10:02
  • @Andrey: The code you linked to is terse and uncommented, so it's hard to tell exactly what it's doing (especially all the parameter calculation). However, the loop at the end is populating the table; you can see the use of `pow()` to implement the power-law curve that the Wikipedia article talks about. – Oliver Charlesworth Jun 26 '11 at 10:08
  • Thanks, I suppose it is the answer then. I'll accept it until I find out what exactly is happening there (if I can). – Andrey Shchekin Jun 26 '11 at 20:11