Hello
I am trying to get RGB value of an HDR image captured with Canon camera of a light source , in (0-255) scale. I used pvalue -o -h $HDR command but the results are not on the desired range (0-255). Any suggestion is appreciated.
The whole point of HDR is that it doesn't fit in an 8-bit range. The pvalue program will give you integers if you ask for it, and 256 will correspond to 1.0 in the file, but it doesn't stop at that point, and is happy to give you integer values up to some very large limit (31 bits, I think).
If that's not what you want, you can use rcalc to clip the output values over 255 to 255, like so:
pvalue -o -h -di $HDR | rcalc -e 'clip(i):if(i-255,255,i);$1=clip($1);$2=clip($2);$3=clip($3)'
Or, if you are trying to squeeze everything in a 0-255 range, making 255 the maximum and everything else darker, there are ways to do that as well. It's probably not a good move, though, as you'll usually end up with just a few white areas around the light sources, with everything else clipped to 0 (or nearly).
-Greg
···
From: "Mahlab, Seyedeh Farzaneh" <[email protected]>
Subject: [HDRI] RGB extraction
Date: January 31, 2017 11:56:28 AM PST
To: "[email protected]" <[email protected]>
Reply-To: High Dynamic Range Imaging <[email protected]>Hello
I am trying to get RGB value of an HDR image captured with Canon camera of a light source , in (0-255) scale. I used pvalue –o –h $HDR command but the results are not on the desired range (0-255). Any suggestion is appreciated.
_______________________________________________
HDRI mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/hdri
It might help to know what you want to do with the 0-255 RGB values, and why you want to convert the HDR (high dynamic range) into a low dynamic range scale. Greg already pointed out some options in his reply. Is it something that the pcond command might help with? I'm not familiar enough with the code and what the "numbers" are that come out of pcond, but I do know it's intended to allow compression of an image into a lower dynamic range for image representation, even if it would still require further number manipulation to get you 0-255 integers.
-Chris
···
From: Mahlab, Seyedeh Farzaneh [mailto:[email protected]]
Sent: Tuesday, January 31, 2017 2:56 PM
To: [email protected]
Subject: [HDRI] RGB extraction
Hello
I am trying to get RGB value of an HDR image captured with Canon camera of a light source , in (0-255) scale. I used pvalue -o -h $HDR command but the results are not on the desired range (0-255). Any suggestion is appreciated.