Cameras & sensorsTroubleshooting

Cloudy artifacts across the whole image: camera hardware or software

Cloudy artifacts over the whole camera image come from optics, sensor or software; a reference photo and a raw-stream check separate them, with a fix for each.

LumaSpec Vision12 min oku LinkedIn'de paylaş

Bu sayfada 11 bölüm
  1. 01The decision in two tests
  2. 02What a uniform cloud is not
  3. 03Test 1: the reference photo that needs no equipment
  4. 04Test 2: the raw stream, bypassing the application
  5. 05Worked example: a hazed module behind an instrument's own viewer
  6. 06Causes in order of likelihood
  7. 07Fixes for each verdict
  8. 08Choosing the replacement and preventing a repeat
  9. 09When the usual answer is wrong
  10. 10Checklist before you condemn the module
  11. 11Questions

A milky cloud that covers every pixel of an otherwise working feed is one of the few vision faults you can split cleanly. Either something in front of the sensor scatters light — condensation, a film on a lens or window, contamination on the sensor cover glass — or the image degrades after the sensor, in the driver, the image signal processor (ISP) or the transfer. The confusion is worst when the camera lives inside an instrument and its stream reaches you only through that instrument's own application. Two tests run on the host settle it without opening anything: a smartphone reference photo of the same target, and the raw stream in a generic viewer. This guide gives the decision tree, the numbers to read, and the fix for each outcome.

The decision in two tests

The split works because of what each fault can and cannot do. Scattering in the light path treats every viewer the same: condensation or film clouds the raw pixels however you display them. A fault introduced after the sensor exists only in the pipeline that produced it, so it vanishes the moment another program reads the sensor. A target that genuinely hazes under your illumination appears in any camera, including the phone in your pocket. Work the fork in this order:

  1. Photograph the same target from near the camera's viewpoint, under the same room lighting. If the phone shows the same cloud, the target and lighting own it. Re-aim the light or add diffusion; the camera stays.
  2. Phone photo clean, raw stream clean, application frame cloudy — the fault is software: ISP settings, driver processing or compression. Reset defaults, then update the stack.
  3. Phone photo clean, raw stream cloudy with exposure and gain locked — the fault is in that module's light path. If the outer lens was already cleaned, the veil is internal: condensation or film on inner surfaces. Replace the module.

Commit with a number, not an impression. Quantify the veil as local contrast across a featureless region, using the formula in the worked example below. A healthy CMOS sensor shows 1-2 % photo-response non-uniformity on a flat target; a scattering veil measures tens of percent. Above about 10 %, with both tests pointing at the module, the light path is condemned.

What a uniform cloud is not

Four other faults get called haze, and misreading one costs a day:

  • Saturation overflow (blooming). When generated charge exceeds a pixel's full-well capacity during the exposure, the excess spills into neighboring pixels. That is a bright halo around specular features, not milk over the dark regions.
  • Transfer corruption. Cable and controller faults tear rows, shift blocks or drop frames — structure, not a smooth veil. The visual signature is covered in morph kernel corrupted image artifacts: transfer fault or kernel bug, and the network side in diagnosing machine-vision network congestion.
  • ISP over-processing. Over-sharpening halos, 'cartooning' and color shifts come from processing defaults; ISP default settings that look like compression artifacts catalogs the looks and where they come from.
  • Flicker banding. A rolling shutter under pulsed illumination shows bands locked to the drive frequency — banded and moving, while a condensation veil is static or drifts slowly.

Test 1: the reference photo that needs no equipment

  1. Photograph the same target from close to the camera's viewpoint, same room lighting. Leave the phone's exposure on auto — you are judging the target's appearance, not matching levels.
  2. Compare the two images side by side.
  3. If the phone shows the same milky cloud, stop troubleshooting the camera. Reflective stacks — an oxide layer over silicon with patterned metal electrodes — scatter strongly at some angles. Move the light off the specular angle, add a diffuser, or change the viewing angle, then re-shoot.

Test 2: the raw stream, bypassing the application

This test separates optics from software, using the same controlled-comparison logic as camera lens scratch detection with controlled image tests. Run it on the host that owns the camera:

  1. Stop the instrument's own software so it releases the camera. A device held open by another process is the usual refusal.
  2. Open the module in qv4l2, the standard V4L2 test viewer, on the host — over your normal remote session if the station is headless.
  3. Set exposure time and gain to manual, and write both values down.
  4. Find a featureless region of the target. Note the darkest patch of the cloud, the brightest patch, and the region mean, in 8-bit DN (0-255).
  5. Compare against the application's frame at the same exposure and gain.

If the raw stream is clean, the fault is in software. Reset the ISP to defaults first, then inspect the pipeline: a Bayer raw stream from an RGB camera tells you what the driver actually delivers, and some CSI camera modules output raw sensor data with no ISP at all. On JetPack-class CSI hosts, V4L2 CSI image-artifact troubleshooting covers the host-side causes worth ruling out.

