Calibration of hdr image

Hi all,
This post is related to the former one (Correction of HDR images) and this problem is not solved yet. I tried the suggestion of @Greg_Ward to use -h to pcompos and pcomb. The script about the whole calibration process is as follows:

ra_xyze -r -o 1.hdr > 1_r.hdr
pcompos -x 3580 -y 3580 -h 1_r.hdr -955 -37 > 1_cr.hdr
pcomb -h -f ${hdr}/ -o 1_cr.hdr > 1_eqd.hdr
pcomb -h -f ${hdr}/ -o 1_eqd.hdr > 1_vi.hdr
pcomb -h -s 1.24 1_vi.hdr > 1_cf.hdr
pfilt -1 -x 1000 -y 1000 1_cf.hdr > 1_re.hdr
(getinfo < 1_re.hdr | sed "/VIEW/d" && getinfo - < 1_re.hdr) > 1_w.hdr
getinfo -a "VIEW = -vta -vv 180 -vh 180" < 1_w.hdr > 1_c.hdr
falsecolor -i 1_c.hdr -e -s a > 1_f.hdr
evalglare -V 1_c.hdr >> Ev.txt

The error is like this:
When I didn’t use -h option and error is like this:
Then I checked the exposure of image 1_cr.hdr using pcompos and its exposure entry is changed. It seems that the dcrawback of pcompos(Radiance 5.4a (2022-02-06)) still exist after that fix.(Usage of ximage - #4 by Greg_Ward)

Any advice or solution to this problem is appreciated!

you need to get rid of the exposure entry and the easiest way to do this is to apply ra_xyze -r -o also directly after pcompos.
Below an example script that works properly under linux.
hope that helps

hdrgen *.JPG -o unmodified.hdr -a -e -f -g
VIEW="-vta -vh 180 -vv 180"
ra_xyze -r -o unmodified.hdr
|pcompos -x $DIM_CROP -y $DIM_CROP -h - -$OFFSET_X -$OFFSET_Y
|ra_xyze -r -o
| pcomb -f …/ -o -
| getinfo -a “VIEW= $VIEW”
| pcomb -f “…/vignetting_NIKON_SIGMA8_”$ -o - > uncalibrated.hdr

Hi @Jan_Wienold
Thanks for your advice and it works! There is no error warning and I got the result of the eye vertical illuminance.

I recently added a tool called rcrop, which is available in the latest github release. You can use it instead of pcompos to crop pictures, and it has the advantage of maintaining all the parameters in a way that is acceptable to evalglare. The man page synopsis is:

   rcrop row0 col0 nrows ncols [ input [ output ] ]

The first four arguments are integers, and the input and outpu files must be of the same type. As well as HDR pictures, rcrop supports matrices, encoded depth, and encoded surface normal files. The row parameters are numbered from 0 at the top of the image, unlike the usual Radiance coordinates, so as to make sense with matrix data. (Similarly, Y or rows are given before X or columns.) So, your command that was:

| pcompos -x $DIM_CROP -y $DIM_CROP -h - -$OFFSET_X -$OFFSET_Y



where $OFFSET_R is $ORIG_Y_DIM-$DIM_CROP-$OFFSET_Y to count pixels from the top.


P.S. Edited to correct error pointed out by @lee