Vision Field Notes

Choosing a Camera for Computer Vision Projects

Many computer vision problems are camera problems in disguise. A blurry, dark or badly placed image limits what any model can do. Before you spend time on training or buying an accelerator, make sure the camera gives your model a fair chance.

This guide covers the main camera types, the specifications that matter, and a practical way to choose.

Start with the task, not the spec sheet

Ask three questions first:

  1. What is the smallest detail the model must see? For example, a helmet on a person, a licence plate, a small defect on a part. This sets the pixels you need on the target.
  2. How fast does the subject move? Fast motion needs short exposure times and often a different sensor type.
  3. What is the lighting? Indoor, outdoor, day only, or day and night.

Then work backwards. A useful rule: the object you care about should cover enough pixels for a human to recognise it in the image you feed the model. If you cannot tell what it is by eye, the model will struggle too. Remember that models usually receive a resized image, so a 4K frame shrunk to a small input loses detail. Think in terms of pixels on target after resizing.

The same worker in a hard hat and orange vest shown four times, resampled to 262, 60, 30 and 15 pixels tall. At 15 pixels the helmet is a few yellow blocks.
The same person at fewer and fewer pixels, enlarged for display. At 15 pixels tall you can no longer confirm a helmet by eye, and a model will struggle too. Footage: Intel IoT DevKit sample videos (CC BY 4.0). Detections: YOLOv8n.

The main camera types

USB webcams

A USB webcam is the easiest way to start. It needs no network setup, works with cv2.VideoCapture on most systems and is cheap. Most use the UVC standard, so they work without special drivers.

Strengths: simple, cheap, good for prototypes, desks and short cable runs. Limits: USB cable length is short unless you use active extenders, many webcams have automatic exposure and focus that you cannot fully control, and consumer lenses are often wide with soft corners.

CSI camera modules

CSI cameras connect directly to the board's camera connector. A Raspberry Pi camera module is the common example. They offer low latency and good control over exposure and gain through the camera stack. Some variants have interchangeable lenses.

Strengths: low overhead, good control, compact. Limits: short ribbon cables, tied to specific boards and software stacks, and not suited to long distances.

IP cameras over RTSP

For anything permanent, such as workplace monitoring, traffic or retail, IP cameras are the normal choice. A PoE IP camera sends compressed video (usually H.264 or H.265) over the network using RTSP, and power comes through the same Ethernet cable from a PoE switch.

Strengths: long cable runs, weatherproof models, infrared night modes, proper lenses and mounting, many cameras on one network. Limits: you receive compressed video, so you must decode it; latency and buffering need care; and each camera has its own settings and quirks.

If you go this route, read Reading RTSP streams with OpenCV and FFmpeg and Handling RTSP dropouts. Reliable stream reading is half of a real deployment.

Depth and stereo cameras

An OAK-D camera combines an RGB camera with stereo depth and can run neural networks on the device. Depth is useful when you need distance, for example robot navigation, measuring size or separating objects by how far away they are.

Strengths: depth data, on-device processing option. Limits: higher cost, depth is noisy on textureless or shiny surfaces, and you need to learn its SDK.

Do not buy depth because it sounds advanced. If a regular camera answers your question, use that.

Specifications that matter

Resolution

More pixels are not always better. Higher resolution means more decoding work, more bandwidth and slower inference if you feed it to the model. Choose the lowest resolution that keeps your target large enough. Many detection systems run a sub-stream at lower resolution for analytics and keep the main stream for recording.

Frame rate

Match frame rate to the motion. Counting people at a door rarely needs more than a few analysed frames per second. A fast conveyor needs more. Note that the camera's frame rate and the rate you analyse can differ; you can skip frames on the analytics side.

Shutter type and exposure time

This is often overlooked. A rolling shutter reads the image line by line, so fast motion can look skewed. A global shutter captures the whole frame at once and is better for fast-moving objects. For slow scenes, rolling shutter is fine.

More important for most projects is exposure time. Long exposure in low light causes motion blur, and a blurred object is hard to detect. If you can, set a short fixed exposure and add light rather than letting the camera lengthen exposure at night.

Four versions of a warehouse frame with increasing horizontal blur. Sharp: person 0.87. 17 pixel blur: person 0.83. 25 pixel blur: the worker is labelled fire hydrant 0.75. 41 pixel blur: no detection.
Horizontal motion blur was added to one real frame to mimic a long exposure. Mild blur only lowers the score, but heavier blur turns the worker into a wrong class and then into nothing. Footage: Intel IoT DevKit sample videos (CC BY 4.0). Detections: YOLOv8n.

Lens and field of view

A wide lens covers more area but makes objects small. A narrow lens enlarges distant targets but sees less. Wide lenses can also add distortion at the edges. Pick the field of view so that your target has enough pixels at the farthest point you care about. Many projects solve this by moving the camera closer, not by buying a higher resolution.

Low light and infrared

Night performance depends on sensor size, lens aperture and illumination. Infrared night mode gives a monochrome image, and your model may need training data from that mode. A model trained only on daytime colour images can behave very differently on infrared footage.

Video compression

Compression artefacts blur fine detail. High bitrate settings preserve more detail but cost bandwidth and storage. H.265 saves bandwidth compared with H.264, but check that your decoding path supports it well. If detections are poor, look at the actual frames your code receives, not only the camera's web preview.

Lighting beats resolution

Good, even lighting improves results more often than a more expensive camera. Practical points:

Placement and mounting

Position matters as much as hardware.

How to evaluate a camera before buying many

  1. Record sample footage from the real location at the real times of day, including the worst lighting.
  2. Run your model on that footage and look at the misses.
  3. Check whether failures come from the image (blur, dark, small objects) or from the model.
  4. Only then decide whether to change the camera, the lens, the position or the training data.

In production video analytics, a common problem is trusting a short demo recorded in perfect light. Footage from the real site, across the full day, is the honest test. The pre-deployment testing checklist describes this in more depth.

Quick decision guide

Situation Reasonable starting point
Desk prototype, learning USB webcam
Compact embedded device, short cable CSI camera module
Permanent site, long cable, outdoors PoE IP camera with RTSP
Need distance or 3D information Depth or stereo camera
Fast-moving objects Short exposure, global shutter, more light

Checklist

Next steps

Continue with Reading RTSP Streams with OpenCV and FFmpeg, then A Pre-Deployment Testing Checklist for Vision Models.