Cameras & sensorsTroubleshooting

Color camera artifacts: diagnose false colors and moiré

Diagnose color camera artifacts with tests for Bayer false colors, moiré, motion, and channel alignment before changing optics or camera architecture.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01Sort the symptom before changing hardware
  2. 02Establish a trustworthy image path
  3. 03Test static sampling and moiré first
  4. 04Calculate sampling and exposure budgets
  5. 05Separate motion from line-to-line registration
  6. 06Use height and position to expose optical errors
  7. 07Compare camera architectures with the same parts
  8. 08Verify corrective changes before ordering
  9. 09Questions

Localized false colors do not automatically mean the camera needs replacing. First separate sampling artifacts from color-channel misregistration: sampling errors often change with magnification or pattern angle, while registration errors follow motion, timing, or surface geometry. A third group comes from incorrect image conversion or optical color fringing.

This troubleshooting procedure is for inspecting fine print, woven textures, patterned surfaces, and moving parts. You will establish a reliable image path, calculate sampling and exposure limits, and compare corrective changes using representative samples. For the underlying resolution trade-off, start with color camera spatial resolution beyond the pixel count.

Sort the symptom before changing hardware

Begin with the highest-probability causes for the observed pattern. Uniformly incorrect colors suggest a conversion problem before an optical problem. Fine colored fringes on stationary repetitive detail suggest sampling. Displaced colored outlines on moving material suggest registration or motion.

Observed symptom First suspect Discriminating test Corrective direction
Most red objects appear blue Channel order or image conversion Capture a known color target Correct the pixel interpretation
False colors around fine stationary edges Bayer sampling and reconstruction Change magnification or target angle Increase sampling or limit optical detail
Broad colored waves across repeating texture Spatial aliasing and moiré Change image scale slightly Rebalance field of view, resolution, and optical bandwidth
Colored outlines change with transport speed Color-channel timing or row compensation Compare controlled speed conditions Correct synchronization and distance mapping
Fringes change with surface height Geometry-dependent channel registration Test stepped samples Reassess optical geometry and compensation
Fringing increases toward image corners Lens chromatic aberration or channel alignment Move the same target across the field Evaluate the lens and optical alignment

Record the artifact at native image resolution. A preview window can add aliasing when it scales an image, even when the saved acquisition is usable. Inspect both the original image and the exact image delivered to the inspection algorithm.

If the entire scene has exchanged colors rather than localized fringes, use the checks in red and blue channels swapped. Do not compensate for a channel-order error with white balance.

Establish a trustworthy image path

Save an unprocessed acquisition before adjusting the optics. Record pixel format, image dimensions, region-of-interest origin, exposure, gain, white balance, and any sharpening or color correction. Keep these settings fixed during each comparison.

Use this sequence to isolate conversion errors:

  1. Confirm whether the delivered image is raw Bayer, monochrome, or already reconstructed color.
  2. Match the converter to the documented pixel format, packing, bit depth, and Bayer pattern where applicable.
  3. Check whether cropping changes the Bayer pattern origin. An odd-pixel shift can change the required pattern interpretation.
  4. Disable optional sharpening and enhancement, then compare the saved image with the processing input.
  5. Capture neutral patches and distinct colored patches without clipping any channel.

Do not apply Bayer reconstruction to an image that already contains reconstructed RGB data. Similarly, an incorrect packed-data interpretation can corrupt intensities before any color processing begins. The guide to packed Bayer conversion explains that separate failure mode.

A raw Bayer mosaic will look patterned when displayed directly. That appearance alone is not evidence of defective pixels. Compare documented reconstruction methods, and retain the raw capture so every method receives identical input.

Test static sampling and moiré first

For an area-scan system, secure the target and capture it without motion. Include fine neutral lines, diagonal edges, and the actual repetitive texture that causes trouble. A neutral pattern is useful because colored output cannot be explained by the intended target color.

Bayer reconstruction estimates missing color components from neighboring samples. Near fine edges, those neighbors may represent different surface regions. The resulting color can therefore depend on the edge position relative to the sensor grid.

Moiré occurs when repetitive scene detail interacts with the sampling grid. It can appear as waves, bands, or false colors much larger than the original texture. Monochrome imaging can also alias; removing Bayer reconstruction does not remove the sampling limit.

Make controlled changes rather than adjusting everything together:

  • Translate the target by a small fraction of its repeating pitch. A large color change suggests sampling-phase sensitivity.
  • Rotate the texture slightly while retaining the same illumination geometry. A changing beat pattern supports an aliasing diagnosis.
  • Increase magnification or reduce field of view. Improvement indicates inadequate sampling at the original scale.
  • Compare native-resolution files with preview images. Artifacts confined to the preview implicate display resampling.
  • Test a small, controlled reduction in optical sharpness. Reduced moiré supports aliasing, but also reveals the detail you would sacrifice.

