pvalue -o

HDRI list -

Can someone help me better understand the pvalue ­o option?

http://radsite.lbl.gov/radiance/man_html/pvalue.1.html

I have completed HDRgen for a large data set, and will apply exposure
correction, vignetting correction, then use pvalue (with or without ­o) to
apply the spot calibration using a grey card mask (according to below), and
finally pvalue again (with or without ­o) to get useful results.

This is in the context of the previous post for automating the spot
calibration for a large number of HDRs using luminance meter and grey card
in a scene.

Do I let it at the default (+o)?

Thank you,

···

---

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

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,

the exposure, not the image data itself. pvalue -o would give you the
raw pixel data, ignoring the exposure (and thus the correction you did).
So I would not use the -o switch here, because you want the exposure
correction (which you caluclated from your known luminance values) to be
applied.

Three ways to handle uncertainty in my mail (in ascending order of wisdom):

1) Believe in my mail.[1]

2) Hope that Greg confirms (or rejects) these assumptions.[2]

3) Try out by e.g. using a 10 times higher value for the exposure
correction then you get from your calibration. That should lead to 10
times higher values in the results, if the correction got applied,
right? So if you get these 10 times higher values even with pvalue -o,
my assumption was wrong.

:wink:

Cheers, Lars.

[1] strongly discouraged approach
[2] promising to be on the safe side

···

from my understanding, the exposure correction here is done by modifying

HDRI list -

Can someone help me better understand the pvalue –o option?

PVALUE

I have completed HDRgen for a large data set, and will apply exposure
correction, vignetting correction, then use pvalue (with or without –o)
to apply the spot calibration using a grey card mask (according to
below), and finally pvalue again (with or without –o) to get useful
results.

This is in the context of the previous post for automating the spot
calibration for a large number of HDRs using luminance meter and grey
card in a scene.

Do I let it at the default (+o)?

Thank you,

---

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

*

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
/
/

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

Kevin,

you need to set pvalue -o to get the pixel values from the calibrated HDR image. The pixel luminance is then the weighted average of the RGB channels.

You may use hdrexpo.pl to do the calibration:
http://www.jaloxa.eu/resources/hdr/hdrexpo/index.shtml
-- simply supply the calibration factor (spot meter reading/HDR value)

Cheers

Axel

CORRECTION:

the -o switch was correct, but to get the luminance, you need to multiply the weighted RGB by 179. Better use -b to get the 'brightness' or luminance, which is weighted RGB * 179.

Axel

the -o switch was correct, but to get the luminance, you need to
multiply the weighted RGB by 179. Better use -b to get the 'brightness'
or luminance, which is weighted RGB * 179.

This is still wrong. -b just gives you the weighted average. You need
to multiply times 179 to get luminance (in cd/m2). Sorry if this was
confusing.

Axel