Cameras & sensorsTroubleshooting

Black live view on a machine vision camera: the four checks

A black live view from a machine vision camera is usually the aperture, exposure or light, not the camera. The four checks in order, with numbers and a fix.

LumaSpec Vision12 min read Share on LinkedIn

On this page 10 sections
  1. 01Why is my live view black when the camera opens fine?
  2. 02How do I confirm frames are actually arriving?
  3. 03Is the lens aperture closed or the cap still on?
  4. 04What exposure and gain settings should I start with?
  5. 05How much light does the part need?
  6. 06What does a known-good bench set-up look like?
  7. 07How do I save two frames per second for two minutes?
  8. 08When is a black image actually the camera's fault?
  9. 09What order do I check everything in?
  10. 10Questions

The camera enumerates, the tool opens it, the live view starts — and the display stays black. Nine times out of ten the hardware is fine and the image is simply near zero: a closed iris, an exposure set for a bright factory strobe, or a bench with no real light on the part. This guide walks the diagnosis in the order that finds the fault fastest, gives starting values for ExposureTime and Gain, shows the bench arithmetic from field of view to exposure, and ends with the two-frames-per-second, two-minute capture plan that produces 240 images for a test.

Why is my live view black when the camera opens fine?

Because almost no light is reaching the sensor: the iris is closed, ExposureTime is too short, or the scene is too dark — in that order, and the camera and driver are working normally the whole time. A black live view is a pixel-value problem, not a connection problem. The camera keeps delivering frames; every frame just comes back with values near zero, so the display renders black.

Two normal behaviours get mistaken for a fault here. The camera icon often changes colour the moment you open the device: that is exclusive control, marking the camera as held by your tool and closed to other software. And a black live view with the frame counter running is expected when the optics and lighting are wrong. For the classic short checklist of this same symptom, read camera black image: check exposure, lighting and lens cap; this guide adds the numbers, the optics arithmetic and the capture plan.

How do I confirm frames are actually arriving?

Watch the frame or grab counter in your capture tool: if it increments at the set frame rate, transport is fine and the fault is optical; if it stays at zero, you have a connection or trigger problem instead. Click the play or start-grab button above the display and look for a frame count, a timestamp, or the last-frame buffer updating. Any of the three proves the pipe works.

If no frames arrive at all, stop here and fix the link first: a red X on a GigE device is a network or driver issue, and GigE camera red X error in your vision software: a fix plan covers it. If the camera opened in one tool and refuses a second, the diagnosis is in GigE camera open fails in a second tool: exclusive control. If you drive a strobed light and only short exposures come back black, the strobe-to-exposure timing is at fault: strobe light on but camera image is black: fix the timing.

Is the lens aperture closed or the cap still on?

Yes, on most benches it is: open the iris ring fully (lowest f-number, typically f/1.4 to f/2.8) and remove the cap before touching any software setting, because a closed iris blocks every fix you make later. It is the first thing to check and the cheapest. Manual-iris C-mount lenses carry a ring marked in f-numbers; turn it to the smallest number. Shipping caps hide in foam and fit so neatly they read as the lens front.

The f-number scale is squared light: halving the f-number passes four times the photons. Opening from f/16 to f/2.8 admits (16 / 2.8)² ≈ 32 times the light, more than five stops in one twist of the ring. That is why the iris comes before ExposureTime in the order. If the lens is auto-iris or motorised, drive it fully open from software: the control loop can hold it nearly shut in a dark room, a failure mode covered in automatic iris, exposure and gain control in machine vision.

What exposure and gain settings should I start with?

Set ExposureTime to 20,000 µs, Gain to 0 dB, and switch ExposureAuto and GainAuto off while you diagnose: those two manual values give a repeatable baseline, and the automatic modes hide the very fault you are chasing. ExposureTime is in microseconds under the GenICam standard features naming convention, so 20,000 µs is 20 ms. Raising exposure from a strobe-era factory value of 500 µs to 20 ms collects 40 times the light in one move.

Gain is the last dial, not the first. Every 6 dB multiplies the signal by two and the noise with it, so keep Gain at 0 dB while exposure headroom remains, and treat anything above 12 dB as a message that the scene needs more photons rather than more amplification. Leave BlackLevel at 0 during diagnosis; an offset there fakes a fix by lifting the black floor, and camera black level setting: when to raise it above zero covers the legitimate uses. For the code-level side of the write itself, see setting camera exposure time through a GenICam API in Python.

How much light does the part need?

