Patent Description:
Direct Part Marking (DPM) technology is used to provide a machine readable code that is a permanent marking of the material of a part or component. This may be accomplished, for example, through dot-peen marking. In dot peen marking, a hard pin (e.g., carbide or diamond tip assembly) is caused to strike the surface of a part to form a pattern of dots that create a permanent mark. Dot peen marking machines can use an electromechanical or pneumatically driven marking pin to stamp (or peen) a series of dots to form the desired marking that may represent, for example, a bar code or quick response (QR) code, text, logos, or 2D Data Matrix codes.

Codes such as QR codes can be used to permanently mark a part or product, but conventional image acquisition and decoding systems designed to read higher resolution inked codes may have difficulty correctly reading the codes generated using dot peen technology. Therefore, a need exists for improvements in the technology for reading dot peened DPM.

Document <CIT> discloses an optical code reader wherein if the code elements consist of small dots, due to printing problems for example, an out-of-focus image where the dots are merged is used to decode the barcode, and, if the code elements do not consist of small dots, a focused image is used to decode the barcode.

Document <CIT> discloses a barcode reader also for reading etched barcodes with adjustable focus and illumination, mainly by using relative movements of the elements and the barcode.

Document <CIT> discloses a barcode reader also for decoding dot-peened marks, with an autofocus and multiple illuminations.

Accordingly, in one aspect, the present invention embraces methods and apparatus for machine reading of a dot peened mark, according to claims <NUM> and <NUM>.

In an example embodiment, a method consistent with the present teachings involves: measuring a distance from a lens to a dot peened mark; calculating a focus position for an autofocus system that focuses the lens on the dot peened mark; applying an offset to the calculated focus position to produce an focus motor position; controlling the autofocus system by setting the autofocus system to the offset focus position; and acquiring an image of the mark with the autofocus system set to the offset focus position.

In accord with certain embodiments the offset is adequate to cause adjacent dots in the dot peened mark to appear merged in the acquired image. In accord with certain embodiments, the offset is determined prior to applying the offset. In accord with certain embodiments, determining the offset comprises determining an offset value by reference to stored values (e.g., a table or graph). In accord with certain embodiments, determining the offset comprises calculating the offset using one of the following equations: <MAT> <MAT> and <MAT> where the values of α, β and γ, and η are constants that depend on the autofocus mechanism and the lens.

In accord with certain embodiments, the process also involves determining whether or not the image to be acquired is that of a dot peened mark and if not, setting the offset to zero instead of the calculated offset. In accord with certain embodiments, the process also involves decoding the mark at a decoder by using the acquired image of the mark.

Another method involves: measuring a distance from a lens to a dot peened mark; calculating a focus position for an autofocus system that focuses the lens on the dot peened mark; determining an offset to the calculated focus position; applying the offset to the calculated focus position to produce an offset focus position; controlling the autofocus system by positioning the autofocus system to the offset focus position; acquiring an image of the mark with the autofocus system set to the offset focus position; and decoding the mark at a decoder by using the acquired image of the mark.

In certain embodiments, the offset is adequate to cause adjacent dots in the dot peened mark to appear merged in the acquired image. In certain embodiments, determining the offset comprises determining an offset value by reference to stored values (e.g., from a table or graph). In certain embodiments, determining the offset comprises calculating the offset using one of the following equations: <MAT> <MAT> and <MAT> where the values of α, β and γ, and η are constants that depend on the autofocus mechanism and the lens.

In certain embodiments, the process further involves determining whether or not the image to be acquired is that of a dot peened mark and if not, setting the offset to zero instead of the calculated offset.

In another example embodiment, a mark reader apparatus has a lens and an autofocus system that manipulates the lens in accordance with control signals. An image acquisition system measures a distance from the lens to a dot peened mark. A processor is programmed to: calculate a focus position for an autofocus system that focuses the lens on the dot peened mark; apply an offset to the calculated focus position to produce an offset focus position; control the autofocus position by positioning the autofocus system to the offset focus position; and via the image acquisition system, acquire an image of the mark with the autofocus system set to the offset focus position.

In certain embodiments, the offset is adequate to cause spaces between adjacent dots in the dot peened mark to appear merged in the acquired image. In certain embodiments, the processor is further programmed to determine the offset prior to applying the offset. In certain embodiments, determining the offset involves determining an offset value by reference to stored values (e.g., from a table or graph). In certain embodiments, a value of the offset is determined by calculating the offset using one of the following equations: <MAT> <MAT> and <MAT> where the values of α, β and γ, and η are constants that depend on the autofocus mechanism and the lens.

In certain embodiments, the processor is further programmed to determine whether or not the image to be acquired is that of a dot peened mark and if not, set the offset to zero instead of the calculated offset. In certain embodiments, a decoder decodes the mark by using the acquired image of the mark. In certain embodiments, the autofocus system includes a motor, and the offset is an offset to the motor position.

The foregoing illustrative summary, as well as other exemplary objectives and/or advantages of the invention, and the manner in which the same are accomplished, are further explained within the following detailed description and its accompanying drawings.

