Pages: [1]   Go Down

Author Topic: Why do Adobe98 vs Prophoto inputs to SNS-HDR give different results?  (Read 351 times)

Redcrown

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 507

I recently discovered that the HDR program SNS-HDR produces different results depending on whether the input images are in Adobe98 or Prophoto. Adobe98 outputs are slightly darker than Prophoto. I even tried feeding monochrome images and still got different results. The input files all look identical, regardless of colorspace. I questioned this on the SNS forum, and the author of the program said the reason is that Adobe98 and Prophoto have different gamma curves.

I don't understand that, and remain confused because other HDR programs I tested (Photomatix, Aurora) produce identical results for both Adobe98 and Prophoto inputs. Likewise, other non-HDR programs I've tested also produce consistent results regardless of the colorspace of the input images.

Is the author's claim that results will vary depending on colorspace reasonable?
Logged

Guillermo Luijk

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2005
    • http://www.guillermoluijk.com

It is reasonable, but I can say the author has been a bit lazy not to take the input colour profile gamma into account, because doing so is quite simple once you know the colour profile in which the image is encoded. In fact a proper way to work on tone mapping algorithms would be in a linear space (gamma=1.0) which would in the end be reverted to the desired output colour space's gamma. Anyway it should be simple for you as well correcting those darker images with an additional gamma-type curve.

Basically what happens here is that SNS-HDR is surely focused on getting a certain histogram distribution, but the same RGB values will render darker or lighter depending on the gamma of the colour profile used:



These three histograms correspond to the same image, with the same appearance on screen:



Since ProPhoto RGB's gamma is 1,8, the histogram gets lower levels than when represented in sRGB (gamma close to 2,2) or Adobe RGB (gamma 2,2), just look at the position of the blue peak.
If SNS-HDR's algorithm tries to produce a given histogram distribution, it will render lighter in ProPhoto RGB than in Adobe RGB because a similar RGB combination corresponds to a lighter colour in ProPhoto RGB than in Adobe RGB.
Example: RGB levels for different gray tones:



Regards
« Last Edit: May 06, 2020, 05:37:02 pm by Guillermo Luijk »
Logged
Pages: [1]   Go Up