Hdrgen, defining viewing angle when generating HDRs

The view angles computed by hdrgen are based on a perspective camera model. Fisheye lenses do not obey this default (-vtv) model, so that is why the angles are inaccurate.

You can replace the view string with corrected parameters using the latest (HEAD) release of Radiance and the new getinfo -r option, like so:

getinfo -r "VIEW= -vta -vh 180 -vv 180" < test.hdr > corrected.hdr

However, this will not be quite right, since your image is non-square. If you know the exact dimensions of the circular area in the image, you can use the new rcrop tool (see post) in combination with getinfo like so:

rcrop 20 210 900 900 test.hdr | getinfo -r "VIEW= -vta -vh 180 -vv 180" > corrected.hdr

I’m making up the first 4 numbers, since I don’t know what row in the image marks the top of the circle (20) or what column marks the left of it (210). The third and fourth #rows and #columns should be the same for a square result, but I don’t know the size of yours.

Note that the rcrop tool and the getinfo -r option are both recent additions based on requests for the care and feeding of evalglare.

Cheers,
-Greg

1 Like