Download from GiHub: https://github.com/geojames/imageResolution
The script has a few limitations...
- It's only for nadir (downward-facing) imagery. Once you get away from nadir (low or high oblique) pixel resolutions change with the depth of field (i.e. the pixels close to the camera have a higher spatial resolution than the pixels far away). That being said, this script can be used to get a ballpark estimate for low-oblique imagery.
- It only works for standard cameras, and will not work for super wide angle lens (e.g. GoPros or the wide angle lenses on the early DJI Phantom platforms). As a rule-of-thumb, the horizontal field of view for your camera should be 70 degrees or less.
- Obligatory disclaimer...The calculations are basic trigonometric functions that do not take into account other variables like lens distortion. Given the wide range of potential cameras the calculated values should be treated as estimates and not as absolute truth.
- The number of pixels on the sensor in the X (horizontal) and Y (vertical) directions, which you can get from the properties of an image taken with your camera.
- The horizontal and vertical fields of view (FOV angles) for your camera. These are usually in the manufacturer's specifications for the camera/lens. If you're unsure, scour the web the answer is out there. If you only have the diagonal FOV you can do some right-angle trig with the aspect ratio of the sensor to estimate the horz. and vert. FOV values.
Run this script from the command line or an editor. Enter the values for each prompt. The calculations in this script are unit independent, but all linear distance values (e.g. resolutions or flying heights) need to be in the same units (feet, meters, whatever you like...).