The present invention embraces a method and apparatus for dot peen DPM decoding using autofocus apparatus.

In accord with certain example embodiments, the image acquisition system is altered in order to apply an offset to the motor position for an autofocus motor. The distance to the mark is measured and an offset is applied that causes the dots to merge and become easier for machine reading.

With reference to <FIG>, a barcode reader can be viewed as having two main components: the decoder <NUM> that is used to decode barcodes and QR codes such as <NUM> within captured images, and an image acquisition system <NUM> that is used to capture the images sent to the decoder <NUM>. In an example of such a system, the image is captured through a lens <NUM> whose focus is adjusted by an autofocus motor.

When dot peen DPM marks are decoded using current technology, the decoder is specially adapted to reliably decode the dotted image as compared with more conventional markings. Such decoders are commonly processor based and the algorithms that run on the processor to decode such images can take significant processing time to execute. But, without such specialized algorithms, the marks are often difficult to reliably decode.

In accord with certain embodiments consistent with the present invention, the acquisition process including the autofocus process can be modified so that a more readily decodable image is acquired and sent to the decoder. In this manner, the decoder can decode the mark successfully without the use of dot peen specific decoding algorithms.

In accord with certain example embodiments, the acquisition system and more precisely the autofocus system is modified in order to apply an offset to an autofocus position that is normally calculated according to a measured distance to the mark. This offset results in an image of the mark to be acquired slightly out of focus so that the boundaries of the dots in the dot peened mark are removed or lessened so that the mark is readable by conventional (and faster) decoding algorithms.

In the examples given below, the autofocus system is a motor driven system in which the offset is applied to a motor position. However, generally speaking, the offset can be applied to any autofocus system so that the focus is offset in any suitable manner consistent with the particular autofocus system at hand. Hence, in the discussion that follows, application of an offset to an autofocus motor position is but one example of how a focus offset can be applied generally to any autofocus system.

Intuitively, one would generally feel that the sharpest possible image would yield the best detection. However, in the case of dot peened marks and conventional decoder operation, the representation of the image as an arrangement of dots turns out to be difficult to properly decode. However, when the image is slightly de-focused, conventional decoders interpret the slightly blurred dots which fill spaces between adjacent dots more accurately than if the focus is perfect.

The image shown in <FIG> is an example of a dot peened QR code that has been captured using a conventional autofocus process. This image has sharply defined dots that form a QR code, but such image requires specific algorithms on the decoder in order to be decoded. Conventional QR decoding algorithms are likely to produce errors.

When a small offset is applied to the autofocus motor (which depending on the measured distance to the mark), the dots appear to merge, and the image becomes easier for conventional decoding processes to capture.

The image of <FIG> is an image of the same QR code of <FIG> which has been captured using the offset discussed above. In this image the dots have largely merged together to make a QR code that is more readily readable using conventional decoder algorithms. Of course, this is not to suggest that optimization of the decoder cannot be carried out, but with the dots merged, conventional decoders become quite adept at reading dot peened marks without having to enable specific algorithms for dot peened marks.

Referring now to <FIG>, a more detailed view of an example embodiment consistent with the present invention is depicted with decoder <NUM> and a portion of the image acquisition system <NUM>. In this example, the autofocus system is a motor driven system, but the process can be generalized for any autofocus system without limitation by adjusting the focus in any suitable manner using an offset as taught herein. In order to acquire a suitable image in accord with the present teachings, the image acquisition process of system <NUM> first makes a distance measurement at <NUM> which is conventionally used by the autofocus system to assure a sharply focused image. Based on this distance, the system can calculate a motor position at <NUM> for a motor that drives a lens assembly so as to focus the lens on the mark.

In the present embodiment, the user can set the system into a mode that is adapted for reading dot peen marks and if this mode is enabled at <NUM>, then the system calculates a small autofocus motor offset to be applied to the motor position at <NUM>. This offset is added to the motor position calculation from <NUM> at <NUM> and the sum is used to actually position the autofocus motor using an autofocus motor position controller at <NUM>. As a result, the autofocus system adjusts the image acquisition system's lens so that it is slightly out of focus when the image acquisition occurs at <NUM> so that the decoder <NUM> is provided with an image in which the spaces between the dots in the dot peened mark are lessened or removed. This permits the decoder <NUM> to rapidly decode the mark as represented by the image that has been acquired.

In certain example embodiments, the user can select between a dot peen mode in which the offset is applied and another mode in which no offset is applied. In one example, this can be accomplished when not in the dot peen mode at <NUM>, the autofocus motor offset can simply be set to zero at <NUM> and the process proceeds to <NUM> with the effects of the offset calculation being overridden to an offset of zero.

