Step-by-Step CCTV Design Lens Calculator for Indoor and Outdoor Cameras
Designing CCTV camera coverage starts with selecting the correct lens and placement. This step-by-step guide walks you through the calculations and practical choices for both indoor and outdoor cameras so you get the needed field of view (FOV), identification distance, and image scale.
1. Gather required information
- Scene width (W): physical width you need to cover (meters or feet).
- Distance to scene (D): distance from camera sensor to the area being imaged (m/ft).
- Desired resolution at target (pixels on target height or identification distance): e.g., you need 100 pixels on target height to identify a person.
- Camera sensor size or crop factor: sensor format (e.g., ⁄3”, ⁄2.8”, ⁄2”, 1”) or exact sensor dimensions (width and height in mm).
- Image resolution: camera pixel count (e.g., 1920×1080).
- Mount constraints: available focal length range and physical mounting location.
2. Key formulas (concepts first)
- Horizontal field of view (HFOV):
HFOV = 2 × arctan( sensor_width / (2 × focal_length) ) - Vertical field of view (VFOV):
VFOV = 2 × arctan( sensor_height / (2 × focal_length) ) - Focal length required for a given scene width at distance D:
focal_length = (sensor_width × D) / W (Same formula applies using sensor_height and scene height.) - Image scale (pixels per meter) at distance D:
pixels_per_meter = image_pixels_horizontal / (HFOV_width_in_meters) where HFOV_width_in_meters ≈ 2 × D × tan(HFOV/2) - Pixels on target (for target height H):
pixels_on_target = pixels_per_meter × H
(Use consistent units: convert sensor dimensions to same units as focal length, and D, W, H to meters or feet.)
3. Step-by-step calculation example (assume indoor corridor)
Assumptions (reasonable defaults):
- Corridor width W = 3 m
- Distance from camera to corridor centerline D = 6 m
- Target height H (person) = 1.7 m
- Camera resolution = 1920 px horizontal (1080p)
- Sensor = ⁄2.8” (approx. sensor_width = 5.36 mm, sensor_height = 3.02 mm)
Step A — Choose whether width refers to horizontal FOV. For corridor, use W = 3 m as HFOV width.
Step B — Compute focal length: focal_length = (sensor_width × D) / W = (5.36 mm × 6000 mm) / 3000 mm = 10.72 mm
Step C — Compute HFOV (optional verification): HFOV = 2 × arctan(5.36 / (2 × 10.72)) ≈ 2 × arctan(0.25) ≈ 28.6°
Step D — HFOV width in meters: HFOV_width ≈ 2 × D × tan(HFOV/2) ≈ 2 × 6 × tan(14.3°) ≈ 3.03 m (close to target 3 m)
Step E — Pixels per meter: pixels_per_meter = 1920 px / 3.03 m ≈ 634 px/m
Step F — Pixels on target (person height 1.7 m): pixels_on_target ≈ 634 × 1.7 ≈ 1078 px — more than enough for identification.
Conclusion for this example: a ~10.7 mm focal length on a ⁄2.8” sensor at 6 m gives ~3 m coverage and ~1,078 vertical pixels on a 1.7 m person using a 1920×1080 camera.
4. Outdoor considerations
- Longer distances: for outdoor coverage or perimeters increase D and recompute focal length; longer focal lengths narrow FOV.
- Lighting and atmospheric effects: at long ranges, haze and low light reduce effective resolution; choose sensors with larger pixels or higher dynamic range.
- Weatherproof housings and IR: ensure lens and housing allow IR if needed; IR angle can change effective coverage at night.
- Vibration and wind: use secure mounts and consider image stabilization for long focal lengths.
5. Practical tips and checks
- Round focal length to standard values: lenses come in standard focal lengths (e.g., 2.8, 4, 6, 8, 12, 16, 25 mm). Choose the closest one and re-check coverage.
- Use sensor datasheets: exact sensor_width/height and pixel pitch yield more accurate results.
- Account for distortion: wide-angle lenses have distortion; measure usable FOV after distortion correction.
- Verify on-site: final verification with a test camera ensures coverage and identification performance.
- If identification is critical: aim for 100–250 pixels on target height (industry varies); the example used higher pixels for extra margin.
6. Quick checklist to run the calculator
- Measure W, D, and target height H.
- Look up sensor_width and resolution.
- Compute focal_length = (sensor_width × D) / W.
- Pick nearest standard lens and recompute HFOV and pixels_on_target.
- Confirm lighting, housing, and mounting satisfy environment.
7. Tools and references
- Use an online CCTV lens calculator or spreadsheet to automate steps.
- Consult sensor datasheets and camera resolution specs.
- Test on-site before deployment.
If you want, I can compute focal lengths and expected pixels for specific camera sensor models, distances, and scene sizes — provide sensor type, resolution, D, W, and target height.