[Radiance-general] HDR image absolute calibration cmd line

Van Den Wymelenberg, Kevin kevinv at uidaho.edu
Fri Apr 15 16:29:53 PDT 2011


Greg- thanks - this works perfectly.  However I am also running an exposure adjustment prior to this using pfilt - to set the exposure to 1.  In this case the last cmd does not work.  Is there a way to do both corrections? 

Fyi- i also did vignetting correction w pcomb.



Kevin Van Den Wymelenberg
University of Idaho 
Integrated Design Lab
208.724.9456

On Apr 14, 2011, at 12:52 PM, "Greg Ward" <gregoryjward at gmail.com> wrote:

> Hi Kevin,
> 
> What you ask is a very tricky scripting operation.  If you know exactly where the point you want to calibrate is in every image, you can script it with some combination of the Radiance ra_xyze, pcompos, pvalue, and total programs.  Let's say you know that you have a value of 322 cd/m^2 in the square from (x,y)=(300,450) to (380,530) -- y pixels measured from the bottom of the image and x from the left, you could compute the average using:
> 
> 	set img_val=`ra_rxyze -o capture.hdr | pcompos -x 80 -y 80 - -300 -450 | pvalue -h -H -d -pG | total -m`
> 
> You could then use this to compute a correction (calibration) factor to the image exposure:
> 
> 	set meas=322
> 	set ecorr=`ev "179*$img_val/$meas"`
> 
> The 179 value is the standard lumens/watt conversion used in Radiance, and the 322 value is your measured luminance value.  You then need to add the above to your image header, which can be accomplished with getinfo like so:
> 
> 	(getinfo < capture.hdr ; echo EXPOSURE=$ecorr ; getinfo - < capture.hdr) > calibrated.hdr
> 
> I hope this helps.
> 
> -Greg
> 
>> From: Kevin Van Den Wymelenberg <kevinv at uidaho.edu>
>> Date: April 14, 2011 11:34:01 AM PDT
>> 
>> I am looking for a cmd line interface to automate the spot luminance calibration of HDR images -  ie - similar to what Photosphere  does via GUI “Apply – Calibration”.
>> 
>> Thanks!
>> 
>> 
>> Kevin Van Den Wymelenberg
>> Integrated Design Lab – Boise, Director
>> College of Art & Architecture, Assistant Professor
>> University of Idaho – Boise Center
>> www.uidaho.edu/idl  
>> 
>> ph. 208.724.9456                    fx. 208.343.0001                    306 S. 6th Street                    Boise, ID  83702
>> 
>> 
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20110415/c2a168d5/attachment.html>


More information about the Radiance-general mailing list