ximage and hdri

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.

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

···

--
Dis. Ind. Roberto G. Rodriguez
Laboratorio de Ambiente
Humano y Vivienda-LAHV
INCIHUSA-CRICYT-CONICET
Av. Ruiz Leal s/n, Pque. Gral. San Martín
(5500) Mendoza, Argentina
Tel. 54-261-5244334
Fax: 54-261-4287370
[email protected]
http:www.cricyt.edu.ar

--
Dis. Ind. Roberto G. Rodriguez
Laboratorio de Ambiente
Humano y Vivienda-LAHV
INCIHUSA-CRICYT-CONICET
Av. Ruiz Leal s/n, Pque. Gral. San Martín
(5500) Mendoza, Argentina
Tel. 54-261-5244334
Fax: 54-261-4287370
[email protected]
http:www.cricyt.edu.ar

low teck approach, just command line:
I would just generate a mask with photoshop, an image with just white and black pixels, but in RGB.
convert it to tiff and then to pic (ra_tiff -r ).
use pcomb with image 1 and image 2 and write an expression that takes value of pixels in your HDR only if they are inside of the mask, all the others null (basically multiply image 1 by image 2, check that the mask contains 0 and 1 only!).
use pvalue on the filtered image and convert to numbers
use total and get the sum of all data from filtered image, TL
count the white pixels in the mask (pvalue and total for example), TN
TL/TN = average luminance within the mask
....
the whole thing can be written in a script.
and perhaps also put together with a nice sequence of pipes.
G

···

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.

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

--
Dis. Ind. Roberto G. Rodriguez
Laboratorio de Ambiente
Humano y Vivienda-LAHV
INCIHUSA-CRICYT-CONICET
Av. Ruiz Leal s/n, Pque. Gral. San Martín
(5500) Mendoza, Argentina
Tel. 54-261-5244334
Fax: 54-261-4287370
[email protected]
http:www.cricyt.edu.ar

--
Dis. Ind. Roberto G. Rodriguez
Laboratorio de Ambiente
Humano y Vivienda-LAHV
INCIHUSA-CRICYT-CONICET
Av. Ruiz Leal s/n, Pque. Gral. San Martín
(5500) Mendoza, Argentina
Tel. 54-261-5244334
Fax: 54-261-4287370
[email protected]
http:www.cricyt.edu.ar

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

Hi Roberto,

Radiance is open source and is available at www.radiance-online.org. The program "ximage" is part of the Radiance tool set. Rather than hacking ximage source code there may be other ways to calculate the average luminances that want. For example it is possible to read in values from an image on a per pixel basis, depending on what you are trying to accomplish this could be coupled with an image mask to sample only selected pixels.

Regards,

-Jack de Valpine

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.

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

--
# Jack de Valpine
# president
#
# visarc incorporated
# http://www.visarc.com
#
# channeling technology for superior design and construction

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

···

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

Wouldn't it be a little faster to just create a mask (selection is easiest in this case) in Photoshop and use the average filter?

Chris

low teck approach, just command line:
I would just generate a mask with photoshop, an image with just white
and black pixels, but in RGB.
convert it to tiff and then to pic (ra_tiff -r ).
use pcomb with image 1 and image 2 and write an expression that takes
value of pixels in your HDR only if they are inside of the mask, all
the others null (basically multiply image 1 by image 2, check that the
mask contains 0 and 1 only!).
use pvalue on the filtered image and convert to numbers
use total and get the sum of all data from filtered image, TL
count the white pixels in the mask (pvalue and total for example), TN
TL/TN = average luminance within the mask
....
the whole thing can be written in a script.
and perhaps also put together with a nice sequence of pipes.
G

···

On 6/1/09 2:18 PM, "Giulio" <[email protected]> wrote:

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.

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

--
Dis. Ind. Roberto G. Rodriguez
Laboratorio de Ambiente
Humano y Vivienda-LAHV
INCIHUSA-CRICYT-CONICET
Av. Ruiz Leal s/n, Pque. Gral. San Martín
(5500) Mendoza, Argentina
Tel. 54-261-5244334
Fax: 54-261-4287370
[email protected]
http:www.cricyt.edu.ar

--
Dis. Ind. Roberto G. Rodriguez
Laboratorio de Ambiente
Humano y Vivienda-LAHV
INCIHUSA-CRICYT-CONICET
Av. Ruiz Leal s/n, Pque. Gral. San Martín
(5500) Mendoza, Argentina
Tel. 54-261-5244334
Fax: 54-261-4287370
[email protected]
http:www.cricyt.edu.ar

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

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

photoshop cs4 pro?
cool!

···

On 2 Jun 2009, at 20:15, Chris Cox wrote:

Wouldn’t it be a little faster to just create a mask (selection is easiest in this case) in Photoshop and use the average filter?

Chris

On 6/1/09 2:18 PM, "Giulio" <[email protected]> wrote:

low teck approach, just command line:
I would just generate a mask with photoshop, an image with just white
and black pixels, but in RGB.
convert it to tiff and then to pic (ra_tiff -r ).
use pcomb with image 1 and image 2 and write an expression that takes
value of pixels in your HDR only if they are inside of the mask, all
the others null (basically multiply image 1 by image 2, check that the
mask contains 0 and 1 only!).
use pvalue on the filtered image and convert to numbers
use total and get the sum of all data from filtered image, TL
count the white pixels in the mask (pvalue and total for example), TN
TL/TN = average luminance within the mask
....
the whole thing can be written in a script.
and perhaps also put together with a nice sequence of pipes.
G

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.
>
> How can we overcome this? Can we "borrow" the source code of ximage
> so we
> can write a script acording to our needs?
> Thank you.
>
> --
> Dis. Ind. Roberto G. Rodriguez
> Laboratorio de Ambiente
> Humano y Vivienda-LAHV
> INCIHUSA-CRICYT-CONICET
> Av. Ruiz Leal s/n, Pque. Gral. San Martín
> (5500) Mendoza, Argentina
> Tel. 54-261-5244334
> Fax: 54-261-4287370
> [email protected]
> http:www.cricyt.edu.ar
>
> --
> Dis. Ind. Roberto G. Rodriguez
> Laboratorio de Ambiente
> Humano y Vivienda-LAHV
> INCIHUSA-CRICYT-CONICET
> Av. Ruiz Leal s/n, Pque. Gral. San Martín
> (5500) Mendoza, Argentina
> Tel. 54-261-5244334
> Fax: 54-261-4287370
> [email protected]
> http:www.cricyt.edu.ar
>
> _______________________________________________
> HDRI mailing list
> [email protected]
> http://www.radiance-online.org/mailman/listinfo/hdri

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

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