Digital smoothing after capture may hide false color without recovering the original information. Filtering before later image reduction is useful, but cannot reliably undo aliasing already introduced at acquisition. Follow antialiasing when downsampling or warping images when the processing pipeline changes image scale.

Calculate sampling and exposure budgets

Use object-space sampling to connect the observed artifact with the inspection requirement. The following example is hypothetical, not a specification for any featured camera.

Suppose the horizontal field of view is 100 mm across 2000 output pixels. The smallest feature is 0.15 mm wide, and a repeating texture has a 0.20 mm pitch.

Object-space sampling = field width / horizontal pixels = 100 mm / 2000 = 0.05 mm/pixel Pixels across the feature = 0.15 mm / 0.05 mm/pixel = 3 pixels Pixels per texture period = 0.20 mm / 0.05 mm/pixel = 4 pixels

Three output pixels across a feature do not guarantee reliable color classification. In a Bayer sensor, the color channels are not sampled independently at every output position. Contrast, orientation, reconstruction, lens performance, and noise all matter. There is no universal conversion from advertised megapixels to effective color-detail resolution.

Keeping the same field width but increasing to 4000 horizontal pixels gives 0.025 mm/pixel. The feature then spans 6 pixels, and the repeating pitch spans 8 pixels. That is a useful candidate test, not a guarantee of acceptance.

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

Motion creates a separate limit. At a transport speed of 600 mm/s and sampling of 0.05 mm/pixel, an engineering target of at most 0.5 pixel of exposure blur gives:

Maximum exposure = allowed blur × object-space sampling / speed = 0.5 pixel × 0.05 mm/pixel / 600 mm/s ≈ 42 microseconds

A trial exposure of 40 microseconds produces approximately 0.48 pixel of motion blur under those assumptions. Check whether the illumination provides adequate signal without clipping or excessive gain.

Do not use deliberate motion blur as the primary moiré correction. It filters detail unevenly by direction and can hide the very defect you need to detect.

Separate motion from line-to-line registration

A trilinear arrangement samples color using physically separated sensor rows. The same surface location reaches those rows at different times, so reconstruction depends on correctly matching measurements to material position. Not every color line-scan camera uses this arrangement; confirm the actual architecture before applying this diagnosis.

A line-scan station also depends on the relationship between transport motion, line acquisition, and illumination:

A line scan camera building an image line by line The camera images one thin line of the moving web per exposure, lit by a line light. An encoder on the conveyor triggers each line so the pixels stay square at any speed.one line per exposureLine scanline lightweb speed vencoderline rate = v / object pixelexposure < 1 / line rate
A line scan camera building an image line by line. The camera images one thin line of the moving web per exposure, lit by a line light. An encoder on the conveyor triggers each line so the pixels stay square at any speed.

For an assumed object-space row separation of 0.40 mm and speed of 600 mm/s, the travel delay between those rows is:

Channel travel delay = object-space row separation / speed = 0.40 mm / 600 mm/s ≈ 0.667 ms Required line rate = speed / along-motion sampling = 600 mm/s / 0.05 mm = 12000 lines/s

At that sampling, the assumed row separation corresponds to 8 acquired lines. Actual compensation must follow the camera documentation, including row order, scan direction, and any fractional-line handling.

Compare images at several controlled speeds. If fixed-time compensation is used, a speed change can leave residual channel displacement. Distance-based triggering or compensation can address transport-speed variation, provided the encoder represents material travel accurately.

For this example, a 5% speed error during the nominal delay produces approximately 0.020 mm of residual displacement, or 0.4 pixel. Even a small mismatch can create conspicuous fringes at high-contrast edges.

Use setting a line-scan camera's line rate to establish the acquisition relationship. Check encoder scaling, slippage, dropped triggers, and processing assumptions separately. An encoder does not correct every geometric error.

For area-scan capture, compare stationary and moving images at matched brightness. A global shutter avoids row-to-row exposure timing differences within a frame, but exposure blur remains possible. Rolling-shutter geometry errors should not be mistaken for evidence of a particular color-filter arrangement.

Use height and position to expose optical errors

Repeat the test at the minimum, nominal, and maximum surface heights expected in production. Use representative steps or curved parts rather than only a flat calibration target.

In separated-row imaging, a height change can alter magnification and the object-space relationship between color rows. Compensation calibrated on a flat surface may therefore leave colored outlines on raised features. Uneven motion, vibration, and changing surface orientation can complicate the result further.

Move the same stationary high-contrast target from the image center to each corner. Optical chromatic aberration can produce color-dependent edge positions or focus differences, often varying across the field. Fringing that persists without motion and follows field position deserves a lens investigation.

Check machine vision lenses and the lens finder against the actual sensor coverage, working distance, and required detail. A matching mount alone does not establish optical suitability. For line acquisition, line-scan lens selection explains why the full sensor width matters.

Changing the aperture is a test, not an automatic fix. Stopping down may improve some aberrations and depth tolerance, while diffraction eventually reduces fine-detail contrast. Evaluate both the artifact and the smallest required defect after each adjustment.