If the raw stream is cloudy, confirm the electronics with a capped lens: cover the lens and the frame must fall to a uniform dark level — never exactly zero DN, as the black-level offset in raw 12-bit images explains. A clean dark frame under a cloudy bright frame is the signature of an optical veil, because readout faults do not need light to appear.

Worked example: a hazed module behind an instrument's own viewer

Inputs, with where each comes from:

  • Camera: a compact USB2.0 module with a fixed lens, built into an instrument running at a customer site (the case behind this guide).
  • Host: an embedded Linux single-board computer; the stream is reachable only through the instrument's own application.
  • Target: a reflective chip — silicon with an oxide layer and patterned gold electrodes.
  • Already tried: the outer lens surface wiped once with isopropyl alcohol on a microfiber cloth; the cloud did not change.
  • Test 1: a smartphone photo of the same chip, same room light, shows no cloud.
  • Test 2, exposure and gain locked, 8-bit DN: darkest patch of the cloud 72 DN, brightest patch 118 DN, region mean 95 DN; the cloud sits in the same place in the raw stream.

Rule in words: a veil that survives the raw stream after a clean reference photo sits in front of the pixel array, and its weight is the local contrast across a region that should be uniform.

local contrast = (DN_bright − DN_dark) / DN_mean × 100 %

Arithmetic: (118 − 72) / 95 × 100 % = 46 / 95 × 100 % = 48 %.

Result: a 48 % swing across a featureless oxide region — more than twenty times the 1-2 % non-uniformity a healthy sensor shows on a flat target.

Decision: reference photo clean, raw stream cloudy at fixed exposure and gain, outer lens already cleaned — the veil is internal to the sealed module, condensation or film on an inner surface. Order the replacement; do not open a sealed module at a customer site. Any case above about 10 % local contrast after these two tests condemns the light path. Below about 5 %, treat the frame as sensor non-uniformity and look at software.

Causes in order of likelihood

Field reports on exposed cameras put moisture and surface contamination at the top of image-artifact causes, ahead of electronics. Spend your effort in that order:

Cause What it looks like Which test convicts it Fix
Condensation inside the module or on a window Milky veil, worst under IR or at high gain, static or drifting Phone clean, raw stream cloudy Warm above the dew point, dry-air purge; sealed module: replace
Film on the outer lens or window Static cloud, same shape at any exposure Phone clean, raw cloudy; cleaning changes it One careful wipe, isopropyl alcohol on microfiber
Contamination on the sensor cover glass Soft blotches with sharper edges than condensation Phone clean, raw cloudy, outer cleaning no effect Module service or replacement
ISP or driver settings Halos, over-sharpening, color shifts Raw stream clean Reset defaults, update the stack
Transfer or cable fault Torn rows, shifted blocks, dropped frames Raw stream corrupted in any viewer Reseat, then replace the cable
Target reflectance The same cloud in the phone photo Test 1 Re-aim or diffuse the light

Fixes for each verdict

Optics or sensor. Give condensation a way out before condemning the module: run it above the local dew point until the veil clears, or purge with dry air if the housing allows it. If a proper wipe and a dry-out leave the cloud, replace the module.

Software. Reset the ISP to defaults, then re-apply settings with a proper stop-and-reset rather than a replug — applying new camera settings without replug explains why a replug hides the problem. Lasting image quality belongs in an embedded ISP tuning pass, not in a field hack.

Target and lighting. Move the source off the specular angle, add diffusion, or accept that a gold-on-silicon surface glows under your geometry. The camera is not at fault, and no replacement will change it.

Choosing the replacement and preventing a repeat

Match three things before ordering: field of view, mount, and shutter. Reflective metal features argue for a global shutter. Board-level cameras fit instrument bays; the wider area scan cameras list covers cased units, and the camera finder filters by sensor format, mount and shutter.

For a straight swap into a tight bay, a compact global-shutter board camera is the usual choice:

Board-level cameras3.1 MP USB3 board-level camera, IMX252, 1/1.8" global shutter, 120 fps (LS-BCM-0003)LS-BCM-0003
Sensor format
1/1.8"
Lens mount
C-mount
Interface
USB3
Resolution
5 MP
$690.00View partBuild a system with it

The LS-BCM-0003 is a 3.1 MP USB3 board-level camera with a 1/1.8" global-shutter sensor and 120 fps. When the station can take a cased camera and the target is static or slow:

Area scan cameras12 MP USB3 area scan camera, IMX226, 1/1.7" rolling shutter, 30 fps, 4000 × 3000 resolution (LS-CMR-0166)LS-CMR-0166
Sensor format
1/1.7"
Interface
USB3
Resolution
12 MP
Shutter
Rolling
$560.00View partBuild a system with it

The LS-CMR-0166 is a 12 MP USB3 camera with an IMX226 sensor, 30 fps and a 4000 × 3000 resolution. Field of view comes from sensor size and magnification:

FOV = sensor active area / magnification

