Hello Yulia,

Seems your question has spawned quite a bit of interesting discussion...

My main recommendation is to use camera RAW images for critical photometry, 
especially when there are saturated colors involved.  It is impossible to 
correct the color of JPEG images and undo what the camera maker has done, so 
you need to start from the sensor data.

Photosphere does not accept camera RAW as input, but I have written a Perl 
script that uses dcraw with the command-line HDR image builder hdrgen to 
overcome this limitation.  It also requires the use of another third-party 
program, exiftool, which I have packaged together for you at:

        http://www.anyhere.com/gward/pickup/raw2hdr.tgz

Unfortunately, I don't have a good set of documentation to go with it.  Typing 
"raw2hdr" by itself shows the basic syntax:

        Usage: raw2hdr [hdrgen opts][-h][-w][-C calib][-c cspace] -o output.hdr 
input1.raw ..

If your images are taken on a tripod (aligned exposures), you can use the 
default settings:

        raw2hdr -o output.hdr expos1.cr2 expos2.cr2 expos3.cr2 ...

The hdrgen settings can be found in the included HTML man page, and so can the 
-h and -w option meanings in the included dcraw man page.  The -C option is to 
provide a linear factor to correct the overall exposure based on previous 
calibrations.  The -c option is to specify an output color space.  The default 
is "sRGB" which is actually linear CCIR-709 primaries.  The only other output 
color space I would recommend is AdobeRGB.  There is a CIE XYZ space supported 
by dcraw, but I have found it to be somewhat unreliable, and I don't know where 
the fault lies in this.

Regarding Axel's mention of camera flare, this is less of an issue for sources 
that are brighter than the rest of the scene.  It mostly affects darker, 
surrounding regions.  The -f option will attempt to estimate the camera/lens 
PSF and remove it, but it cannot be relied upon to remove this source of error 
completely.  Your problem with the accuracy of the LED sources is due no doubt 
(as others have said) to limitations in your short exposures combined with the 
color issues inherent to JPEG processing.

Other responses inline....

> From: "Tyukhova, Yulia" <[email protected]>
> Date: February 19, 2012 9:34:25 PM PST
> 
> Hello everybody!
> I’ll provide the summary of my research and have questions within the 
> summary. I would appreciate any of your help!
> My research investigates if HDRI technique can precisely capture luminances 
> of small bright light sources (e.g. LED garage fixtures) with narrow light 
> distributions.
> I was able to figure out luminance values for a single LED, which can be 
> compared to the ones from HDR images. But I have a couple of 
> questions/concerns on HDRI technique and Photosphere. 
> At first, I’ve used “regular” scene to retrieve response curve of the camera 
> (large smooth gradients with very dark and bright areas, and had reflectance 
> standards for the absolute calibration).
> Camera: EOS T1i Rebel with 28-105mm lens, at 28mm
> Calibrated at the grey reflectance sample 186.45 cd/m2
> CF=0.957
> 
> I’ve got the following RC for RGB:
> red(r) = -6.434199e-03+ 4.518039e-01*r + 1.291426e+00*r^2 + 1.802896e+00*r^3;
> green(g) = -5.804720e-03+ 4.175837e-01*g + 1.176582e+00*g^2 + 
> 1.721643e+00*g^3;
> blue(b) = -4.376831e-03+ 3.784418e-01*b + 1.075695e+00*b^2 + 1.658471e+00*b^3
> If I look at the histogram of the scene, maximum luminance within the scene 
> is 60,291 cd/m2. 
> Then I use this RC to analyze HDRI of a captured LED. The value is 230,000 
> cd/m2 for a single LED, which is low (it’s has to be around 7*106 cd/m2). So, 
> it underestimates the luminance.
> It seems like calibration point is critical here. I’ve decided to try to 
> capture a different scene for deriving RC with a wider range. It would make 
> sense that camera has to see higher luminance values in order to accurately 
> measure them later. The dynamic range has to cover measured values. 
> 1.    How does Photosphere deals/approximates/calculates the upper end of the 
> curve? I assume it gives more weight to mid tone values? But what happens 
> with high luminance values?
Photosphere (and hdrgen) use all the brightest pixels from the shortest 
exposure and all the darkest pixels from the longest exposure.  Middle 
exposures have their brightest and darkest pixels downgraded.
> So, the new brighter scene was picked with the direct sun! But in order to 
> avoid the damage of the camera’s sensor, measurements were taken before the 
> sunset.
> In the new brighter captured scene without the calibration all values for 
> reflectance standards were overestimated, while the value for the sun 
> underestimated. Then I decided to calibrate my scene at the sun!
> But when I apply absolute calibration, it simply multiplies CF to all values.
> 2.     I assumed when CF is applied, it does not equally change all values, 
> but does it proportionally to RC (since it is not linear).  Why does it do it 
> equally for the whole range?
> Lsun=80*106 cd/m2. And of course CF is very big 391.
> New RC:
> red(r) = 3.219064e+00+ -2.655078e+01*r + 9.351069e+02*r^2 + 
> -2.115052e+03*r^3+1.594538e+03*r^4;
> green(g) = 2.094164e+00+ -1.468109e+00*g + 7.306838e+02*g^2 + 
> -1.720743e+03*g^3+1.380693e+03*g^4;
> blue(b) = 1.049078e+00+ 1.591820e+01*b + 5.848958e+02*b^2 + 
> -1.461635e+03*b^3+1.251033e+03*b^4
> But then something interesting happened. When I analyze LED, it gives a value 
> of 79*106 cd/m2. So, it jumps to this upper limit calibrated with the sun 
> previously.
> (I had similar results for EOS 7D with the lens 16-35mm, at 16mm)
> 

I don't think your shortest exposure properly captured the LED, and maybe 
didn't capture the sun, either. 
> 3.     Does photosphere compress the response curve, so at the upper end all 
> values above certain threshold will have the same number?

Photosphere does not compress the curve.
> 4.     Any additional suggestions on properly obtaining and calibrating HDRI 
> for this purpose?

I would only reiterate others' suggestion to use a neutral density filter, and 
using raw2hdr rather than Photosphere.

> -- 
> Thank you,
> Yulia Tyukhova

Best,
-Greg
_______________________________________________
HDRI mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/hdri

Reply via email to