# Does scanning a lightsource affect the scan result?

I'm very much a layman on this kind of topic, so my logic may be wrong, but here goes:

Sample situation

My reasoning

I think that in essence, any scanner measures how the light it's emitted is reflected back to the device, measuring how much of it is received back or absorbed by the scanned surface. High quality (photographic) scanners would do this very precisely, scanners in a supermarket would work (almost) binary (barcode readers).

To keep the discussion simple, continuing on the simple binary case, black or white, the scanner's light is either reflected or absorbed (1 or 0).

The question

What happens when you are scanning something that is also a light-emitter (not just a reflector)?

The strength of the beam emitted from the scanned light-emitter is added to the one emitted from the scanner, making the contrast against the dark parts clearer.

You get 'false positives', because the entire surface of the light-emitter you're scanning is always emitting some light (to a varying degree). You need a quality scanner to filter out these false positives.

c) No difference

Scanning a light-emitter has no (noticable) effect.

PS: I didn't find any information that explains how scanning works on a physical level, any sources regarding this are welcome!

• What sensors why want to use?Add to the smartphone? – Nikey Mike Dec 22 '15 at 13:10
• Some scanners use that red laser 'stripe' simply as a pointing device. These scanners just take a picture and process it. You are correct that if the scanner is trying to read pure reflectivity at its output wavelength, your smartphone screen needs to absorb the light in the 'dark' regions of the pattern. – Carl Witthoft Dec 22 '15 at 13:35
• Anything you can see is a light emitter. The mechanism of how it emits light, whether it reflects it or creates it first hand is irrelevant. The only relevant thing is how much light is emitted. Large amplitude of light emittance can impact the camera. – Viktor Dec 22 '15 at 13:35

This is really a very broad question; I will give you just a few pointers, but a full answer could fill a book.

Yes, any 1D/2D pattern (barcode) scanner is looking at spatial variations in the received intensity; and it typically looks for "brighter/darker" to decide how to do the binary decoding ('1/0). Bar codes are constructed in such a way that they are roughly 50% black and 50% white regardless of the number represented, so this trick works fairly well.

How well it works, then, really depends on the contrast between the black and white signal. If you have limited contrast - say, the reflectivity of the white is 60% and the reflectivity of the black is 40\$ - then the total signal is 20% (60%-40%), while the average signal is 50% ((40%+60%)/2). If you had excellent contrast, the values would be 0% for black, and 100% for white.

Now there are several things that degrade the quality of the scan. The first is the color (bright/dark-ness) of the object scanned, as described above; but there may be other factors degrading the contrast: reflection (shiny barcodes are hard) and scatter along the optical path (dirt on the lens, "fog" in the air) being the most important.

When you build a scanner, there is not much you can do to change the reflectivity (black/white ratio) of the object scanned: that is "external". So all you can do is minimize the effect of reflectivity and scatter.

Reflectivity is a function of angle: in principle, if you move your light source to different places and don't move the barcode, then different parts of the surface will cause specular reflection. The corollary is that a point source of light will sometimes cause a strong reflection at one place, and this might make that one place hard to decode. An extended light source prevents that. You may have seen how people using laser scanners sometimes have to move the bar code around to get a good scan: that's not only because of positioning, but also to get rid of a reflection. In principle, if you used a pair of scanning light sources that were offset by 30 or more degrees, and you scanned with each of them in quick succession, then reflection from one would not show up on the other, and you could create a "complete" image. But a "camera" shot of the bar code illuminated by an extended source will typically work better. Polarization can also help: laser light is typically linearly polarized, and speculation reflection maintains that polarization. By putting a cross polarizer in front of the detecting element you can greatly reduce the effect of specular reflection. Only light scattered by the "white" of the bar code, having lost its polarization, would be detected - in principle.

But there's this second thing - scatter. Most of the time, that does not matter for barcode scanners - just keep your optics clean. However, there are certain situations (not typically with bar code scanners - but stay with me, this is interesting) where you need to be able to "see through the fog". Quite literally. Examples are underwater search and rescue, and of course driving through fog. Now if you use a scanning beam of light that is slightly offset from your line of view, then that beam will strongly scatter off the fog; but if you are only interested in a point "at the end of the beam", then most of that scatter doesn't matter. By scanning the beam, and creating a composite image that is composed only of "the point at the end of the beam" (for a particular viewing distance and angle, you know where that point is in your field of view), you are actually able to reduce the effect of fog / suspended particles / scatter by orders of magnitude. Sometimes people use pulsed laser sources for this, and add a time gate for the detection of the reflected light - that removes even more of the scatter. The result is a "magical" device that can literally look through fog, and see things that are invisible to the unaided eye. Because of the scanning, they are a bit slow for using in driving conditions (I am not aware of cars equipped with this technology) but they work great in search and rescue. The general field is called "structured light imaging" and here is a nice paper summarizing some of the methods.