Compare camera architectures with the same parts

Choose the architecture by the failure mechanism, not by a promise that one technology cannot produce artifacts.

Architecture What to evaluate Main caution
Bayer area scan Fine-edge color stability, texture pitch, reconstruction settings Output pixel count is not independent RGB sampling everywhere
Separated-row color line scan Transport mapping, channel offsets, height range Nominal-speed alignment may not transfer to every surface condition
Multi-sensor color with a shared optical path Channel alignment, spectral response, lens compatibility It still has finite sampling and possible optical or alignment errors
Monochrome with controlled illumination Required defect contrast without full color It cannot directly replace a task requiring independent color discrimination

For area-scan evaluation, the MV-CU020-90GC is a color global-shutter option. The MV-CS200-10GC is a color rolling-shutter option. These catalog distinctions do not establish their detailed color-sampling behavior or suitability for your target.

Area scan camerasHikrobot MV-CU020-90GC 2.5 MP Area Scan Camera, GigE, GMAX4002, ColorMV-CU020-90GC
Sensor format
1/1.7"
Lens mount
C-mount
$309.00View part
Area scan camerasHikrobot MV-CS200-10GC 20 MP Area Scan Camera, GigE, IMX183, Color, BasicMV-CS200-10GC
Sensor format
1"
Lens mount
C-mount
$739.00View part

Compare candidates through the area scan cameras category and camera finder. Request representative captures with the same field of view, transport conditions, and acceptance criteria rather than comparing attractive sample images.

For moving-web evaluation, the MV-CL042-91GC-V2 is a color line-scan candidate. Confirm its sensor arrangement, available synchronization functions, and channel-compensation behavior before specifying it for the task.

Line scan camerasHikrobot MV-CL042-91GC-V2 4k GigE line scan, Color, Isolated versionMV-CL042-91GC-V2
Lens mount
M42
Interface
GigE
Line length
4K
Pixel size
7 μm
$1,459.00View partBuild a system with it

The line scan cameras category provides other candidates. Do not infer a trilinear or shared-path architecture from the words “color line scan” alone.

Verify corrective changes before ordering

Define acceptance around the inspection decision, not merely the appearance of the preview. For a neutral edge, measure channel-edge displacement or unwanted chroma in a fixed region. For a color-sorting task, measure classification stability across repeated captures and representative surface variations.

A useful initial screen is 20 captures per test condition. Record the worst observed displacement or classification error, not just the average. This is a screening exercise, not proof of production reliability; final validation must cover the expected operating variation.

Before ordering, check the following:

  • Image path: Pixel format, channel order, Bayer origin where applicable, and bit-depth conversion are documented.
  • Sampling: The smallest feature and finest repetitive texture have been tested at the intended field of view.
  • Motion: Exposure blur and channel-registration errors have been evaluated independently.
  • Geometry: Minimum and maximum part heights, tilt, and field positions are represented.
  • Optics: Lens coverage, focus, aperture, and color fringing meet the inspection requirement together.
  • Processing: Native captures and production-resized images both pass the acceptance test.
  • Integration: Triggering, encoder interpretation, and transport direction remain correct after restart.

The usual answer of adding more pixels is wrong when conversion is incorrect, channel timing is mismatched, or surface geometry defeats the registration model. Likewise, replacing the camera will not repair aliasing introduced later by careless image reduction.

Take the saved captures and test conditions to applications support, or start the camera configuration workflow with a documented sampling and timing budget.

Questions

Does moiré mean the color camera is defective?

No. Fine repetitive detail can alias during acquisition, but resizing a preview or processing image can also introduce patterns. Inspect a saved native-resolution capture first. If the pattern changes strongly with target angle or magnification, investigate sampling before treating the sensor as defective.

Can a different Bayer reconstruction method remove false colors?

It can reduce some artifacts, but it cannot guarantee accurate color where the original samples do not resolve the scene. Compare reconstruction methods using the same raw capture. If small target translations produce unstable colors, test increased sampling or suitable optical filtering as well.

Will a global shutter eliminate colored edges on moving parts?

A global shutter removes row-to-row exposure timing differences within an area-scan frame. It does not eliminate exposure blur, insufficient spatial sampling, lens chromatic aberration, or incorrect image conversion. Confirm which mechanism causes the fringe before choosing a shutter type as the remedy.

Why can trilinear color alignment change with part height?

Separated color rows observe each surface location at different times and viewing positions. A raised feature can change the geometric mapping assumed by channel compensation. Test the full surface-height range; correct encoder timing alone may not restore alignment across changing geometry.

What should a camera evaluation request include?

Provide raw or minimally processed captures, field of view, smallest required feature, transport speed range, exposure settings, and representative height variation. Include fine neutral patterns and actual acceptable and defective parts. Ask for results against your acceptance criteria rather than relying on general demonstration images.