PCOND(1)                                                              PCOND(1)



NNAAMMEE
       pcond - condition a RADIANCE picture for output

SSYYNNOOPPSSIISS
       ppccoonndd [ ooppttiioonnss ] iinnppuutt [ oouuttppuutt ]

DDEESSCCRRIIPPTTIIOONN
       _P_c_o_n_d  conditions  a  Radiance  picture for output to a display or hard
       copy device.  If the dynamic range of the scene  exceeds  that  of  the
       display (as is usually the case), _p_c_o_n_d will compress the dynamic range
       of the picture such that both dark and bright regions are visible.   In
       addition,  certain limitations in human vision may be mimicked in order
       to provide an appearance similar to the experience one  might  have  in
       the actual scene.

       Command line switches turn flags off and on, changing program behavior.
       A switch given by itself toggles the flag from off to on or on  to  off
       depending  on its previous state.  A switch followed by a '+' turns the
       option on explicitly.  A switch followed by a '-' turns the option off.
       The  default  is all switches off.  Other options specify output device
       parameters in order to get more accurate color and contrast.

       --hh_[_+_-_]    Mimic human visual response in the output.  The goal of  this
                 process  is to produce output that correlates strongly with a
                 person's subjective impression of a scene.  This switch is  a
                 bundle of the _-_a_, _-_v_, _-_s and _-_c options.

       --aa_[_+_-_]    Defocus  darker regions of the image to simulate human visual
                 acuity loss.  This option will not affect well-lit scenes.

       --vv_[_+_-_]    Add veiling glare due to very bright regions  in  the  image.
                 This  simulates  internal  scattering in the human eye, which
                 results in a loss of visible contrast near bright sources.

       --ss_[_+_-_]    Use the human contrast sensitivity  function  in  determining
                 the  exposure  for the image.  A darker scene will have rela-
                 tively lower exposure with lower  contrast  than  a  well-lit
                 scene.

       --cc_[_+_-_]    If  parts  of  the image are in the mesopic or scotopic range
                 where the cone photoreceptors  lose  their  efficiency,  this
                 switch will cause a corresponding loss of color visibility in
                 the output and a shift to a scotopic (blue-dominant) response
                 function.

       --ww_[_+_-_]    Use  a  center-weighted  average for the exposure rather than
                 the default uniform average.  This may improve  the  exposure
                 for scenes with high or low peripheral brightness.

       --ii _f_i_x_f_r_a_c
                 Set  the  relative  importance of fixation points to _f_i_x_f_r_a_c_,
                 which is a value between 0 and 1.  If _f_i_x_f_r_a_c  is  zero  (the
                 default), then no fixation points are used in determining the
                 local or global adaptation.  If _f_i_x_f_r_a_c is greater than zero,
                 then  a  list  of  fixation  points is read from the standard
                 input.  These points are given as tab-separated (x,y) picture
                 coordinates, such as those produced by the _-_o_p option of _x_i_m_-
                 _a_g_e_(_1_)_.  The foveal samples about these fixation points  will
                 then  be  weighted  together with the global averaging scheme
                 such that the fixations receive _f_i_x_f_r_a_c of the total  weight.
                 If  _f_i_x_f_r_a_c is one, then only the fixation points are consid-
                 ered for adaptation.

       --II_[_+_-_]    Rather than computing a histogram of foveal samples from  the
                 source picture, use the precomputed histogram provided on the
                 standard input.  This data should be given in  pairs  of  the
                 base-10 logarithm of world luminance and a count for each bin
                 in ascending order, as  computed  by  the  _p_h_i_s_t_o_(_1_)  script.
                 This  option  is  useful for producing identical exposures of
                 multiple pictures (as in an animation), and provides  greater
                 control over the histogram computation.

       --ll_[_+_-_]    Use  a  linear  response  function  rather  than the standard
                 dynamic range compression algorithm.  This will  prevent  the
                 loss  of  usable  physical  values  in  the  output  picture,
                 although some parts of the resulting image may be too dark or
                 too bright to see.

       --ee _e_x_p_v_a_l Set  the exposure adjustment for the picture to _e_x_p_v_a_l_.  This
                 may either be a real multiplier, or a (fractional) number  of
                 f-stops  preceeded  by  a  '+' or '-'.  This option implies a
                 linear response (see the _-_l option above).

       --uu _L_d_m_a_x  Specifies the top of the luminance range for the target  out-
                 put  device.  That is, the luminance (in candelas/m^2) for an
                 output pixel value of (R,G,B)=(1,1,1).  The default value  is
                 100 cd/m^2.

       --dd _L_d_d_y_n  Specifies  the  dynamic  range  for the target output device,
                 which is the ratio of the maximum and minimum usable  display
                 luminances.  The default value is 32.

       --pp _x_r _y_r _x_g _y_g _x_b _y_b _x_w _y_w
                 Specifies  the  RGB  primaries  for the target output device.
                 These are the 1931 CIE (x,y)  chromaticity  values  for  red,
                 green, blue and white, respectively.

       --ff _m_a_c_b_e_t_h_._c_a_l
                 Use  the  given  output file from _m_a_c_b_e_t_h_c_a_l_(_1_) to precorrect
                 the color and contrast for the target  output  device.   This
                 does  a  more  thorough  job than a simple primary correction
                 using the _-_p option.  Only one of _-_f or _-_p may be given.

       --xx _m_a_p_f_i_l_e
                 Put out the final mapping from  world  luminance  to  display
                 luminance to _m_a_p_f_i_l_e_.  This file will contain values from the
                 minimum usable world luminance  to  the  maximum  (in  cande-
                 las/m^2) in one column, and their corresponding display lumi-
                 nance values (also in candelas/m^2)  in  the  second  column.
                 This  file may be used for debugging purposes, or to plot the
                 mapping function created by _p_c_o_n_d_.

