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
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 <[email protected]>
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
Hi Kevin,
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?.
I don't know what Photosphere does, but if you have worked out your calibration factor like so:
http://www.jaloxa.eu/webhdr/calibrate.shtml
then you can use hdrexpo:
http://www.jaloxa.eu/resources/hdr/hdrexpo/index.shtml
Depending on how accurate you need the per-pixel luminance values, you might also want to look into vignetting correction, but as far as I'm aware, there is currently no simple cmd line approach to this. See
for a paper on this, and
for the presentation to go with it.
Cheers
Axel
PS: WebHDR will be down for the next couple of days.
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" <[email protected]> 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 <[email protected]>
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
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general
Hi Kevin,
Why do you think the last step is not working. The final phase should simply add a new exposure to the existing one. All exposure settings are multiplied together by compliant software, so this should work even if you have altered the initial exposure with pfilt.
Am I missing something?
-Greg
···
From: "Van Den Wymelenberg, Kevin" <[email protected]>
Date: April 15, 2011 4:29:53 PM PDT
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