PanelSimulator Academy

Video Surveillance, lesson 3 of 14

Lenses and field of view

Lesson 2 followed light through four steps inside a camera. The first step, gathering it, is the job of the lens. The lens decides how much of the world lands on the sensor. A wide lens shows a whole room with everything small. A narrow lens shows one doorway with everything large. This lesson shows you how to predict the view from one number printed on the lens.

About 14 minutes. Read lesson 2 first.

Turn the lens

Change the focal length and move the person. The plan shows what the camera covers. The screen shows what it sees.

0 20 40 60 80 100 ft seen from above What the camera sees

The everyday picture

Stand in a room and look out through a window. With your nose against the glass you see the whole street. Step back to the far wall and the same window shows you one parked car.

The window did not change. Your distance from it did. The farther back you stand, the narrower the slice of the world that fits through.

In a camera the sensor is the eye and the lens is the window. The distance between them is called the focal length, measured in millimeters. A short focal length is the nose against the glass: a wide view. A long focal length is the back of the room: a narrow view, with everything in it looking bigger.

Focal length and angle

The slice of the world a camera sees is its field of view. From above it is a fan shape, as in the drawing. The angle of the fan is the angle of view. Data sheets give it in degrees, usually the horizontal angle first.

Two things set the angle: the focal length and the width of the sensor. This table is for the common 1/2.8 inch sensor, about 5.6 mm wide, as lesson 2 described.

Focal lengthHorizontal angleWidth seen at 20 feetTypical job
2.8 mmAbout 90°40 ftA whole small room from a corner
4 mmAbout 70°28 ftA shop floor, a front yard
6 mmAbout 50°19 ftA driveway, a loading dock door
8 mmAbout 39°14 ftA corridor, a pair of doors
12 mmAbout 26°9 ftOne door from across a lobby
25 mmAbout 13°4.5 ftA gate or a plate at a distance

Real lenses bend the picture a little at the edges, so a data sheet often quotes a wider angle for a 2.8 mm lens than this simple geometry gives, sometimes more than 100°. Use the data sheet's angle when you have it.

The same lens gives a wider view on a bigger sensor, because a bigger sensor catches more of the image the lens throws. Change the sensor in the tool above and watch the fan open. This is why you can never judge a lens by its millimeters alone.

The one sum

The fan and the camera's insides are two triangles of the same shape. That gives one simple sum, and it is the most useful in the whole course:

width of scene = distance × sensor width ÷ focal length

Keep the sensor width and focal length both in millimeters, and the scene width comes out in whatever unit you used for distance. With a 4 mm lens on a 5.6 mm sensor, at 30 feet: 30 × 5.6 ÷ 4 = 42 feet wide.

Turn it around to find the lens you need:

focal length = sensor width × distance ÷ width of scene

To see a 14-foot-wide gateway from 40 feet away: 5.6 × 40 ÷ 14 = 16 mm.

Notice what the sum says about distance. Double the distance and the scene is twice as wide, so a person in it looks half the size. A lens that is right at 20 feet is wrong at 60.

Check yourself

You swap a 4 mm lens for an 8 mm lens on the same camera in the same place. What happens to the picture?

Kinds of lens

KindWhat it isGood forWatch out for
FixedOne focal length, such as 2.8 or 4 mm, built into the cameraLow cost, small cameras, standard viewsThe view is whatever you get. Choose the right model before ordering.
VarifocalAdjustable over a range, such as 2.8 to 12 mm, set by hand at the cameraGetting the view exactly right on siteMust be refocused after every change
Motorized varifocalThe same, adjusted from the software, and it focuses itselfMost professional jobs. No second trip up the ladder.Costs a little more
FisheyeA very short lens, under 2 mm, seeing 180° or a full circleAn overview of a whole room from the ceilingStrong bending, and little detail on any one thing

A lens also carries an f-number, which you met in lesson 2. On a lens it tells you the widest the iris can open. On a varifocal lens the f-number usually gets worse as you zoom in, so a lens marked f/1.4 at 2.8 mm may be f/2.8 or slower at 12 mm. A narrow view at night needs more light than a wide one.

Choose a lens

Give the tool a distance and the width you want to see there. It does the sum and picks the nearest common lens.

From a view to a focal length

focal length the sum asks for
nearest common fixed lens
width that lens really shows

Height, distortion and zoom

  • Height of the view. Most cameras make a picture 16 units wide and 9 high. So the height of the scene is a little over half its width: multiply the width by 9 and divide by 16. A 28-foot-wide view is about 16 feet high.
  • Corridors. A corridor is tall and narrow, and a wide picture wastes most of its dots on the walls. Many cameras can be turned a quarter turn and set to a tall 9 by 16 picture, often called corridor mode.
  • Distortion. Wide lenses bow straight lines outward, like the back of a spoon. This is barrel distortion. It stretches the edges and squeezes detail there, so put the important target near the center.
  • Optical and digital zoom. Optical zoom changes the focal length, so the lens really spreads the target over more of the sensor. Digital zoom only enlarges part of the picture already made. It adds size and no detail.
  • Zoom ratios. A lens that goes from 2.8 to 12 mm is roughly a 4× zoom, because 12 ÷ 2.8 is about 4.3. A moving camera with a 30× lens might run from about 4.5 to 135 mm.

