Tutorial: Turning a Floor Plan into a Camera Layout with Lens and Mounting Height

Contents
A camera plan that starts with the number of cameras produces coverage and no evidence. A plan that starts with a sentence per position produces fewer cameras and material that can be used.
The sentence is always the same shape: at this point, this has to be provable. Everything after it – lens, resolution, mounting height, angle – follows from that sentence by arithmetic, and the arithmetic fits on one page.

Starting from the Question, Not from the Camera
Four levels of usefulness are defined in EN 62676-4, and they are known by their initials: detect, observe, recognise, identify. Each is a pixel density measured across the scene, and the steps between them are factors of two.
| Level | Density | What the recording supports |
|---|---|---|
| Detect | 25 px/m | Something is there and it is moving |
| Observe | 62 px/m | What is happening: someone walks, someone carries something |
| Recognise | 125 px/m | A known person can be matched to the image |
| Identify | 250 px/m | An unknown person can be described well enough to be found |
Which level is needed is a question about the place, not about the budget. A yard needs observation, because the useful question there is what happened. A gate, a front door, a till, a corridor without an alternative route – those need identification, because the useful question there is who.
That distinction is what keeps the plan small. Identification is expensive and only works over a short stretch; observation is cheap and covers a lot. A plan in which every camera identifies is a plan that has not been thought through, and it usually ends as a plan in which none of them does.
Marking the Points on the Plan
The first pass over a floor plan or a site plan is done without any camera in mind. Three marks are enough.
A cross goes on every point everyone has to pass: gate, entrance door, staircase, the counter. These are the identification points, and there are fewer of them than expected – a property usually has two or three, not eight.
A hatched area goes over everything that needs to be watched rather than resolved: the yard, the car park, the storage area. Observation level, wide lens, few cameras.
And an arrow goes at every point where the sun stands low. A camera facing a glass door to the west has a bright rectangle in the afternoon and a silhouette in front of it, and no lens fixes that. Wide dynamic range widens the tolerance by a stop or two; turning the camera so the light comes from behind it removes the problem.
From the Task to the Lens
Two formulas connect the mark on the plan with the item in the order. The first turns focal length into a width, the second turns that width into a density.
scene width = distance × sensor width / focal length
pixel density = horizontal pixels / scene width
Worked once, with a common sensor of 1/2.8 inch – 5.6 millimetres wide – and a 4K camera at 3840 pixels across. The gate is 20 metres from the mounting point, and identification is required.
required width = 3840 px / 250 px/m = 15.4 m
required focal = 20 m × 5.6 mm / 15.4 m = 7.3 mm
with an 8 mm lens: 20 × 5.6 / 8 = 14.0 m → 274 px/m identify
with a 6 mm lens: 20 × 5.6 / 6 = 18.7 m → 206 px/m recognise
with a 2.8 mm lens: 20 × 5.6 / 2.8 = 40.0 m → 96 px/m observe
The next lens up from 7.3 is the one to order, because a lens that is slightly too long only narrows the field, whereas one that is slightly too short drops a whole level. And the same calculation run backwards gives the second useful number: with the 8 mm lens, identification holds out to 21.9 metres and recognition to 43.8. That pair of distances belongs in the plan, because it says where the camera stops doing its job.
One correction that is easy to forget: a person crossing the field at an angle is farther away than the point on the plan. Measuring the distance to the far edge of the passage rather than to its centre costs nothing and prevents a camera that identifies only in the middle of the doorway.
Mounting Height and Angle
Pixel density assumes the subject appears across the frame. A camera mounted high and angled down sees the top of a head at a wonderful density and identifies nobody, and no calculation in the previous section notices.
Two rules cover it. At the identification point, the angle between the camera axis and the horizontal should stay under about 20 degrees – at 20 metres distance and a face height of 1.6 metres, that puts the camera between 2.5 and 3.5 metres up. And a camera lower than 2.5 metres is within reach, which is a different kind of problem.
angle = atan( (mounting height − 1.6 m) / distance )
3.0 m at 20 m → 4.0° good
3.0 m at 5 m → 15.6° still acceptable
3.0 m at 2 m → 35.0° top of the head, not a face
The last line is the common failure at an entrance door: the camera sits above the door and looks down at the person standing in it. The fix is not a better camera but a different position – across from the door rather than above it, far enough away that the angle stays flat.
Infrared range needs the same suspicion as pixel density. A specification of 30 metres is measured with the narrowest lens the housing offers; the same illuminator over a 90-degree field reaches perhaps a third of that, because the same light is spread over nine times the area.
Writing the Plan Down
A camera plan that survives the installation is one table. One row per camera, and the columns are exactly the decisions that were made.
| Position | Task | Distance | Lens | Height | Density |
|---|---|---|---|---|---|
| Driveway to gate | Identify | 20 m | 8 mm | 3.0 m | 274 px/m |
| Yard, overview | Observe | 12 m | 4 mm | 3.5 m | 229 px/m |
| Entrance door | Identify | 4 m | 2.8 mm | 2.6 m | 480 px/m |
The second row shows why the table is worth keeping. A 4 mm lens at 12 metres reaches identification density on paper – and the camera is still an observation camera, because at the far end of the yard, thirty metres out, the same lens delivers 91 px/m. A density figure without the distance it was measured at means nothing, which is why both columns stand next to each other.
Two more fields belong in the same row and are left out of most plans: which stream feeds the recording and which one feeds the detection, and how many days of footage the storage has to hold. Both are decisions, both change the bitrate, and both are far cheaper to make now than after the cameras are up.
Checking It Before the Cable Goes In
The plan can be tested before anything is mounted, and the test takes an hour.
A phone camera has a known equivalent focal length, usually around 26 millimetres in 35 mm terms, which corresponds to a horizontal field of about 67 degrees. Standing at the intended mounting point and photographing the scene shows the framing of a roughly 4 mm lens on a 1/2.8-inch sensor. That is enough to see whether a pillar is in the way, whether the neighbour’s window is in frame, and where the sun stands at four in the afternoon.
The framing for a longer lens comes from the same photo: an 8 mm lens covers half the width of a 4 mm one, so a rectangle drawn over the middle half of the picture is what the camera will see.
After the installation, one measurement settles whether the plan held. A person stands at the identification point, a still is taken from the recording, and the face is measured in pixels. A face is about 16 centimetres wide, so 250 px/m corresponds to a face 40 pixels across. Fewer than 40 means the level was missed, whatever the data sheet promised.
That measurement is worth repeating in the dark. Pixel density is a daytime ceiling; at night the aperture opens, noise rises and the noise reduction smooths away exactly the detail the pixel count promised. A person walking at 1.4 metres per second moves 4.7 centimetres during a 1/30-second exposure, which at 274 px/m is thirteen pixels of blur straight across a face. Where identification is genuinely required at night, the shutter has to be capped at 1/100 second and the missing light has to come from a lamp rather than from a longer exposure.
Questions and answers
The data sheet gives the field of view in degrees instead of the sensor width. How does the calculation work then?
Directly. In the article’s first formula, focal length and sensor width together determine only one thing: how wide the scene is at a given distance. The horizontal field of view in degrees describes the same thing, and the calculation becomes scene width = 2 × distance × tan(field of view / 2). For the 8 mm lens on the 1/2.8-inch sensor that works out to about 39 degrees, and 2 × 20 m × tan(19.3°) gives back the 14.0 metres of the worked example.
The figure in degrees has two advantages. First, it needs no sensor size, because it already contains the sensor’s effect: the same 8 millimetres in front of a sensor twice as wide would give twice the scene width and, at the same pixel count, half the density, which is why a focal length without the sensor size does not carry over from one camera to another. Second, it is the manufacturer’s figure for exactly this combination of lens and sensor, so for wide lenses it includes the distortion that the simple formula knows nothing about. For varifocal lenses the data sheet usually lists both ends of the range; what counts for the plan is the field the lens is finally set to.
How far does identification reach at the entrance door with the 2.8 mm lens?
To just under 7.7 metres, and recognition to a little over 15 metres; both follow from the same backwards calculation as for the 8 mm lens. At 4 metres the lens delivers 480 px/m, almost twice the identification level, and at a mounting height of 2.6 metres the angle there is 14 degrees, below the limit of about 20.
Does the calculated pixel density survive in the recording when the bitrate is tight?
Not necessarily. Pixel density says how many pixels a face covers on the sensor; how much of that survives compression is decided by the bitrate. An encoder that is short of bitrate economises on fine detail first, and most of all where something moves, that is, precisely on a person walking through the gate. The result looks like too low a density even though lens and distance are right.
That is why the still for the face measurement is taken from the recording rather than from the live view, which may come from a different stream, and why the stream and the retention days sit in the same row as lens and density. If the bitrate is lowered later, for instance because storage is running short, the measurement is worth repeating: the level can be lost without anything in the plan having changed.
Does corridor format, with the image turned on its side, change the pixel density?
No; with square pixels it stays the same. The camera is mounted rotated by 90 degrees, and the width of the scene then falls on the short side of the sensor, with 2160 instead of 3840 pixels. Because that side is shorter in the same proportion, the density per metre stays the same at the same focal length. The picture becomes narrower and taller, which is a gain at a door or in a corridor, because fewer pixels go to the walls on either side and more to the height of the passage.