An RGB image from a robot camera can contain three values at every output location without the sensor having measured three independent color responses at every corresponding photosite. In a conventional Bayer arrangement, different sites carry different color filters, and reconstruction estimates the missing components.

The distinction is spatial. A green sample next to a red sample does not directly reveal green at the red sample's location. A demosaicing method supplies a relationship between neighboring observations and the missing values.

Cognex's Bayer Pattern reference explains the filter layout and interpolation of missing components. Basler's color-artifact article likewise describes debayering as reconstruction from Bayer data. The patch below is an original idealized model, not a camera image, color-accuracy test, or executed demosaicing result.

Choose one declared mosaic pattern

Use an RGGB layout on an integer row-and-column grid. One complete two-by-two tile contains:

Red site, green site.

Green site, blue site.

Repeated tiles therefore contain half green sites, one quarter red, and one quarter blue. This describes site allocation, not a direct ratio of color accuracy or a universal spatial-resolution specification.

For the numerical example, model each filter as selecting exactly one component of an underlying RGB field at its own location. Ignore optical blur, spectral cross-sensitivity, noise, offsets, gains, clipping, and quantization.

Actual photosites respond to light through a spectral filter and the optical system. The exact channel-selection model is a deliberate simplification used to isolate the missing spatial samples.

A three-by-three patch

Consider this hypothetical patch, with each entry naming its sampled channel and value in arbitrary linear response units:

R40, G50, R80.

G60, B30, G80.

R60, G90, R100.

The center is a blue site. Its blue response is 30 in the model, but its red and green responses have not been sampled there.

This odd-sized patch contains four red sites, four green sites, and one blue site. Those local counts do not contradict the complete-tile proportions: the patch does not contain an integer number of two-by-two tiles.

The nine mosaic numbers are not nine grayscale measurements with identical spectral meaning. Their channel labels belong beside the values.

Define a simple reconstruction rule

For this example only, estimate red at the center by averaging the four diagonal red samples. Estimate green there by averaging the four orthogonal green samples. Retain the observed blue value.

The red estimate is (40 + 80 + 60 + 100)/4 = 70. The green estimate is (50 + 60 + 80 + 90)/4 = 70. The reconstructed center triple is therefore (70, 70, 30).

This is a declared elementary interpolation rule at one interior site. It is not a description of every commercial demosaicing method or a claim that a particular library produced that triple.

The rule combines observations from different spatial locations. It can be useful under a suitable local image model, but the arithmetic itself does not establish that the unobserved center responses were actually 70 and 70.

Construct two fields with the same observations

Define an underlying ideal RGB field A on all nine locations as follows. At each red site, use its listed red value with green 70 and blue 30. At each green site, use red 70, its listed green value, and blue 30. At the center blue site, use (70, 70, 30).

Sampling field A through the declared mosaic produces exactly the nine numbers listed above. The simple center reconstruction happens to agree with field A's center triple.

Now construct field B. Keep every site's RGB triple unchanged except the center. Set its center triple to (140, 20, 30).

The blue value at that center remains 30, which is the only component sampled there. Every other measured value also remains unchanged. Field B therefore produces exactly the same mosaic as field A.

The reconstruction rule still returns (70, 70, 30), even though field B's center red and green values differ.

This is a mathematical ambiguity under the stated discrete image model. It does not claim that arbitrary sharply varying fields pass unchanged through a particular real lens or sensor; those optical constraints were deliberately left out.

A plausible estimate is not a recovered observation

The two fields prove that the nine mosaic values alone do not uniquely identify every RGB component at every location without additional assumptions. A fixed reconstruction rule receives identical input from both fields, so it cannot always return both different center truths correctly.

A method may prefer field A because its missing channels vary more smoothly. Another method may use edge direction, color-difference relationships, training data, or a broader neighborhood. Those assumptions can improve estimates for relevant image classes, but they remain information used by the reconstruction.

More output channels do not change this observation count. A nine-location RGB output contains 27 component numbers. In the declared ideal mosaic, only nine component values were directly sampled; the other eighteen require inference.

This is not a statement that all reconstructed components are inaccurate. A simple estimator can be exact when its assumptions match the field, as it was for field A at the center. The distinction is how the value was obtained.

Fine structure changes the problem

A local color edge or narrow pattern can violate an assumption that neighboring same-channel responses represent the missing center value. A reconstruction can then introduce color differences that are not independently measured at that location.

Basler discusses how demosaicing methods use different neighborhoods and how processing choices affect color artifacts. Its product-specific performance statements are not generalized here into a guarantee that a larger neighborhood always recovers the correct scene.

Likewise, a visually smooth output is not proof that a narrow real color feature survived. The original field B shows how a center difference can be absent from the observed mosaic under an unconstrained model.

Keep the processing stage identifiable

A Bayer-format output identifies a spatial channel arrangement; it does not, by its name alone, certify every earlier camera processing step. The actual pipeline determines whether values have already undergone correction, gain, or other operations.

An RGB output similarly identifies a representation, not proof of three co-located measurements. A robot inspection explanation should retain the mosaic pattern, channel interpretation, reconstruction definition, and relevant image assumptions.

The useful result is precise: the center blue value was sampled, while its red and green values were estimated from other locations. Keeping that distinction visible makes a reconstructed color image easier to interpret as measurement data.

Sources checked October 23, 2026: Cognex, In-Sight Explorer Help, Bayer Pattern, revision 6.4.1.4, August 29, 2022: https://docs.cognex.com/is_641/web/en/ise/content/Reference/Color_Bayer_Pattern.htm

Basler, Avoiding Color Artifacts and the Influence on Frame Rate and Computing Load, last updated July 25, 2025: https://www.baslerweb.com/en-us/learning/avoiding-color-artifacts/

All response values, underlying fields, and reconstruction calculations are hypothetical and original. No source image, worked patch, or software result is reproduced.

Illustration note: A generic robot camera or vision-workstation concept image may accompany this explanation. It does not show the invented mosaic, measured RGB fields, or verified color reconstruction.