# Hdrgen, defining viewing angle when generating HDRs

**URL:** <https://discourse.radiance-online.org/t/hdrgen-defining-viewing-angle-when-generating-hdrs/5889>\
**Category:** Uncategorized\
**Created:** [April 8, 2022, 1:45pm UTC](https://discourse.radiance-online.org/t/hdrgen-defining-viewing-angle-when-generating-hdrs/5889 "2022-04-08T13:45:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Greg\_Ward](https://discourse.radiance-online.org/user_avatar/discourse.radiance-online.org/greg_ward/32/471_2.png) [@Greg\_Ward](https://discourse.radiance-online.org/u/Greg_Ward)\
**Post date:** [April 8, 2022, 3:08pm UTC](https://discourse.radiance-online.org/t/hdrgen-defining-viewing-angle-when-generating-hdrs/5889/2 "2022-04-08T15:08:49Z")

</div>

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:

```auto
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](https://discourse.radiance-online.org/t/calibration-of-hdr-image/5848/4)) in combination with getinfo like so:

```auto
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

---

_[View the full topic](https://discourse.radiance-online.org/t/hdrgen-defining-viewing-angle-when-generating-hdrs/5889)._
