# Image calculations

Dear List,

Simple question: I need to divide one image with another ... pixel by pixel, channel by channel. I.e., IM1(x,y,C) / IM2(x,y,C) for all x,y and for all channels RGB and have the result ordered as a new image.

I am messing around with some rlam & pvalue combinations, but there must be some elegant way

Best,
Claus

Sorry about the previous post ... I managed to stumble upon the pcomb command which does exactly what I need ... and more

Best,
Claus

Â·Â·Â·

From: Claus BrÃ¸ndgaard Madsen [mailto:cbm@create.aau.dk]
Sent: 5. januar 2011 09:41
Subject: [Radiance-general] Image calculations

Dear List,

Simple question: I need to divide one image with another ... pixel by pixel, channel by channel. I.e., IM1(x,y,C) / IM2(x,y,C) for all x,y and for all channels RGB and have the result ordered as a new image.

I am messing around with some rlam & pvalue combinations, but there must be some elegant way

Best,
Claus

Hi!

Simple question: I need to divide one image with another â€¦ pixel by
pixel, channel by channel. I.e., IM1(x,y,C) / IM2(x,y,C) for all x,y and
for all channels RGB and have the result ordered as a new image.

Just for completeness:

pcomb -e 'ro=ri(1)/ri(2); go=gi(1)/gi(2); bo=bi(1)/bi(2)' -o image1.hdr -o image2.hdr > result.hdr

The -o flags are important to calculate with the original pixel values (usually radiance W/m2*sr) without any exposure effects.

Cheers, Lars.