In accord with certain example embodiments, a small offset is applied to the autofocus motor position as described above so as to create a slight de-focusing of the image being captured. This causes the spaces between the dots of the dot peened mark to largely disappear. The amount of offset can be established in any number of ways. For example, for varying distances of the reader to the mark, the amount of offset can be determined experimentally by incrementally adding an amount of offset until spaces between dots merge. If too much offset is added, the image may become too out of focus, so the amount of offset for a given distance is adjusted to achieve an image with merged dots and little more. In another example embodiment, the amount of offset can be gradually increased until the captured image is quickly and reliably decoded by the decoder.

For multiple focus distances, a table or graph of suitable offsets can be generated and the correct offset for a given distance can be looked up. In this case such a lookup is considered a "calculation" for purposes of this discussion.

In another example embodiment consistent with the present invention, the offset can be calculated as follows:.

If the distance between the dots of the mark and the distance to the mark are known: <MAT> where the value of α is an empirically determined constant that depends on the autofocus mechanism and the lens.

If the distance between the dots of the mark and the motor position are known: <MAT> where the values of β and γ are empirically determined constants that depend on the autofocus mechanism and the lens.

If the distance between the dots of the mark is measured in the image (in pixels): <MAT> where the value of η is an empirically determined constant that depends on the autofocus mechanism and the lens.

As discussed above, in certain embodiments, the distance to the mark is measured and then, the motor position is set according to this distance. In other embodiments, a passive autofocus can be used where images taken at various motor positions are analyzed to find the best focus position. In this case, the real distance is not known, but the offset can still be computed using equations <NUM> and <NUM> above.

Referring now to <FIG>, an example system for reading bar codes, QR codes, or other marks (which in this example, utilizes a motor driven autofocus system) is depicted in block diagram form. Operation of the system is controlled by a programmed processor <NUM> operating on instructions and data stored in non-volatile memory <NUM> or random access memory <NUM>. Communication between the processor <NUM> and memories <NUM> and <NUM> as well as the other components of the system is carried out using one or more buses represented at <NUM>.

In this example system, the decoder may be a hardware decoder module or may be software or firmware implemented or any combination thereof which in any case is represented by decoder <NUM>.

In this example system, the image acquisition module <NUM> may also be hardware or software or firmware implemented or any combination thereof. Image acquisition module <NUM> operates in cooperation with a lens or lens system <NUM> through which light reflected from the mark is captured. The lens <NUM> is focused using an autofocus motor <NUM> that is responsive to an autofocus motor controller <NUM>. Input from the user and output to the user is provided with a user interface <NUM> (Input / Output or I/O <NUM>).

In operation, the image acquisition module <NUM> under control by the processor <NUM> provides a distance measurement to the mark which is to be imaged. The image acquisition module <NUM> then conveys through processor <NUM> instructions to the autofocus motor controller <NUM> that cause the autofocus motor controller <NUM> to position the motor <NUM> (and thus lens <NUM>) at a distance that includes the calculated offset so as to provide for a merging of the peened dots. The image acquisition module <NUM> then captures an image of the mark and sends the image to memory where the image is accessed and decoded by decoder module <NUM>. The input / output <NUM> can be used by the user in certain embodiments to control whether or not a dot peened image is to be acquired, and thus whether or not an offset is to be applied to the motor position.

An example process of operation of the system of <FIG> is depicted in flow chart form as <FIG> starting at <NUM>. At <NUM>, the image acquisition module measures a distance to the mark. At <NUM>, the focus position (which in this example is a motor position) is calculated for the distance that has been measured so as to put the mark in focus.

At <NUM>, the process determines whether or not the user has selected operation in the dot peen mode or not. If so, an offset is calculated at <NUM> and that offset is added to the focus position (motor position in this example) at <NUM>. The autofocus system is then positioned at <NUM> to the offset focus position so as to cause the lens to be positioned with the offset thereby merging adjacent dots. The image is then acquired at <NUM> and the process is done at <NUM>.

In the case where the system is not in the dot peen mode at <NUM>, it is desired that no offset be applied. Hence, the offset value is set to zero at <NUM>. This zero offset overrides any offset calculated at <NUM> and the motor position at <NUM> is the same as the motor position calculated at <NUM>.

Those skilled in the art will also appreciate, upon considering the present teachings, that some auto focus systems do not use a motor (for example, a liquid lens autofocus system). However, the present teachings can also be applied to such a system by applying an offset to the focus position of any known autofocus system.

Claim 1:
A method, comprising:
measuring a distance from a lens (<NUM>, <NUM>) to a mark (<NUM>);
calculating a focus position for an autofocus system (<NUM>) that focuses the lens (<NUM>, <NUM>) on the mark (<NUM>);
applying an offset to the calculated focus position to produce an offset focus position;
setting the autofocus system (<NUM>) to the offset focus position;
acquiring an image of the mark (<NUM>) with the autofocus system (<NUM>) set to the offset focus position; and
providing the image of the mark (<NUM>) to a decoder for decoding;
wherein the method further comprises determining the offset by
calculating the offset based on one or more of: a distance between dots of the mark (<NUM>), the distance from the lens (<NUM>, <NUM>) to the mark (<NUM>), and a focus position.