EEXXAAMMPPLLEESS
       To display an image as a person might perceive it in the actual scene:

         pcond -h final.hdr > display.hdr
         ximage display.hdr ; rm display.hdr &

       To do the same on a 24-bit display with known primary values:

         setenv DISPLAY_PRIMARIES ".580 .340 .281 .570 .153 .079 .333 .333"
         pcond -h -p $DISPLAY_PRIMARIES final.hdr | ximage &

       To prepare a picture to be sent to a film recorder destined  eventually
       for  a  slide  projector with a minimum and maximum screen luminance of
       1.5 and 125 candelas/m^2, respectively:

         pcond -d 83 -u 125 final.hdr > film.hdr

       To  do  the  same  if  the  output  colors  of   the   standard   image
       "ray/lib/lib/macbeth_spec.hdr" have been measured:

         macbethcal -c mbfilm.xyY > film.cal
         pcond -d 83 -u 125 -f film.cal final.hdr > film.hdr

       To  further  tweak the exposure to bring out certain areas indicated by
       dragging the right mouse button over them in _x_i_m_a_g_e_:

         ximage -op -t 75 final.hdr | pcond -i .5 -d 83  -u  125  -f  film.cal
         final.hdr > film.hdr

       To use a histogram computed on every 10th animation frame:

         phisto frame*0.hdr > global.hist
         pcond -I -s -c frame0352.hdr < global.hist | ra_tiff - frame0352.tif

RREEFFEERREENNCCEE
       Greg  Ward  Larson,  Holly  Rushmeier, Christine Piatko, ``A Visibility
       Matching Tone Reproduction Operator for High  Dynamic  Range  Scenes,''
       _I_E_E_E  _T_r_a_n_s_a_c_t_i_o_n_s  _o_n  _V_i_s_u_a_l_i_z_a_t_i_o_n  _a_n_d _C_o_m_p_u_t_e_r _G_r_a_p_h_i_c_s _, December
       1997.

       http://www.sgi.com/Technology/pixformat/Larsonetal.html

AAUUTTHHOORR
       Greg Ward Larson

SSEEEE AALLSSOO
       getinfo(1),   macbethcal(1),   normtiff(1),    pcompos(1),    pflip(1),
       phisto(1),   pinterp(1),  pvalue(1),  protate(1),  ra_xyze(1),  rad(1),
       rpict(1), ximage(1)



RADIANCE                           10/27/98                           PCOND(1)
