[HDRI] ximage and hdri

Thomas Bleicher tbleicher at googlemail.com
Mon Jun 1 15:02:39 PDT 2009


On 1 Jun 2009, at 21:29, Roberto Rodriguez wrote:

> I´m a PhD student from Argentina, member of a research team  
> advocated to
> the study of natural lighting. We are exploring the HRDI technique  
> and we
> found a limitation while using hdrgen and ximage: Only squared  
> shapes are
> avaiable to average Luminances, and we need to calculate the mean
> Luminances for radial shapes (circular, toroidal) in order to get the
> luminance contrast in the field of view.

I assume you refer to the interactive command key 'l' to display
luminance of the 'area of interest' which is a rectangular selection
of the image.

If you can calculate the pixel coordinates for your shapes you
can use the command line tool 'pvalue' to get the value of a pixel
at (x,y) of the image. Sum up all the values and divide by the number
of pixels and you have your average.

If you can't calculate those pixel coordinates easily you can
create a black and white mask to isolate the area of interest.
You would then combine the mask and your picture, get the sum
of all pixels in the image but divide by the number of pixels
that are not zero (black).

> How can we overcome this? Can we "borrow" the source code of ximage
> so we can write a script acording to our needs?

The source code for ximage is freely available. You can find
the CVS repository online here:

http://www.radiance-online.org/cgi-bin/viewcvs.cgi/

The ximage source code is located in ray/src/px/.


Regards,
Thomas




More information about the HDRI mailing list