RSS/Atom feed Twitter
Site is read-only, email is disabled

Color temperature correction GeglOperation

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

Color temperature correction GeglOperation Jan Heller 25 Apr 19:52
  Color temperature correction GeglOperation Øyvind Kolås 26 Apr 11:09
Color temperature correction GeglOperation Jan Heller 26 Apr 18:09
  Color temperature correction GeglOperation Kevin Cozens 26 Apr 18:36
Color temperature correction GeglOperation Jan Heller 28 Apr 23:41
Jan Heller
2008-04-25 19:52:43 UTC (almost 17 years ago)

Color temperature correction GeglOperation

Hi,

attached is a GeglOperation performing color temperature correction. This is of course analogical to the whitebalance operation that is already in the Gegl source tree, though it uses photographer friendly input values. It has two parameters, estimated temperature of the light source in K the image was taken with and Corrected estimation of the temperature of the light source in K. The computation is a rather simple linear interpolation of a data table. I wrote it to better familiarize myself with Gegl and I am posting it here in hope it will be useful for others.

Regards,
Jan

Øyvind Kolås
2008-04-26 11:09:49 UTC (almost 17 years ago)

Color temperature correction GeglOperation

On Fri, Apr 25, 2008 at 6:52 PM, Jan Heller wrote:

I wrote it to better familiarize myself with Gegl and I am posting it here in hope it will be useful for others.

I think it is a good operation to have, so I have commited a slightly modified version to svn.

GEGL and babl deals with the out of gamut handling themselves at a later stage, during processing we preserve headroom and footroom. This allows us to change the contrast of the image to bring details back in later. The implemented gamut handling also seemed to introduce banding that the conversions in babl does not.

It would also be nice to replace the planckian locus lookup table with a function that approximates it.

/Øyvind K.

Jan Heller
2008-04-26 18:09:45 UTC (almost 17 years ago)

Color temperature correction GeglOperation

Hi,

On 11:09, Sat 26 Apr 08, Øyvind Kolås wrote:

On Fri, Apr 25, 2008 at 6:52 PM, Jan Heller wrote:

I wrote it to better familiarize myself with Gegl and I am posting it here in hope it will be useful for others.

I think it is a good operation to have, so I have commited a slightly modified version to svn.

Nice, thanks!

GEGL and babl deals with the out of gamut handling themselves at a later stage, during processing we preserve headroom and footroom. This allows us to change the contrast of the image to bring details back in later. The implemented gamut handling also seemed to introduce banding that the conversions in babl does not.

Good to know.

It would also be nice to replace the planckian locus lookup table with a function that approximates it.

I played with MATLAB for a while and came up with rational functions of degree 5 that approximate the Planckian locus dataset reasonably well. Attached is a modified version of the operation using these approximations.

Regards, Jan

Kevin Cozens
2008-04-26 18:36:49 UTC (almost 17 years ago)

Color temperature correction GeglOperation

Jan Heller wrote:

On 11:09, Sat 26 Apr 08, Øyvind Kolås wrote:

It would also be nice to replace the planckian locus lookup table with a function that approximates it.

I played with MATLAB for a while and came up with rational functions of degree 5 that approximate the Planckian locus dataset reasonably well. Attached is a modified version of the operation using these approximations.

I haven't looked at the code yet, but I would have thought execution would be faster using the lookup table than having to calculate values using a formula especially given that the formula only approximates the values of the table.

Jan Heller
2008-04-28 23:41:08 UTC (almost 17 years ago)

Color temperature correction GeglOperation

Hi,

On 18:36, Sat 26 Apr 08, Kevin Cozens wrote:

Jan Heller wrote:

On 11:09, Sat 26 Apr 08, Øyvind Kolås wrote:

It would also be nice to replace the planckian locus lookup table with a function that approximates it.

I played with MATLAB for a while and came up with rational functions of degree 5 that approximate the Planckian locus dataset reasonably well. Attached is a modified version of the operation using these approximations.

I haven't looked at the code yet, but I would have thought execution would be faster using the lookup table than having to calculate values using a formula especially given that the formula only approximates the values of the table.

In the previous version of the code the values outside the lookup table got interpolated anyway. The approximating functions are really quite good and pretty fast. Since this computation only takes place only at the beginning of the operation and not per pixel basis, the speed impairment is really negligible.

Regards, Jan