For a GigE board camera in the same resolution class there is the LS-BCM-0056. Work the geometry for any 12 MP sensor with 1.6 μm pixels: twelve megapixels in the usual 4:3 layout is 4000 × 3000 pixels, so the active area is 4000 × 1.6 μm = 6.4 mm by 3000 × 1.6 μm = 4.8 mm. At 1:1 magnification the field of view is 6.4 × 4.8 mm; at 0.5× it opens to 12.8 × 9.6 mm. Put your own feature sizes through the camera resolution calculator or start it here:

Camera resolution for the smallest feature
Units
Pixels needed
–
Sensor size
– MP
Smallest sensor that fits
–
Pixel on the part
– mm
Pixels across the feature, that sensor
–

Pixels needed = field / feature × pixels per feature on each axis (field incl. margin). The lens must resolve the pixels too: Nyquist = 1000 / (2 × pixel µm) lp/mm.

Find cameras with enough pixels Open the full calculator

If you keep the existing lens, remember the field changes when the sensor behind it changes — how HFOV moves when the same lens meets a different sensor. Before committing, run the candidate through the board camera evaluation checklist.

In a moving station, specify a drag-chain-rated USB3.0 cable:

Cables3 m USB3.0 camera cable, high-flex (drag chain) (LS-CBL-0219)LS-CBL-0219$62.00View partBuild a system with it

The LS-CBL-0219 is a 3 m USB3.0 high-flex cable rated for drag-chain use; the camera cables category and the accessories finder list other lengths and connector types.

Prevention: a repeat within a few months means the housing, not the camera. Board-level camera housing design from maker STEP files covers the mechanical side. Keep the module above the dew point with gentle standby heat or move it off the cold wall, and give moist air a vent path so it cannot condense on the first surface it meets.

When the usual answer is wrong

  • 'Clean the lens.' The case above did that first and the cloud did not move. Once the outer surface is ruled out, more solvent on coated optics only adds smear.
  • 'It must be the cable.' Smooth, position-stable veils almost never come from transfer faults; those corrupt structure. The exception is power — a sagging supply makes exposure and gain pump, which reads as haze that breathes.
  • 'A reboot cleared it, so it was software.' An instantly clearing cloud points at driver or ISP state. But if it returns with day-night temperature cycles, condensation was the cause after all: the module dried from its own warmth, and the housing needs the fix.
  • 'That banding is haze.' Banding moves with the lighting frequency; a veil stays put. Different causes, different fixes.

Checklist before you condemn the module

  • Reference photo taken under the same lighting, and compared
  • Instrument software stopped; raw stream opened in qv4l2
  • Exposure and gain locked, values written down
  • Local contrast computed on a featureless region: above about 10 % with both tests pointing at the module, replace it
  • Lens-capped dark frame uniform, which clears the readout
  • Outer lens wiped once, correctly, with no change
  • Cable reseated on a moving station; power sag checked
  • Replacement matches field of view, mount and shutter — start it in the system configurator

Still split between two modules? Contact us with the two test frames and the DN readings; free expert support comes with every order.

Sorular

Can a dirty lens really cloud the whole image, not just one spot?

Yes. A thin film of moisture, oil or residue scatters light from bright areas across the whole field, so a uniform film reads as overall milkiness rather than a sharp smudge. A fingerprint near the lens edge is the classic start. Wipe once with isopropyl alcohol on a microfiber cloth. If the cloud does not change, the film sits on an internal surface or the sensor cover glass, and the module comes out.

Why does the image look milkiest at night or under infrared light?

Moisture scatters infrared strongly: even a small amount of condensation on a window or lens turns IR-illuminated frames cloudy and milky, which is why the fault often appears when the station switches to IR or when gain rises in the dark. Daylight frames can look nearly clean. Run the raw-stream test under the same IR illumination you use in production, with exposure locked, or the comparison means nothing.

How do I view the raw stream when the application owns the camera?

Stop the instrument's software first — a device already held open is the usual refusal — then open the module in qv4l2 on the host itself, or over whatever remote session your host allows if it has no screen. Set exposure and gain to manual and write the values down before you judge anything. Compare that frame with the application's frame at the same settings.

Would a bad USB cable cause a uniform haze?

Rarely. Cable and transfer faults corrupt structure: torn rows, shifted blocks, partial frames and dropped images — not a smooth, position-stable veil. The exception is power. A sagging supply makes auto-exposure and gain pump, which reads as a haze that breathes over seconds. Reseat and swap the cable to clear that, but expect true transfer faults to look structured, not milky.

The cloud cleared after a reboot. Is the camera fine?

An instantly clearing cloud points at driver or ISP state, not optics, and the settings should be re-applied with a proper stop-and-reset rather than a replug. But watch the pattern: if the cloud returns with day-night temperature cycles, condensation was the cause after all — the module dried out from its own warmth, and the housing needs fixing before the next cold snap.

What should I check before ordering a replacement module?

Match three things: field of view (sensor size divided by magnification), mount, and shutter type — global for reflective metal features. Keep the failed module for failure analysis: a second hazed module within a few months means the housing breathes moisture, not that two cameras failed. Run your feature sizes through the camera resolution calculator before committing to a sensor.