Optics & lighting

Compare red, blue and white illumination by defect contrast

Choose light color from measurable defect/background separation, not the brightest image. Color changes can invert contrast and move best focus.

Send samples for engineering review
Compare red, blue and white illumination by defect contrast — Illustrative engineering scene, not a photograph of a validated Deyi installation.
Illustrative engineering scene, not a photograph of a validated Deyi installation.

What the test resolves

Choose light color from measurable defect/background separation, not the brightest image. Color changes can invert contrast and move best focus.

This is a vendor-neutral commissioning method. Check the exact camera, lens, sensor or controller manual before changing settings. The numerical worksheet is hypothetical, not a Deyi Vision measurement or a product specification.

Define the feature that needs separation before selecting a color: contamination, a printed mark, a scratch or a missing coating. Label good and defective samples independently of their image brightness. The aim is a repeatable decision on that feature. A color that makes the whole part attractive can still reduce the information available to the detector.

Operating prerequisites

Use a monochrome camera and unchanged lighting geometry for the first comparison. Keep exposure within motion limits; record wavelength/band and any spectral filter.

Keep source position, diffuser, background and viewing angle fixed during the first comparison. If the available lamps have different emitting areas or beam patterns, record that limitation; the result compares complete lighting arrangements rather than wavelength alone. Use actual production material lots, including acceptable color variation. Do not select the lamp from a single conveniently colored sample.

Bench and records

Prepare red, blue and white sources, labeled material lots and fixed defect/background ROIs. Set gain manually and retain unclipped raw images.

Record the source identifier, spectral filter, lens setting and camera processing alongside every capture. Disable automatic brightness adjustment, gamma changes and dynamic display scaling for the experiment. Use raw pixel values for analysis rather than screenshots. Confirm that the background region represents the surface adjacent to the defect, not an unrelated bright area elsewhere on the part.

Run the test

  1. Warm the sources and acquire each color at the same exposure.
  2. Adjust light output to similar unsaturated background levels and label this second comparison separately.
  3. Calculate signed contrast and noise for each sample; preserve dark/light polarity.
  4. Check focus after wavelength changes and validate detector results on independent lots.

Repeat the initial light color after cycling through the alternatives to reveal sample movement or lamp drift. Keep the fixed-exposure series and the brightness-matched series as distinct records. Change lamp output for matching only within its supported operating range. Do not compensate poor optical separation with increased gain and then describe the result as a wavelength-only improvement.

Hypothetical worksheet

Hypothetical ROI means give contrast −0.167 for red, −0.600 for blue and −0.326 for white. Blue separates this example best, but noise, focus and material variation still determine whether it is usable.

signed_contrast = (mean_defect - mean_background) / mean_background
Red: (150 - 180) / 180 = -0.167
Blue: (70 - 175) / 175 = -0.600
White: (120 - 178) / 178 = -0.326
Hypothetical worksheet; replace every input with your own recorded value.
QuantityHypothetical valueMeaning
Red contrast−0.167Defect darker than background
Blue contrast−0.600Strongest separation in this example
White contrast−0.326Broadband comparison

The signed worksheet preserves whether the defect is darker or brighter than its surroundings. Inspect the underlying distributions as well as their means: textured good regions and defects may overlap even when average contrast looks strong. Record clipping and temporal variation separately. The example ranks these particular hypothetical regions; it does not establish a universal preference for blue illumination.

Test sequence

Test sequence

Compare three colors on one material with unchanged geometry and explicitly controlled brightness.

  1. Red
  2. Blue
  3. White
  4. Same target
Compare three colors on one material with unchanged geometry and explicitly controlled brightness. Schematic illustration; spacing is not to scale.
View full-size diagram

Use the process diagram as a traceability checklist. Every color branch should refer to the same labeled sample and comparable regions, with the acquisition settings attached. Reject comparisons that changed the sample surface or measurement region unnoticed. When a spectral filter is added, give that source/filter combination its own configuration identity so another engineer can reproduce the comparison.

Interpret the evidence

Interpret the evidence

Measure polarity and noise before focus and detector validation.

  1. ROI means
  2. Signed contrast
  3. Focus
  4. Detection
Measure polarity and noise before focus and detector validation. Schematic illustration; spacing is not to scale.
View full-size diagram

Separate the fixed-focus comparison from an explicitly recorded refocused comparison. The former measures the impact of exchanging illumination in the current setup; the latter evaluates a redesigned operating configuration. Check the smallest required detail across the field after any focus change. An improved central crop does not establish that the corner features or measurement scale remain acceptable.

Troubleshooting

  • If contrast reverses, update detector polarity only after validating good and defective samples.
  • If one corner loses contrast with another color, inspect focus and lens wavelength performance rather than blaming the algorithm.

If contrast changes sign between lots, inspect material and surface variation before fixing detector polarity. If apparent color benefits disappear at production exposure, check noise and the available light output. If a filter improves one feature but hides another, preserve both failures and revisit the inspection requirement. Choosing a favorable crop cannot resolve incompatible feature requirements.

Acceptance and handoff

Select a wavelength only after worst-lot separation and false-alarm limits pass at production exposure. Archive raw ROIs, source/filter identity and focus position; do not generalize the example to all colored materials.

Archive the raw files, settings, sample identifiers and decision limits together. Discuss the documented requirements with Deyi Vision using the related product and preparation guides below.

Choose the candidate using declared defect-detection and false-alarm criteria, then test independent lots at the intended speed and pose range. Document which material changes require reevaluation. Save rejected color candidates and their raw regions, not only the winner. The handoff should explain whether improved separation came from color, focus or a different lighting geometry, and which changes remain untested.

Sources and technical references

These references explain the methods and limits used in this tutorial. Example checks are guidance; production acceptance requires evidence from your own samples.

  1. Wavelength Effects on PerformanceEdmund Optics

    Wavelength changes can alter focus and optical performance; real lenses need evaluation.

    Checked
  2. Machine Vision Lighting Selection GuideKEYENCE

    Illumination geometry and object/light color influence feature contrast.

    Checked

Engineering review

Bring the inspection problem and the evidence.

Send sample images, your current setup and the check that failed. Include field of view, working distance, line speed and acceptance criteria for a practical review.

Send samples for engineering review
Contact

Direct RFQ contact

Talk to engineering about the inspection problem.

Send sample images, competitor model, FOV, working distance and line speed before model selection.

Target: selection brief within 24h
Send sample images