Hi all,
I use the following line of code to create an HDR from a series of LDRs taken by a DSLR camera with a fish-eye lens.
hdrgen IMG_*.JPG -r response_function.rsp -o test.hdr
in the header of the output HDR file I get the following information about the view angles:
VIEW= -vtv -vh 132.699707 -vv 113.398345
This is actually not true, and the viewing angle for this lens and camera is around 184.5 according to the measurements.
This apparently causes problems when using Evalglare:
header contains a perspective view type definition !!!
stopping…!!!
My questions are:
- What could be the source of these assumptions about the viewing angles?
- Is there any way to define the measured view angles to prevent this while generating HDR?
Nima
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
just make sure you use the 184.5° for both -vv and -vh , except you cut away the 2.25° on right, left,top and bottom each. I find it easier to keep the 184.5° in the header, evalglare is calculating all angles according to the header and considers only the 180° for any evaluation.
In case the only use of the image is evalglare, you can provide also the viewing angles to it without changing header (evalglare -vv 184.5 -vh 184.5 -vta … ). However, having the right header in the image is always the better solution, especially in terms of documentation and later re-use of the image.
cheers
Jan
1 Like
Helpful comment Jan, Thanks.
The view angle of our camera itself is 184.5° according to our measurements. Would you still suggest putting 184.5 for evalglare calculations?
Best,
Nima
well, if you have a 5.20m long room, do you model it with 5m? I dont understand your question - the header of the image describes the optics of your lens and if you have 184.5° why putting then 180° ? If you do so, all calculations are slightly deviating.
Jan
1 Like
There was a small misunderstanding on my side when reading your first comment, it is all clear now.
Thanks,
Nima
Actually, I misread your first post, so it was all my fault!
-G