HDR brightness values change after image manipulation with pcompos and pfilt

Hi Chris,

The -o option to ra_xyze should eliminate the exposure line, so pcompos shouldn't mess up the values. (I don't think you want to use the pcompos '-o' option, which specifies an anchor offset and isn't used correctly in your command.)

The pextrem command gives you the absolute brightest and darkest pixel, whose values will change with filtering as everything gets averaged with its neighbors. Cropping the image can also affect the extrema, since they may have lived in the pixels you cropped out. Slight changes on the order of 1% can be explained just by scaling RGBE image values, whose accuracy is no better than this.

Best,
-Greg

ยทยทยท

From: Chris Humann <chris@coolshadow.com>
Date: March 23, 2012 12:22:46 PM PDT

Dear list,

I would like to both scale down the resolution and crop a circular fisheye HDR photograph of the skyvault using the following commands to do so but can't figure why I'm getting slight changes in brightness values.

The max brightness of the original HDR image is:
==> pextrem -o 11:58:00.hdr | rcalc -e '$1=($3+$4+$5)/3*179'
2.23350842
49393.2719

When I crop the fisheye image horizontally to bound the circular fisheye view evenly in the x and y dimension with:
==> ra_xyze -r -o -u 11:58:00.hdr | pcompos -o -x 3744 - -936 0 > 11:58:00_crop.hdr

I get a higher max value and the EXPOSURE header disappears from the file:

==> pextrem -o 11:58:00_crop.hdr | rcalc -e '$1=($3+$4+$5)/3*179'
1.88461284
49702.3333

Then when I scale the image down:

==> pfilt -1 -e 1 -x /4 -y /4 11:58:00_crop.hdr > 11:58:00_crop_scale.hdr

I get a lower value:

==> pextrem -o 11:58:00_crop_scale.hdr | rcalc -e '$1=($3+$4+$5)/3*179'
4.05328376
48270.3333

If I perform the scaling operation first the EXPOSURE header remains but the value is still lower:

==> pextrem -o 11:58:00_scale.hdr | rcalc -e '$1=($3+$4+$5)/3*179'
2.59250175
48056.5119

Any thoughts on what I might be doing wrong?

As always, thanks!

Chris