ND filter correction function

Hi all,
The following is one of the images captured with the ND filter 3.0 and cropped in advance:


I created the function file ND_corr.cal by refering to this tutorial(https://doi.org/10.1080/15502724.2019.1684319)
image
The whole correction script is like this:

ra_xyze -r -o test_bcr.hdr > test_rr.hdr
pcomb -h -f ${raw2hdr}/fisheye_corr.cal -o test_rr.hdr > test_eqd.hdr
pcomb -h -f ${raw2hdr}/vignetting_fX.cal -o test_eqd.hdr > test_vi.hdr
pcomb -h -f ${raw2hdr}/ND_corr.cal -o test_vi.hdr > test_nd.hdr
pcomb -h -s 1.24 test_nd.hdr > test_cf.hdr
pfilt -1 -x 1000 -y 1000 test_cf.hdr > test_re.hdr
(getinfo < test_re.hdr | sed "/VIEW/d" && getinfo - < test_re.hdr) > test_w.hdr
getinfo -a "VIEW= -vta -vv 180 -vh 180" < test_w.hdr > test_c.hdr
falsecolor -i test_c.hdr -e -s a > test_f.hdr
evalglare -V test_c.hdr > Ev.txt

The only one image calibrated after the ND filter correction is all white which is abnormal.


I am not clear where is something wrong with this calibration process. Perhaps the order of the correction procedures is errorneous. I hope someone especially the tutorial author @Clotilde_Pierson can supply any advice.Thanks a lot!
The original files can be downloaded from here:
https://drive.google.com/drive/folders/1pG8NSayTF_1-uoZ1mzfDJsAsYb1KnbdW?usp=sharing

Hi Lee,

What is the illuminance that you obtain from evalglare?
Did you try modifying the exposure of the HDR image when you are displaying it?
If you are using ximage to do that, you can do that by specifying a -e value.

In case that does not solve it, can you also share the final hdr image that you get, please?

Thank you,
Clotilde

Hi @Clotilde_Pierson,
The image test_bcr.hdr in the script that I showed is cropped in advance by Photoshop from the original image test.hdr. And test.hdr is generated from the script raw2hdr. The illuminance from evaglare is 68396 lux which is much higher than the measured value 8838 lux. The final image test_c.hdr that is all white is displayed with ximage without modifying the exposure of the HDR image like this:

ximage test_c.hdr

image
And the corresponding falsecolor image is as follows:


Moreover, I tried another script to handle the original image test.hdr by refering to this post:https://discourse.radiance-online.org/t/calibration-of-hdr-image/5848?u=lee

ra_xyze -r -o test.hdr > test_r.hdr
pcompos -x 3600 -y 3600 -h test_r.hdr -941 -26 > test_cp.hdr
ra_xyze -r -o test_cp.hdr > test_rr.hdr
pcomb -h -f ${raw2hdr}/fisheye_corr.cal -o test_rr.hdr > test_eqd.hdr
pcomb -h -f ${raw2hdr}/vignetting_fX.cal -o test_eqd.hdr > test_vi.hdr
pcomb -h -f ${raw2hdr}/ND_corr.cal -o test_vi.hdr > test_nd.hdr
pcomb -h -s 1.24 test_nd.hdr > test_cf.hdr
pfilt -1 -x 1000 -y 1000 test_cf.hdr > test_re.hdr
(getinfo < test_re.hdr | sed "/VIEW/d" && getinfo - < test_re.hdr) > test_w.hdr
getinfo -a "VIEW= -vta -vv 180 -vh 180" < test_w.hdr > test_c.hdr
falsecolor -i test_c.hdr -e -s a > test_f.hdr
evalglare -V test_c.hdr > Ev.txt

And the vertical illuminance is 5304 lux and the final image test_c.hdr which is not all white like the former one:
image
As for the falsecolor image, the peak luminance is smaller than the former one:

Hi Lee,

When you crop your image in Photoshop, you lose the exposure value (just check the getinfo of test.hdr versus that of test_bcr.hdr), unless you had included this exposure in your pixel values by applying ra_xyze (as Jan explained in the other post you refer to and as is explained in the tutorial). By losing the exposure value, you somehow lose the “absolute scale” of the pixel values, and that explains why you obtain a very large illuminance and a white picture.

Therefore, I would suggest following exactly what is written in the HDR tutorial (first ra_xyze on your merged HDR image (not on the one cropped in Photoshop), then pcompos to crop the image and pcomb to apply the corrections including the ND filter correction).

Another attention point would be the location of your luxmeter. As the sun is at the edge of the window, a small displacement between the position of the camera and that of the luxmeter might create a large deviation in vertical illuminance between the two (if a large part of the sun is included in the image taken by your camera than what is covered in the field of view of your sensor).

I hope that helps!

Clotilde

See also this post regarding new rcrop utility.

-Greg

Hi @Clotilde_Pierson,
Thanks for your reply! I checked the exposure values of two images and results are as follows:

As for this problem, if the sun is in the center of the view of the camera and the part of the sun is not so large, the devitation of vertical illuminance would be smaller?

For the exposure, as you can see, in the original image it is 12.8592, whereas in the Photoshop-cropped image, it disappeared (hence is considered to be equal to 1). That’s causing the difference between the correctly processed image at 5304lux and the badly-processed one at 68396lux.

For the second issue, it’s not so much a question of where it is placed in the FOV of the camera, it is more about making sure that the luxmeter and the camera have the same FOV. Since your sun produces a very high luminance, having the same area of the sun in the FOV of the luxmeter and of the camera is important. Hence, you need to pay attention how you place both equipments (e.g. if you would place your luxmeter below the camera lens in this scene, I expect your luxmeter would have a slightly larger area of the sun in its FOV, hence would give a higher illuminance).

Clotilde

Hi @Clotilde_Pierson,
The luxmeter is placed on the top of the lens like this and how about this way?
image

As for this issue, it seems impossible to make the luxmeter and the camera have the same FOV. Is it better when the luxmeter is next to the lens at the same height? What is the suitable way to handle the position relationship between the lens and luxmeter?