Enough for a histogram mean of 100 to 120 grey levels out of 255 in 8-bit, with no more than about one percent of pixels pinned at 0 or 255: that is the brightness every later setting — exposure, gain, threshold — is tuned against. Open the histogram view and read it from the live image. A mean of 3 with the iris open and 20 ms of exposure does not need threshold surgery; it needs light on the part.

General room lighting is almost never enough for a machine vision camera at 20 ms. A ring light around the lens barrel is the standard bench fix, because it lights the part evenly from every direction and clears the field of view of shadows. Two units cover most diagnosis work. The LS-RNG-0426 is a diffused white ring light, 120 mm in outside diameter, with a 0° output angle on 24 V, for even, glare-free light on flat and slightly curved surfaces. The LS-RNG-0730 is a standard 103 mm ring light with a 48 mm inner diameter for the lens to look through.

Ring lightsRing light, 120 mm dia., 0°, White (LS-RNG-0426)LS-RNG-0426
Size
100-200 mm
Type
Diffused
$369.00View part
Ring lights103 mm dia. ring light, 48 mm inner dia. (LS-RNG-0730)LS-RNG-0730
Size
100-200 mm
Type
Standard
$279.00View part

Dimming and strobing that light belongs on one of the light controllers rather than on a power-supply knob. The LS-CTL-0322 is a four-channel digital controller, 16-24 V output with an 8 A total, which stores a repeatable brightness setting per channel instead of an unmarked potentiometer.

Light controllers4-Channel Digital LED light controller, 16-24V, AC100-240V 50/60 Hz, 8 A total output (LS-CTL-0322)LS-CTL-0322
Output
Constant voltage 24 V
Channels
4 channels
Control
Digital
$539.00View partBuild a system with it

Two neighbouring cases are worth reading while the light is on the bench: NIR camera shows a black image in low light: add IR illumination for near-infrared scenes, and black bars in some camera images: fix lighting flicker vs exposure when mains-powered lamps make brightness beat between frames.

What does a known-good bench set-up look like?

A 150 mm part at 400 mm working distance, on a sensor 7.07 mm wide with 2048 pixels of 3.45 µm, takes a 16 mm lens, shows a 170 mm field of view, resolves 0.083 mm per pixel, and exposes cleanly at 20 ms around f/4. These are illustrative bench values, not limits — they demonstrate the arithmetic you reuse for your own geometry.

Start from the field of view and the sensor:

m = sensor width / field of view f = WD × m / (1 + m)
  • Sensor width: 2048 px × 3.45 µm = 7.07 mm, a common 1/1.8-inch-class format.
  • Wanted field of view: 200 mm across for a 150 mm part with margin, so m = 7.07 / 200 = 0.035.
  • Focal length: f = 400 mm × 0.035 / 1.035 = 13.6 mm, so take the nearest stock lens, 16 mm.
  • Back-check with the 16 mm lens: m = 16 / (400 − 16) = 0.0417, field of view = 7.07 / 0.0417 = 170 mm, so the 150 mm part sits with 10 mm of margin each side.
  • Scale: 170 mm / 2048 px = 0.083 mm per pixel, so a 0.5 mm feature spans 6 pixels — enough for presence checks and edge finds.
  • Exposure: 20 ms near f/4. Stopping down to f/8 for depth of field passes (4 / 8)² = a quarter of the light, so lengthen exposure to 80 ms, still comfortable inside a 500 ms frame period.
How sensor width, working distance and field of view set the focal length Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.CameraField of view (FOV)Working distance (WD)≈ fsensor width slensm = s / FOVf = WD × m / (1 + m)
How sensor width, working distance and field of view set the focal length. Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.

Run your own geometry through the lens focal length calculator — the same three inputs, with the focal length as the output.

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

Check the pixel budget with the camera resolution calculator before ordering: 0.083 mm per pixel fails a 0.05 mm feature requirement no matter how good the light is.

How do I save two frames per second for two minutes?

Set AcquisitionMode to Continuous with AcquisitionFrameRate at 2, keep exposure at 20 ms, and use your tool's save-consecutive-images function or a per-frame callback that writes numbered files: 240 frames at about 3 MB each need roughly 720 MB of disk as 8-bit. The frame period is 500 ms, and a 20 ms exposure leaves 480 ms of it idle, so the capture itself is undemanding.

  1. Set AcquisitionMode to Continuous. If the single-frame option is missing, that is normal for some cameras: AcquisitionMode shows only Continuous: single frames with software trigger explains the workaround.
  2. Set AcquisitionFrameRate to 2 and ExposureTime to 20000.
  3. Name files with a fixed-width counter, frame_0001.png, so replay order matches capture order.
  4. Save raw or lossless PNG for measurement work; at 2 fps the encoder never falls behind.
  5. Read the histogram of the first saved files, not only the live view — a saved-file check catches a pixel-format mismatch the display would hide.

