A golden reference part passed inspection for months. The replacement lot is made with a different pigment, looks identical to the eye, and your color camera agrees — until the new lot starts failing at random. The root cause sits in the sensor: a Bayer color camera cannot tell a pure spectral yellow from a red-and-green RGB yellow, because both drive the same broad filter bands. This guide works the collapse end to end with real arithmetic, then gives you the decision rules: which color space to threshold in, which line changes actually matter, and when the job needs wavelength hardware a Bayer stack can never supply.
Why can't a Bayer camera tell pure yellow from RGB yellow?
It cannot, because a Bayer sensor never sees wavelength: a 585 nm spectral yellow and a red-plus-green mix drive the same broad red and green filter bands and leave the blue band near zero, so both collapse to one identical RGB triple in the demosaiced image.
Color scientists call the two sources metamers: physically different spectra that produce the same response in every band of a three-channel observer. The red channel cannot ask which photons arrived from 585 nm and which from 620 nm; it counts them all. The merge happens in silicon, where photons become charge, so no demosaicing algorithm, white balance or software conversion recovers the difference afterwards.
That gives you a precise way to state the risk. When the specification asks whether the part is yellow, the Bayer answer is honest. When it asks whether this is the same yellow as the golden part, the honest answer is identical-to-me — which may or may not match the material truth. For the cases a Bayer camera does fit, the decision checklist for choosing a Bayer color camera sorts them in advance.
What does a Bayer sensor actually measure through its color filters?
Each photosite sits under one wide filter that spans on the order of a hundred nanometres, the three bands overlap heavily, and without an IR-cut or low-pass filter on top the stack also transmits well past 700 nm into the near infrared.
Bayer filters are broad transmission windows, not narrow band-pass filters: the green band still passes red-edge photons and the red band still passes green. In the visible that overlap is what makes the sensor blind to wavelength differences; above the visible it is why an unfiltered color sensor sees NIR as a pink haze. Each channel output is a weighted sum over wavelength:
S is the light's spectrum, F the filter curves. Three numbers in, and every spectrum that sums to the same three numbers is the same color forever. For how the mosaic is built and how demosaicing fills the two missing color samples per pixel, see Color filter array explained: monochrome versus Bayer sensors.
Every current color area scan camera works this way, whatever its resolution or interface. The MV-CS200-10GC is the 20 MP, 1-inch IMX183 color model with GigE output and a C-mount.
- Sensor format
- 1"
- Lens mount
- C-mount
- Interface
- GigE
- Resolution
- 16-25 MP
How identical are the two yellows in camera numbers?
On example filter curves, a 585 nm line and a 550 nm plus 620 nm mix at powers 0.49 and 0.53 both integrate to about R 0.62, G 0.70, B 0.03, an 8-bit read near R234 G240 B8 and a hue of 62 degrees.
Work it end to end, using example values shaped like typical broad Bayer bands — a working set, not one sensor's calibration:
| λ | F_R | F_G | F_B |
|---|---|---|---|
| 550 nm | 0.35 | 0.95 | 0.06 |
| 585 nm | 0.62 | 0.70 | 0.03 |
| 620 nm | 0.85 | 0.45 | 0.00 |
Source A is a narrowband 585 nm yellow LED at unit power — the sodium-line region people mean by pure yellow. Source B is RGB yellow: a green-dominant 550 nm LED and a red-dominant 620 nm LED together. With the discrete form R = Σ S(λ) · F_R(λ), match Source A's red and green integrals:
This solves to p_green = 0.49 and p_red = 0.53. The blue channel then agrees on its own: 0.49 × 0.06 = 0.03.
| Channel | Source A: 585 nm line | Source B: 0.49 at 550 nm + 0.53 at 620 nm |
|---|---|---|
| R | 1.00 × 0.62 = 0.62 | 0.49 × 0.35 + 0.53 × 0.85 = 0.62 |
| G | 1.00 × 0.70 = 0.70 | 0.49 × 0.95 + 0.53 × 0.45 = 0.70 |
| B | 1.00 × 0.03 = 0.03 | 0.49 × 0.06 + 0.53 × 0.00 = 0.03 |
Feed both through white balance — example gains R ×1.48, G ×1.345, B ×1.05 — and scale to 8 bits: R = 0.62 × 1.48 × 255 ≈ 234, G = 0.70 × 1.345 × 255 ≈ 240, B = 0.03 × 1.05 × 255 ≈ 8. Both sources report RGB 234, 240, 8. A real sensor adds a few counts of noise, so the two triples sit on top of each other rather than bit-identical — inside any threshold you would set.
Convert to a working color space and the tie holds there too:
Δ = 240 − 8 = 232, so hue = 60° × (−226/232 + 2) = 60° × 1.026 ≈ 62°, saturation = 232/240 = 0.97, value = 240/255 = 0.94. Through the standard sRGB → XYZ (D65) → Lab* path, RGB 234, 240, 8 linearizes to (0.823, 0.871, 0.002), collects XYZ (0.651, 0.798, 0.122) and lands at L* 92, a* −23, b* 89 — the same three numbers for both sources.
Would a three-sensor prism RGB camera do better?
No, a prism or three-sensor RGB camera splits light onto three sensors through the same kind of broad red, green and blue bands, so a spectral yellow and its RGB match still land on the same three numbers; more sensors, not more RGB channels, is what separates wavelengths.
A prism design bends the spectrum onto three dedicated sensors, which buys real advantages: no demosaicing, no false color at edges, full resolution in every channel. Colorimetrically nothing changes — the three transmission bands remain broad and overlapping, and the many-to-one projection from spectrum to RGB stays. The prism versus Bayer comparison details where prism hardware pays off.
The exit from a three-dimensional projection is more independent measurements, not better ones: narrow illumination you control, or additional bands on the sensor side. That is the entire logic of multispectral imaging.
Which color space should color inspection use instead of raw RGB?
Convert to a perceptual space first: in HSV or HSI a yellow part holds a hue near 60 degrees while value and saturation drift, and in Lab* it reads near L 92, a −23, b 89, so your tolerance is one hue or ΔE band rather than raw RGB windows.
Raw RGB windows couple to everything on the line: raise exposure or gain by 20 percent and all three channels scale up; re-teach white balance and the windows move again; change the lamp and the ratios bend. Hue is built from ratios of differences, so a uniform scale factor cancels — light the part 20 percent brighter and a 62° yellow is still at 62°, as long as no channel clips.
Set the pass band there and keep it there. For a saturated yellow class on a clean background: pass while hue stays within 59-65° and saturation stays at or above 0.6; fail when ΔE*ab from the golden sample exceeds 3. The basis: a ΔE of 1 is the classic just-noticeable difference for a human observer, and production color classes commonly run between 2 and 5 — tighten from your own gauging, never wider than the customer's visual spec.
Understand what this buys: robustness, not wavelength power. Two metameric yellows land on the same hue, the same ΔE and the same verdict, exactly as the arithmetic above shows.
Both of these color models classify on the device — the smart camera approach to inline color — converting to a working space in firmware rather than streaming frames to a PC:
- Interface
- Fast Ethernet
- Resolution
- 5 MP
- Interface
- GigE
- Resolution
- Up to 3 MP
Machine vision colour inspection beyond raw RGB values takes the threshold design further, including illumination and calibration choices.
When does inspection actually need wavelength separation?
Switch to a multispectral or hyperspectral camera when the decision itself is a wavelength — ink and coating ID, ripeness and bruise grading, oil or plastic sorting — where samples match in every RGB channel yet differ beyond 700 nm or inside a narrow band Bayer never resolves.
Work the ladder from the bottom; each rung costs more and buys real spectral power:
- Hue and ΔE thresholds on your Bayer camera — free, and correct whenever the spec is color appearance.
- One mono camera plus one narrowband LED (visible LEDs run roughly 15-40 nm wide) aimed at the known confusion — a bench afternoon, often the whole answer.
- A multispectral camera, typically 4-10 discrete bands, when several wavelength questions share one station.
- SWIR (InGaAs sensors typically cover 900-1,700 nm) or hyperspectral, when the difference lives past 1,000 nm or needs a contiguous spectrum.
The decision between rung 1 and the rest is mechanical: if the two samples that must be separated produce identical Bayer channel statistics, rung 1 cannot help by definition — start at rung 2. Band choice is the same problem as which LED colour gives the best contrast in machine vision; a worked band-selection study is multispectral weed detection: camera bands for crop versus weed, and the SWIR case is worked in near infrared wavelength selection for water and silicon inspection. SWIR variants sit inside the area scan camera category under the spectrum filter.
What else shifts your yellow values on a live line?
Re-lighting or re-balancing shifts every yellow's absolute RGB, and one change cuts the other way: a narrowband deep-red or blue LED breaks a metameric pair apart by tens of counts, which is the one trick that lets a Bayer rig see a spectral difference on purpose.
- Exposure and gain scale all three channels together; hue cancels them, raw RGB does not.
- White-balance re-teach rewrites absolute RGB. Teach thresholds in hue or ΔE so a re-teach cannot silently invalidate every window.
- The illuminant's spectrum changes channel ratios — and splits metameric pairs, since two spectra that match under broadband white rarely match under a 30 nm-wide deep-red LED. Used deliberately, that swap is a spectral test with ordinary hardware.
- Ambient leakage adds an uncontrolled spectrum to every part. Shroud or strobe the station, and keep a white reference patch in view to log the drift.
Measuring ambient drift instead of assuming it away is the subject of Ambient light variation in pick and place vision: control it.
How do you test on your own line whether Bayer is enough?
Put both samples under your production light and capture 50 frames of each: if the two hue distributions stay separated by more than your tolerance, a Bayer camera plus a hue threshold passes; if the distributions coincide, the sensor has merged them and only a wavelength-capable camera will separate them.
- Fix the production light, exposure and white balance, and place the golden part and the suspect sample side by side.
- Capture at least 50 frames of each and log the mean and standard deviation of hue per part (or of each raw channel).
- Compute the class separation: |hue_A − hue_B| ÷ √(σ_A² + σ_B²).
- Decide at 3. Above 3, the distributions barely overlap and a Bayer camera with a hue threshold does the job. At 3 or below, the sensor has effectively merged the samples — climb the wavelength ladder from the section above.
- Rerun under worst-case conditions before signing the threshold: new lamp, full belt speed, hottest ambient hour.
On a moving belt, freeze the part with a global-shutter color camera; the MV-CU020-90GC is the 2.5 MP global-shutter C-mount choice on GigE.
- Sensor format
- 1/1.7"
- Lens mount
- C-mount
- Interface
- GigE
- Resolution
- Up to 3 MP
Shortlist candidates in the camera finder.
Which decision do you take in each case?
Four cases cover nearly every color-inspection decision: match the tool to whether you need consistent appearance, accurate color, or the separation of two spectra your eye and every RGB sensor call identical.
| Your case | Decision |
|---|---|
| Pass/fail on color appearance (is it the right yellow?) | Bayer color camera, hue + saturation threshold, ΔE*ab ≤ 3 against the golden sample |
| Two samples look identical to the camera but must be separated | Mono camera + one narrowband LED trial; multispectral camera if several bands are needed |
| Absolute color accuracy against a master | Bayer with its IR-cut filter in place, threshold on ΔE*, never raw RGB |
| Wavelength is the specification (inks, coatings, produce, polymers) | Multispectral or SWIR camera; treat RGB as irrelevant |
If your case is the second or the fourth, start on the bench: one narrowband LED and a mono camera will tell you in an afternoon whether spectral hardware is needed. Start the camera configurator, read more on the cameras topic page, or send sample logs through the contact page and we will read them with you.
Questions
Can a monochrome camera tell pure yellow from RGB yellow?
Not by color — it reports one gray level per pixel and carries no wavelength label. But it is the cheapest way to exploit a spectral difference you already know about: light the part with a narrowband LED whose wavelength favors one sample, and the gray levels separate. That mono-plus-colored-light test often replaces a multispectral camera outright for a single decision.
Is the human eye also fooled by RGB yellow?
Yes, and display makers rely on it. Your eye also reduces every spectrum to three broad cone responses, so a screen's red-and-green mix reads as yellow, exactly like a 585 nm lamp. A Bayer camera fails where your eye fails; a spectrophotometer, which measures the spectrum itself, does not.
Does an IR-cut filter improve color discrimination?
It improves color accuracy, not discrimination. An IR-cut or low-pass filter stops near-infrared photons from inflating the red and green channels, so whites and pale colors read truer. The visible bands stay broad and overlapping, though: two metameric yellows remain metameric. Fit the filter your sensor stack expects and re-teach white balance afterwards.
What ΔE tolerance should a color inspection use?
A ΔE*ab of 1 is the classic just-noticeable difference for a human observer. Production color classes commonly pass at ΔE up to 2 and reject beyond 3-5, tighter for premium finishes. Derive your own limit by gauging: a golden sample plus 30 known-good parts gives you the within-class spread; put the limit a safety margin above it.
Are all color machine-vision cameras Bayer?
Most single-sensor color cameras are; a few use RGBW or cyan-magenta-yellow-green patterns, and prism models route light to three sensors. Every one of those designs still reduces each spectrum to three or four broad bands, so the pure-yellow versus RGB-yellow confusion applies to all of them, whatever the mosaic pattern.



