Apparatus and method for automatic gain control during scanning
The disclosure describes an apparatus and method for automatic gain control during scanning. The apparatus comprises an optical detector to receive an optical signal reflected from a symbol positioned within a scan window by an optical beam scanned from a leading edge of the scan window to a trailing edge of the scan window; and a processor coupled to the optical detector to adjust the gain of the optical detector during the beam scan. The process comprises receiving an optical signal using an optical detector, wherein the optical signal comprises optical energy reflected from a symbol positioned in a scan window as an optical beam scans from a leading edge of the scan window to a trailing edge of the scan window, and adjusting the gain of the optical detector during receipt of the optical signal. A calibration process is disclosed comprising calibrating the optical detector to obtain a plurality of gain corrections, each gain correction corresponding to a different position between a leading edge and a trailing edge of a scan window, and storing the plurality of gain
This application is a continuation under 37 CF.R. § 1.53(b) of U.S. patent application Ser. No. 10/251,213, and claims priority therefrom under 35 U.S.C. § 120. The priority application was filed Sep. 20, 2002, and is currently pending.
TECHNICAL FIELDThe present invention relates generally to scanners, and in particular, but not exclusively, to automatic gain adjustment during scanning.
BACKGROUNDBar code scanners typically function by generating a thin beam of light and scanning the beam across a symbol to be read. The symbol typically comprises a plurality of alternating light (usually white) and dark (usually black) areas; the best-known symbols are bar codes, where the light and dark areas are formed by a white background with alternating black bars superimposed thereon. As the spot created by the projection of the beam onto the symbol travels across the symbol, it crosses the alternating light and dark areas and a portion of the light hitting the symbol is reflected back into the scanner. More light is reflected from the light areas than from the dark areas, so the optical energy reflected back into the scanner will consist of a signal containing a series of peaks corresponding to the light areas and valleys corresponding to the dark areas. Processing circuitry within the scanner then converts the received optical signal into an electrical signal and proceeds to decode the peaks and valleys in the signal, thus extracting the information contained in the symbol.
Automatic Gain Control (AGC) is an approach used in the prior art to compensate for varying distances between the symbol and the scanner. With existing AGC systems the gain of the optical detector is changed from scan to scan, depending on the distance between the scanner and the symbol. Once a gain value is selected for a particular scan, it stays constant at that value throughout the particular scan. Thus, when the symbol is near to the scanner the gain can be adjusted downward, whereas when the symbol is farther from the scanner, the gain can be adjusted upward. The shortcoming of this approach is that although the gain can be varied from scan to scan, only a single gain value can be employed throughout any given scan. In other words, there is no way of adjusting the gain during a scan. This approach therefore cannot be used to address the problem of compensating for reduced optical response at the edges of a scanned symbol. In addition, even if a standard AGC could be adapted to compensate for gain changes during a scan, they would be much too slow.
One way of dealing with the poor optical response near the symbol edges is discussed in U.S. Pat. No. 5,701,003 to Chisholm et al (“Chisholm”). The approach taken in Chisholm to improve optical response of the scanner at the edges of the scan window is to increase the optical power of the laser in the scanner near the edges of the scan window while reducing the power of the laser near the middle of the scan window. Because the angles of incidence and reflection of the scanning beam continue to be the same at the edges of the scan window, the proportion of optical energy reflected back to the scanner at the edges of the scan window continues to be the same. Since the power of the incident beam is higher, however, the optical power reflected back to the scanner is higher. The net effect of the Chisholm approach is that the optical response curve is “flattened,” so that the optical response is more nearly constant across the width of the scan window.
Despite the apparent elegance of the approach taken in Chisholm, it has several important disadvantages. First, increasing the power of the laser near the edges of the symbol has serious safety implications because the increased laser power can pose a danger to the eyes of the scanner operator or other bystanders, and when the beam nears the edge of the symbol more of the optical power is likely to be reflected into someone's eyes. Second, using the laser at a higher power output and continually cycling the laser between low and high power states will decrease the lifetime of the laser and the scanner, ultimately driving up costs to the end user. Finally, the higher power output of the laser means additional power consumption and additional heat dissipation problems. Power consumption and heat dissipation both can lead to additional expense in making and using the scanner, as well as inconvenience to the user who, in the case of a hand-held scanner, must carry the additional weigh of heat sinks, etc, used to dissipate the heat created by the additional power consumption of the laser.
Given the shortcomings in methods to improve scanning near the edges of the scan window, there is a need in the art for an improved method of improving the optical response of scanners.
SUMMARY OF THE INVENTIONThe disclosure describes an apparatus and method for automatic gain control during scanning. The apparatus comprises an optical detector to receive an optical signal reflected from a symbol positioned within a scan window by an optical beam scanned from a leading edge of the scan window to a trailing edge of the scan window; and a processor coupled to the optical detector to adjust the gain of the optical detector during the beam scan. The process comprises receiving an optical signal using an optical detector, wherein the optical signal comprises optical energy reflected from a symbol positioned in a scan window as an optical beam scans from a leading edge of the scan window to a trailing edge of the scan window, and adjusting the gain of the optical detector during receipt of the optical signal. A calibration process is disclosed comprising calibrating the optical detector to obtain a plurality of gain corrections, each gain correction corresponding to a different position between a leading edge and a trailing edge of a scan window, and storing the plurality of gain corrections.
BRIEF DESCRIPTION OF THE DRAWINGSNon-limiting and non-exhaustive embodiments of the present invention are described with reference to the following figures, wherein like reference numerals refer to like parts throughout the various views unless otherwise specified.
Embodiments of an apparatus and method for automatic gain control during scanning are described herein. In the following description, numerous specific details are described to provide an understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, materials, etc. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring aspects of the invention.
Reference throughout this specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” in this specification do not necessarily all refer to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In operation, the beam generator 202, as controlled by the beam generator module 204, generates an optical beam 212—typically a laser beam in the visible range of wavelengths, but it can be other wavelength ranges as well—and scans the beam across a scan window 215. A bar code 214 is positioned within the scan window; the bar code 214 may occupy some or all of the width of the scan window 215. The scanning beam 212 creates a spot that traverses the scan window 215 and the bar code 214 along a scan path 216, from a leading edge 218 of the scan window to a trailing edge 220 of the scan window. As the beam scans across the scan window and reaches the bar code 214, a portion of the optical energy from the scanning beam is reflected from the bar code and travels back to the optics 210, where it is focused onto the optical detector 206. The magnitude of the optical energy reaching the optical detector 206 will vary according to whether the scanning beam is reflected from a light portion of the bar code or a dark portion of the bar code; thus, the reflected optical energy reaching the optical detector is an optical signal containing information from the bar code. As shown in
The control circuit 302 can include a peak detector to monitor peak amplitudes of the electrical signal, and can also be connected to a memory 304 to retrieve gain control information or information for other purposes. Although shown as a separate module, the memory 304 may also be incorporated into the control circuit 302. After the signal has been amplified in the amplifier 300, it is routed to a decoder 306, which extracts the information contained in the amplified signal and thus decodes the bar code 214. Once the signal has been decoded and the information from the bar code extracted, the information may optionally be sent to some external component, such as a computer.
Gi=GB+ΔGi for i=1 to 5.
Although shown as additive gain adjustments ΔGi, in other embodiments the gain adjustments can be multiplicative—for example, the gain corrections can be formulated so that they are factors that multiply the baseline gain, instead of being added to the baseline gain. There usually will be no correction to the baseline gain in the core segment, since the gain in that segment is already at the desired value. Generally, but not always, in the segments numbered 1-5 where gain correction is needed the values of the gain corrections ΔGi will be relatively higher nearer the leading edge 218 and the trailing edge 220 of the scan window, and will decrease monotonically and be relatively lower adjacent to the core or baseline segment. Thus, in general
ΔGi+1>ΔGi for i=1 to 4.
As shown, the gain corrections ΔGi will generally be symmetrical about the core or baseline segment, such that ΔG5 near the leading edge 218 of the scan window will be approximately equal to ΔG5 near the trailing edge 220. But this need not always be the case; it is entirely possible that the gain corrections may be asymmetrical.
At block 506 the test symbol is scanned, and at block 508 the peak amplitude of the signal in the first segment is determined using a peak detector of the kind known in the art. At block 510, the peak signal amplitude in the segment is compared to the peak signal amplitude in the baseline or core area. If the segment peak is greater than or equal to the baseline peak, then the process proceeds to block 512, where it checks to see if any segments remain; if any segments do remain, then the process moves to the next remaining segment at block 514, returns to block 508 and repeats the steps for each remaining segment.
If instead at block 510 the segment peak is lower than the baseline peak, then a gain correction ΔGi for that segment is adjusted upward. The amount by which the values of ΔGi are adjusted depends on the system being used. In one embodiment, the increment by which ΔGi are adjusted can be a specific fraction of the overall gain range of the system. For example, in an 8-bit system one increment is 1/256 of total gain range. This increment could be adjusted by a factor of two or three, but for accuracy it is desirable to increment in the smallest steps possible. Although shown as additive gain adjustments ΔGi, in other embodiments the gain adjustments can be multiplicative—that is, the correction factor can be formulated so that it is multiplied by the gain instead being added to the gain.
At block 516, the incremented ΔGi is added to the baseline gain GB for segment i. At block 518, the process checks whether any segments remain; if segments remain, then at block 520 the process moves to the next segment and then returns to block 508 and performs the same process on the next segment. The loop continues until gain corrections have been computed for all segments. If at block 512 or block 518 the process determines that all segments have been processed, then at block 522 the system checks to see whether the peak amplitude in every segment was equal to or greater than the peak amplitude in the baseline segment; if not, then the process returns to block 506 and repeats the process for all segments. If at block 522 the process finds that the peak amplitude in every segment was equal to or greater than the peak amplitude in the baseline segment, then at block 524 the cumulatively adjusted gain corrections ΔGi are stored for future use in scanning.
The above description of illustrated embodiments of the invention, including what is described in the Abstract, is not intended to be exhaustive or to limit the invention to the precise forms disclosed. While specific embodiments of the invention are described herein for illustrative purposes, various equivalent modifications are possible within the scope of the invention, as those skilled in the relevant art will recognize. These modifications can be made to the invention in light of the above detailed description.
The terms used in the following claims should not be construed to limit the invention to the specific embodiments disclosed in the specification and the claims. Rather, the scope of the invention is to be determined entirely by the following claims, which are to be construed in accordance with established doctrines of claim interpretation.
Claims
1. An apparatus comprising:
- an optical detector to receive an optical signal reflected from a symbol positioned within a scan window by an optical beam scanned from a leading edge of the scan window to a trailing edge of the scan window; and
- a processor coupled to the optical detector to adjust the gain of the optical detector during the beam scan independently of the position of the symbol within the scan window.
2. The apparatus of claim 1 wherein the processor adjusts the gain of the optical detector by adjusting the gain within a defined distance of one of the leading edge or the trailing edge.
3. The apparatus of claim 1 wherein the processor adjusts the gain of the optical detector by adjusting the gain within a defined distance of the leading edge and the trailing edge.
4. The apparatus of claim 1 wherein the processor adjusts the gain of the optical detector by:
- dividing the scan window into a plurality of segments; and
- applying a plurality of gain corrections to the optical detector, each gain correction corresponding to one of the segments.
5. The apparatus of claim 4 wherein the plurality of segments comprises a plurality of segments grouped near the leading and trailing edges and a segment approximately midway between the leading and trailing edges.
6. The apparatus of claim 1, further comprising a memory, wherein the optical detector is calibrated to obtain a plurality of gain corrections, each gain correction corresponding to a segment of the scan window between the leading edge and the trailing edge, and the plurality of gain corrections are stored in the memory.
7. The apparatus of claim 6 wherein adjusting the gain comprises recalling a stored gain correction and applying the gain correction to its corresponding segment.
8. The apparatus of claim 6 wherein calibrating the optical detector comprises:
- dividing the scan window into a plurality of segments;
- scanning a test symbol positioned in the scan window and determining the peak amplitude of the received signal in each segment; and
- for each segment, calculating a gain correction based on the difference between the peak amplitude of the received signal in the segment and the maximum peak amplitude of the received signal throughout the scan.
9. The apparatus of claim 8 wherein calculating a gain correction comprises adjusting the gain in each segment until the peak amplitude in the segment equals or exceeds the maximum peak amplitude, the gain correction being approximately equal to the cumulative gain adjustment in each segment.
10. The apparatus of claim 6 wherein calibrating the optical detector and storing the gain corrections is done once.
11. A scanning apparatus comprising:
- an optical beam generator to generate an optical beam and scan the optical beam across a scan window from a leading edge of the scan window to a trailing edge of the scan window;
- an optical detector to receive an optical signal reflected from a symbol positioned in the scan window;
- a processor coupled to the optical detector to adjust the gain of the optical detector during the scan independently of the position of the symbol within the scan window; and
- a memory coupled to the processor, the memory having a plurality of gain corrections stored therein.
12. The apparatus of claim 11 wherein the processor adjusts the gain of the optical detector by:
- dividing the scan window into a plurality of segments; and
- applying the gain corrections to the optical detector, each gain correction corresponding to one of the segments.
13. The apparatus of claim 12 wherein the plurality of segments comprises a plurality of segments grouped near the leading and trailing edges and a segment approximately midway between the leading and trailing edges.
14. The apparatus of claim 11, further comprising a memory, wherein the optical detector is calibrated to obtain a plurality of gain corrections, each gain correction corresponding to a segment of the scan window between the leading edge and the trailing edge, and the plurality of gain corrections are stored in the memory.
15. The apparatus of claim 14 wherein adjusting the gain comprises recalling a stored gain correction and applying the gain correction to its corresponding segment.
16. The apparatus of claim 14 wherein calibrating the optical detector comprises:
- dividing the scan window into a plurality of segments;
- scanning a test symbol and determining the peak amplitude of the received signal in each segment; and
- for each segment, calculating a gain correction based on the difference between the peak amplitude of the received signal in the segment and the maximum peak amplitude of the received signal throughout the scan.
17. The apparatus of claim 16 wherein calculating a gain correction comprises adjusting the gain in each segment until the peak amplitude in the segment equals or exceeds the maximum peak amplitude, the gain correction being approximately equal to the cumulative gain adjustment in each segment.
18. A process comprising:
- receiving an optical signal using an optical detector, wherein the optical signal comprises optical energy reflected from a symbol positioned in a scan window as an optical beam scans from a leading edge of the scan window to a trailing edge of the scan window; and
- adjusting the gain of the optical detector during receipt of the optical signal independently of the position of the symbol within the scan window.
19. The process of claim 18 wherein adjusting the gain of the optical detector comprises adjusting the gain within a defined distance of one of the leading edge or the trailing edge.
20. The process of claim 18 wherein adjusting the gain of the optical detector comprises adjusting the gain within a defined distance of the leading edge and the trailing edge.
21. The process of claim 18 wherein adjusting the gain of the optical detector comprises applying a plurality of gain corrections, wherein each gain correction corresponds to a different position between the leading edge and the trailing edge of the scan window.
22. The process of claim 18 wherein adjusting the gain of the optical detector comprises:
- dividing the scan window into a plurality of segments;
- applying a plurality of gain corrections to the optical detector, each gain correction corresponding to one of the segments.
23. The process of claim 22 wherein the plurality of segments comprises a plurality of segments grouped near the leading and trailing edges and a segment approximately midway between the leading and trailing edges.
24. The process of claim 22 wherein applying a gain correction involves recalling a stored gain correction and applying the gain correction to its corresponding segment.
25. The process of claim 18, further comprising:
- calibrating the optical detector to obtain a plurality of gain corrections, each gain correction corresponding to a segment of the scan window between the leading edge and the trailing edge; and
- storing the plurality of gain corrections.
26. The process of claim 25 wherein calibrating the optical detector comprises:
- dividing the scan window into a plurality of segments;
- scanning a test symbol and determining the peak amplitude of the received signal in each segment; and
- for each segment, calculating a gain correction based on the difference between the peak amplitude of the received signal in the segment and the maximum peak amplitude of the received signal throughout the scan.
27. The process of claim 26 wherein calculating a gain correction comprises adjusting the gain in each segment until the peak amplitude in the segment equals or exceeds the maximum peak amplitude, the gain correction being approximately equal to the cumulative gain adjustment in each segment.
28. The process of claim 18 wherein calibrating the optical detector and storing the gain corrections is done once.
29. A process comprising:
- scanning an optical beam across a scan window from a leading edge of the scan window to a trailing edge of the scan window;
- receiving an optical signal using an optical detector, wherein the optical signal comprises optical energy reflected from a symbol positioned in the scan window as the optical beam scans across the scan window;
- determining a baseline gain profile to be applied to the optical detector during the scan; and
- applying a gain correction profile to the baseline gain profile during receipt of the optical signal independently of the position of the symbol within the scan window.
30. The process of claim 29 wherein the baseline gain profile is constant across the scan.
31. The process of claim 29 wherein the baseline gain profile is determined using an automatic gain control (AGC).
32. The process of claim 29 wherein applying a gain correction profile comprises applying a plurality of gain corrections, each gain correction corresponding to a different position between the leading edge and the trailing edge of the scan window.
33. The process of claim 29 wherein applying a gain correction profile comprises:
- dividing the scan window into a plurality of segments;
- applying a plurality of gain corrections to the optical detector, each gain correction corresponding to one of the segments.
34. The process of claim 33 wherein the plurality of segments comprises a plurality of segments grouped near the leading and trailing edges and a segment approximately midway between the leading and trailing edges.
35. The process of claim 33 wherein applying a gain correction profile involves recalling a plurality of stored gain corrections and applying each stored gain correction to its corresponding segment.
36. The process of claim 29, further comprising:
- calibrating the optical detector to obtain the gain correction profile, the profile comprising a plurality of gain corrections, each corresponding to a segment of the scan window between the leading edge and the trailing edge; and
- storing the plurality of gain corrections.
37. The process of claim 36 wherein calibrating the optical detector comprises:
- dividing the scan window into a plurality of segments;
- scanning a test symbol and determining the peak amplitude of the received signal in each segment; and
- for each segment, calculating a gain correction based on the difference between the peak amplitude of the received signal in the segment and the maximum peak amplitude of the received signal throughout the scan.
38. The process of claim 37 wherein calculating a gain correction comprises adjusting the gain in each segment until the peak amplitude in the segment equals or exceeds the maximum peak amplitude, the gain correction being approximately equal to the cumulative gain adjustment in each segment.
39. A process for obtaining gain corrections for a scanner, the process comprising:
- calibrating the optical detector to obtain a plurality of gain corrections, each gain correction corresponding to a different position between a leading edge and a trailing edge of a scan window; and
- storing the plurality of gain corrections.
40. The process of claim 39 wherein calibrating the optical detector comprises:
- dividing a scan window into a plurality of segments;
- scanning a test symbol and determining the peak amplitude of the received signal in each segment; and
- for each segment, calculating a gain correction based on the difference between the peak amplitude of the received signal in the segment and the maximum peak amplitude of the received signal throughout the scan.
41. The process of claim 40 wherein calculating a gain correction comprises adjusting the gain in each segment until the peak amplitude in the segment equals or exceeds the maximum peak amplitude, the gain correction being approximately equal to the cumulative gain adjustment in each segment.
42. The process of claim 41 wherein calibrating the optical detector and storing the gain corrections is done once.
43. A process for obtaining a gain correction profile for a scanner including an optical detector, the process comprising:
- calibrating the optical detector to obtain the gain correction profile,the profile comprising a plurality of gain corrections, each gain correction corresponding to a different position between a leading edge and a trailing edge of a scan window; and
- storing the gain correction profile.
44. The process of claim 43 wherein calibrating the optical detector comprises:
- dividing the scan window into a plurality of segments;
- scanning a test symbol and determining the peak amplitude of the received signal in each segment; and
- for each segment, calculating a gain correction based on the difference between the peak amplitude of the received signal in the segment and the maximum peak amplitude of the received signal throughout the scan.
45. The process of claim 44 wherein calculating a gain correction comprises adjusting the gain in each segment until the peak amplitude in the segment equals or exceeds the maximum peak amplitude, the gain correction being approximately equal to the cumulative gain adjustment in each segment.
46. The process of claim 43 wherein calibrating the optical detector and storing the gain corrections is done once.
Type: Application
Filed: Sep 3, 2004
Publication Date: Feb 10, 2005
Inventor: Jesse Kolstad (Fife, WA)
Application Number: 10/933,981