Storage arithmetic: 2048 × 1536 px × 1 byte = 3,145,728 bytes ≈ 3 MB per frame, and 240 frames ≈ 720 MB. Sixteen-bit frames double that to about 1.4 GB; a 12 MP camera at 12 MB per frame needs 240 × 12 MB ≈ 2.9 GB. Budget 4 GB and the two-minute run is never disk-limited. The software side of pacing and callbacks is covered in continuous camera acquisition mode for live image loops. Any small-format GigE area scan camera is equal to this task; the 12 MP rolling-shutter model below is one example.

Area scan cameras12 MP GigE area scan camera, IMX226, 1/1.7" rolling shutter, 9 fps (LS-CMR-0053)LS-CMR-0053
Sensor format
1/1.7"
Lens mount
C-mount
Interface
GigE
Resolution
12 MP
$560.00View partBuild a system with it

When is a black image actually the camera's fault?

When frames arrive with pixel values stuck at zero even with the iris wide open, a 20 ms exposure, and a bright lamp on white paper: an image that never responds to light points at the sensor or its readout, not at your set-up. Run that paper test once — it takes a minute and separates optics from electronics cleanly. If the values move at all, the camera is healthy; go back up the list.

Software can fake a black image too. A rendering problem can blank a display while capture runs normally, and camera window opens but no video: isolate capture from rendering splits the two paths. When the paper test fails on a camera bought here, save one raw frame as evidence and use the contact page — the warranty on these cameras is a 3-year minimum. More set-up notes are collected on the cameras topic page.

What order do I check everything in?

Frames, cap and iris, exposure and gain, then light — in that order, because each test takes under a minute and rules out the next most likely cause before you spend time on it. Keep the histogram open through all of it.

  • Frame counter increments? If not, fix the link first with the red-X plan.
  • Cap off, iris fully open to the lowest f-number, f/1.4 to f/2.8 on most bench lenses.
  • ExposureAuto and GainAuto off; ExposureTime 20000, Gain 0 dB, BlackLevel 0; read the settings back after writing them.
  • Histogram mean below 100 at 20 ms? Add a ring light or halve the working distance before touching gain, and stop by 12 dB.
  • Saved files as dark as the live view? The fault is upstream of the display; brighter files mean a display-path problem.
  • Paper test shows no response to light at all? Then, and only then, raise it with us through the contact page.

When the image is healthy, freeze the recipe: locked exposure and gain, a strobed light on a controller, and a shroud against ambient changes. To turn the diagnosis into an order, the camera configurator walks camera, lens and light together.

Questions

Why does the camera icon change colour as soon as I open it?

That is exclusive control: the first tool to open the device holds it, and the icon change tells you other software cannot open the same camera at the same time. It is normal behaviour, not an error. Close the live view or disconnect in the first tool and the camera becomes available again. If opening still fails with every other tool closed, the handle is held by a background process or a stale driver session.

How do I test whether the camera sensor itself has failed?

Cap off, iris fully open, ExposureTime at the maximum the camera allows, Gain at 0 dB, and the lens aimed at a sheet of white paper under a bright desk lamp: the histogram must move well off zero. If it stays flat at zero whatever the light does, or shows a uniform value that never changes, the sensor path is the fault — save one frame as evidence and use the contact page to start a claim; every camera here carries a 3-year warranty minimum.

Should the 240 test frames be saved as raw or PNG files?

Save raw or lossless. An 8-bit mono frame from a 3 MP sensor is about 3 MB and writes instantly at 2 fps; PNG halves typical size without changing a single pixel value, and either is fine at this frame rate. Avoid JPEG for anything you will measure: block compression adds faint edges around sharp transitions and can shift a threshold result. Use fixed-width names such as frame_0001.png so your analysis script replays them in order.

Is raising gain as good as raising exposure on a dark image?

No. Exposure and aperture add real photons from the scene; gain multiplies the signal you already captured, and the noise comes with it. Each 6 dB of gain doubles brightness. On a static bench at 2 fps you have a 500 ms frame period, so a 20 ms exposure has 480 ms of headroom — raise exposure or add light first, and treat gain above roughly 12 dB as a message that the illumination is too weak.

Will an infrared ring light brighten a dark image?

Only if the camera is built for it. A mono camera without an IR-cut filter responds at 850 nm, though silicon gives roughly half or less of the response there that it gives in the green, so budget more LED power than an equivalent white unit. A colour camera is the wrong home for IR: with the filter removed the colour channels misbalance and measurements drift. Where the scene allows, more white light beats switching bands.