Three examples

Simple: the front door

A camera will sit 10 feet from a front door and should show the door and a little wall on each side, about 7 feet across. The sum is 5.6 × 10 ÷ 7 = 8 mm. An ordinary 2.8 mm fixed camera would show 20 feet at that distance, nearly three times too wide, and the visitor's face would be a third of the size it could be.

Medium: "wide, so we see everything"

A customer chooses a 2.8 mm camera for a parking lot because it sees the most. The far row of cars is 80 feet away. There the view is 80 × 5.6 ÷ 2.8 = 160 feet wide, and about 90 feet high. A six-foot person at that distance is roughly one fifteenth of the picture height.

The camera does see everything, and nothing in it is big enough to be useful. Two cameras at 6 mm, each aimed at half the lot, show 75 feet across at 80 feet and more than double the size of every person and car. Wide is a price you pay, not a free extra.

Advanced: the gate that is too far

A camera on a building must watch a 12-foot-wide gate lane 120 feet away. The sum gives 5.6 × 120 ÷ 12 = 56 mm. No ordinary varifocal camera reaches that. The common range stops at 12 mm, which would show 56 feet across at the gate.

You have three honest choices. Fit a camera with a long lens, in the range of 5 to 50 mm or more, and accept that long lenses are slower at night and show every shake of the mount. Move the camera to a pole 25 feet from the gate, where the sum gives 5.6 × 25 ÷ 12, about 11.7 mm, inside a standard varifocal. Or change the sensor: more pixels can make up for a view that is too wide, which is the subject of lesson 4. The pole usually wins, because distance also costs light, haze and steadiness.

From the field

  • Measure the distance. Do not guess it. A laser measure costs little and ends arguments. People underestimate outdoor distances badly.
  • Set the view with a person standing in it. Have a helper stand where the target will be and widen or narrow the lens until they are the size you need.
  • Refocus after every zoom change on a manual varifocal, and tighten both lock screws. A loose screw lets the lens drift over a few weeks of vibration.
  • Do not aim the center at the horizon. Half the picture becomes sky. Tilt down until the farthest thing you care about is near the top edge.
  • Carry a lens table or calculator. The sum takes ten seconds and saves a return visit.

Common mistakes

  • Choosing the widest lens by habit, then finding everything in the picture is too small.
  • Comparing lenses by millimeters without checking the sensor size.
  • Counting on digital zoom to recover detail that the lens never captured.
  • Putting the important target at the stretched edge of a very wide view.
  • Forgetting that a lens right for one distance is wrong for another.

Summary

  • A short focal length gives a wide view with small objects. A long one gives a narrow view with large objects.
  • Width of scene = distance × sensor width ÷ focal length.
  • The same lens is wider on a bigger sensor.
  • Doubling the distance doubles the width and halves the size of everything.
  • Optical zoom adds detail. Digital zoom only enlarges.

Exercises

Use a sensor width of 5.6 mm unless told otherwise. Answer each one yourself first, then open the answer.

Exercise 1. How wide is the scene 50 feet from a camera with a 4 mm lens?

Show answer
50 × 5.6 ÷ 4 = 70 feet.

Exercise 2. You want to see a 10-foot-wide loading door from 30 feet away. Which focal length do you need, and will a 2.8 to 12 mm varifocal do?

Show answer
5.6 × 30 ÷ 10 = 16.8 mm. That is beyond 12 mm. At 12 mm the view would be 30 × 5.6 ÷ 12 = 14 feet wide, which may be acceptable. Otherwise move the camera closer or use a longer lens.

Exercise 3. An 8 mm lens is moved from a camera with a 5.6 mm wide sensor to one with a 7.2 mm wide sensor. What is the scene width at 40 feet before and after?

Show answer
Before: 40 × 5.6 ÷ 8 = 28 feet. After: 40 × 7.2 ÷ 8 = 36 feet. The bigger sensor sees a wider view through the same lens.

Exercise 4 (think, don't memorize). A manager says, "Buy the camera with 16× digital zoom, then we can zoom in on faces afterward." What do you tell them?

Show answer
Digital zoom enlarges the picture that was recorded. It cannot show anything the lens and sensor did not capture at the time. If a face covers only a few dots in the recording, zooming gives a few big blocks. To get faces, the face must be large in the picture when it is recorded. That means a longer lens, a closer camera, or more pixels, aimed at a place people must pass.