Producing and reading optical codes with variable density to suit visual quality and reliability

Optical codes with variable spatial density and optimized parameters enhance reliability and efficiency by integrating into host images, addressing space and readability issues, and ensuring robust data recovery.

JP7543374B2Active Publication Date: 2024-09-02DIGIMARC CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022184216
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-10-26
Filing Date
2022-11-17
Publication Date
2024-09-02
Estimated Expiration
2039-02-25

AI Technical Summary

Technical Problem

Existing optical codes, such as barcodes and digital watermarks, face challenges in occupying valuable space, causing confusion in image processing, and being unreliable due to size reduction and placement on hard-to-find locations, while high-resolution printing and color selection limitations hinder effective data recovery.

Method used

Optical codes are generated with variable spatial density and optimized parameters, including dot spacing, size, and component priorities, using software modules to integrate into host images, ensuring robustness and visual quality, and decoded using predictive filters to enhance reliability.

Benefits of technology

The method improves the reliability and efficiency of reading optical codes by optimizing spatial density and component priorities, allowing for robust data recovery from degraded images, even in small or damaged areas, while maintaining aesthetic appeal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007543374000041
    Figure 0007543374000041
  • Figure 0007543374000076
    Figure 0007543374000076
  • Figure 0007543374000084
    Figure 0007543374000084
Patent Text Reader

Abstract

A method and substrate for producing 2D optical codes that allows for variable spatial density of marking elements is provided. The majority of the code is formed from message components that convey the payload and reference components that enable geometric synchronization. Dots are assigned to serve one or both of these purposes. Parameters of the optical code are optimized to achieve signal robustness, etc. An optimization program determines spatial density, dot distance, dot size, and signal component priority to optimize robustness. An optical code generator uses these parameters to generate an optical code with the desired spatial density and robustness. The optical code can be integrated into a host image, such as a packaging or label image, text, and graphics, or the optical code can be printed alone on a blank label or carton where no optical code will be printed.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The technology generally relates to image processing to generate machine-readable optical codes for printing (optionally after integration with host image content), complementary robustness measurements to optimize the optical codes, and optical code readers for reliably and efficiently reading such codes from objects.

[0002] In part, this application relates to enhancements and improvements to sparse signaling techniques, which are detailed in the applicant's published U.S. Patent Application No. 20170024840 and which are presumably familiar to those of skill in the art.

[0003] The technical effect provided by many of the detailed configurations is to achieve a highly reliable optical code in terms of read performance while using a low number of marking elements (dots) and / or a low dot density per unit area.

[0004] In the United States, this application is a continuation-in-part of application Ser. No. 16 / 002,989, filed June 7, 2018, and claims priority to Provisional Application No. 62 / 751,084, filed October 26, 2018, Ser. No. 62 / 730,958, filed September 13, 2018, Ser. No. 62 / 673,738, filed May 18, 2018, Ser. No. 62 / 670,562, filed May 11, 2018, Ser. No. 62 / 659,641, filed April 18, 2018, and Ser. No. 62 / 634,898, filed February 25, 2018. [Background technology]

[0005] Optical codes, such as the familiar one-dimensional and two-dimensional barcodes, are ubiquitous and of great importance in a variety of automated data collection applications. In fact, barcodes have become so widespread that it is now common to see a variety of barcode types on a single object, either to carry different types of data or to improve readability by redundantly encoding the same data on different parts of the object.

[0006] This increased use of bar codes poses several challenges to packaging and label design. First, each bar code must occupy a completely different space to ensure that it can be reliably read. This consumes valuable space that could be used for more important information, such as product information and aesthetic design elements that enhance the value and appeal of the object to the user. Second, this creates the potential for confusion and complexity in the image processing of image-based scanners, which are rapidly replacing laser scanners. While laser scanners may target specific bar codes one at a time, image-based scanners capture image frames that may include one or more parts or all of the optical code. Third, in an attempt to reduce the visual impact of these codes, they are often reduced in size and confined to hard-to-find locations on the object. This makes these codes less reliable and harder for users and machine vision equipment to locate and reliably read.

[0007] Other types of optical codes, such as robust digital watermarks, offer alternatives to traditional barcodes that address these challenges in a variety of ways. Digital watermarks can be hidden within other images on an object, and thus do not occupy valuable dedicated space. Digital watermarks can also be redundantly coded onto the object surface to improve the ease of locating and reliably reading the digital data codes (called payloads, or messages) they carry. This simplifies the task of imaging an object to obtain image frames from which the digital watermark payload can be reliably decoded. Watermarking techniques also improve the computational efficiency and reliability of automated data collection in various usage scenarios. This is because watermarking techniques facilitate reliable data collection from arbitrary and partial views of an object or label, even if it is torn, smudged, or crumpled.

[0008] Although digital watermarking provides these improvements, important applications exist where there is a need for improved optical data-carrying capabilities that meet aesthetic, robustness, and data capacity requirements.

[0009] One challenge is the formation of minimally invasive optical codes for host image areas without image content that can mask the optical code or even act as a carrier for the image code. In these areas, it is possible to generate fine shades that carry machine-readable data. In addition, in some cases, it is possible to select ink colors, or ink combinations, that reduce the visibility of the optical code to humans while maintaining the reliability of standard visible light scanning. For visual quality reasons, it is generally preferable to generate optical codes with a higher spatial resolution and to space the graphical elements of the code (e.g. dots or marks) at a distance from each other so that they are less noticeable.

[0010] However, there are often limitations on color selection and resolution that make these options impossible. Many objects are printed or marked using technologies that do not allow color selection and do not reliably mark dots below a minimum dot size. Printing optical codes on small labels using low-resolution thermal printers, sometimes at high print speeds, is one example. Other examples include commercial printing of small packages using technologies such as dry offset or flexography that cannot render high resolution and small dot sizes with high quality and consistency. Furthermore, there are often limitations based on design and cost constraints to use additional inks. Finally, even if the rendering equipment can utilize higher resolution and smaller dot markings and a variety of color inks, the image capture infrastructure or mode of image capture may not be able to capture the higher resolution or color information.

[0011] Another continuing challenge is the need to reliably read data from increasingly smaller spatial regions: the demand for increasing data capacity is fundamentally at odds with the reliable retrieval of that data from limited regions. Summary of the Invention

[0012] As detailed herein, the inventors have developed several inventive optical code techniques that address these and other challenges for a variety of applications. One inventive technique is a method for generating optical codes that optimizes parameters for visual quality and robustness (reliability) constraints. These parameters include spatial density, dot placement (e.g., spacing to avoid clumping), dot size, and optical code component priorities. In the latter, the priorities of code components such as reference (aka registration) signals and payload components are optimized to achieve improved robustness and visual quality.

[0013] One aspect of the technology is a method for generating optical codes. The method optimizes robustness by forming elements of the optical code according to signal priority and spatial constraints including dot spacing, dot size, and dot density. The elements are formed by dots or inverse dots. A dot is a marking that is not surrounded by a marking or is surrounded by a lighter marking, and an inverse dot (hole) is an absence of a mark or a lighter marking surrounded by an area of ​​a darker marking. To achieve the desired visual quality, the method forms dots (or inverse dots) in order of the priority of the code components while adhering to the constraints of dot size, dot density, and dot spacing.

[0014] Another inventive technique is a method for optimizing parameters based on a training set of test images by generating and integrating optical codes into test images with varying optical code parameters, measuring the robustness of the test images, and optimizing said parameters by finding the combination of parameters that achieves the optimal robustness across the test images.

[0015] A further inventive technique is an optical code insertion and decoding method. The optical code insertion method integrates an optical code into host image content such as a packaging or label design. Some insertion method embodiments consider and utilize attributes of the host image to improve visual quality and robustness. Decoding method embodiments efficiently and reliably decode the payload from a captured degraded image of the marked object.

[0016] These inventive methods are implemented in optical code generator, inserter, optimizer, and decoder components that are implemented in software modules executed by various types of processors, such as those used in various types of thermal label printers, pre-press workstations, mobile devices, and image-based barcode scanners. The software instructions may also be transformed into logic circuits, such as application specific integrated circuits, programmable gate arrays, or a combination thereof.

[0017] Further inventive features will become apparent from the following detailed description and the accompanying drawings. [Brief description of the drawings]

[0018] [Figure 1] FIG. 1 illustrates a method for generating optical codes with variable spatial density to meet visual quality and reliability constraints. [Diagram 2] FIG. 1 illustrates a method for optimizing parameters of an optical code. [Diagram 3] FIG. 1 illustrates a process for constructing an optical code. [Figure 4] 14 illustrates another process for constructing an optical code. [Diagram 5] 14 illustrates another process for constructing an optical code. [Figure 6] 1 is a diagram illustrating a method of encoding a variable digital payload to be conveyed within an optical code. [Figure 7] 1 illustrates a tile of an optical code component, which may be used as a reference signal component, an encoded payload component, or a reference signal encoded in the payload, which may also be used as an encoded payload signal placed within a reference signal structure. [Figure 8] FIG. 2 illustrates a tile of an encoded payload signal. [Figure 9] 9 illustrates the encoded payload signal of FIG. 8 converted to the spatial resolution of the optical code component of FIG. 7. [Figure 10] A diagram illustrating the combination of optical code elements, including encoded payload and reference components, to form a high-density composite optical code. [Figure 11] FIG. 11 illustrates the mapping of a high-density composite optical code (such as that of FIG. 10) to an output image according to the priority and spatial constraints (eg, element spacing and signal density) of its optical code elements. [Figure 12]1 illustrates an example of a process for optimizing dot (mark) spacing and signal component intensity ratios. These parameters are derived in a training process that generates and inserts optical codes at each of several combinations of these parameters into each test image in a set of test images. [Figure 13] FIG. 13 illustrates the selection of optimal parameters in the example of FIG. 12 based on a robustness metric measured from test images. [Figure 14] 1 is a flow diagram illustrating a method for forming elements of an optical code within a spatial region to achieve a desired dot density. [Figure 15] FIG. 15 graphically illustrates the process of FIG. 14 with a waveform representing a high density optical code. [Figure 16] FIG. 15 graphically illustrates the process of FIG. 14 with a waveform representing a high density optical code. [Figure 17] FIG. 15 graphically illustrates the process of FIG. 14 with a waveform representing a high density optical code. [Figure 18] FIG. 15 graphically illustrates the process of FIG. 14 with a waveform representing a high density optical code. [Figure 19] FIG. 15 graphically illustrates the process of FIG. 14 with a waveform representing a high density optical code. [Figure 20] FIG. 15 graphically illustrates the process of FIG. 14 with a waveform representing a high density optical code. [Figure 21] FIG. 15 graphically illustrates the process of FIG. 14 with a waveform representing a high density optical code. [Figure 22] FIG. 15 graphically illustrates the process of FIG. 14 with a waveform representing a high density optical code. [Diagram 23] FIG. 13 illustrates an example of a label in which the output image of the optical code is tiled and then integrated. [Figure 24] FIG. 13 illustrates another example of a label design integrated with an optical code, with further degradation to illustrate the robustness of the optical code. [Diagram 25]FIG. 13 illustrates yet another example where tiles of optical code are integrated with text. [Figure 26] FIG. 13 illustrates a method for weighting elements of a data signal before using it to generate artwork that optimally carries the data signal. [Figure 27] FIG. 13 shows an excerpt from a composite code with the darkest element marked for copying to the output tile as a black dot. [Figure 28] FIG. 28 examines what happens if the starred pixel in the composite code excerpt of FIG. 27 is copied to the output tile as a black dot, and how a nonlinear filter kernel can be applied to such a black dot and the adjacent white pixels. [Figure 29] 1 is a flow chart illustrating aspects of the present technology. [Diagram 30] 1 is a flow chart illustrating aspects of the present technology. [Diagram 31] 1 is a flow chart illustrating aspects of the present technology. [Diagram 32] 1 is a flow chart illustrating aspects of the present technology. [Diagram 33] 1 is a flow chart illustrating aspects of the present technology. [Figure 33A] 1 is a flow chart illustrating aspects of the present technology. [Diagram 34] FIG. 13 illustrates a user interface of a software tool that allows the reference signal components of a composite mark to be adjusted, resulting in a sparse mark that may contain visually pleasing structure. [Diagram 35] 35 is a flow chart associated with the technique of FIG. 34. [Diagram 36] FIG. 35 shows sparse marks generated by the software tool of FIG. 34. [Figure 36A] FIG. 37 shows a zoomed-in view taken from the upper left corner of FIG. 36. [Figure 37] FIG. 35 shows an enlarged excerpt of an adhesive label printed with a pattern generated by the software tool of FIG. 34. [Figure 38] 13A-13C are diagrams illustrating a method of mapping data signal elements to locations within a host image artwork. [Figure 39] FIG. 13 illustrates an example of how different optical code resolutions can be adapted to a target output resolution, such as an image resolution for code insertion or for rendering a host image into which the code is inserted. [Diagram 40] 1A-1C are diagrams illustrating dot pattern variations to achieve improved visual quality and robustness. [Diagram 41] FIG. 1 illustrates a method incorporating several aspects of the present technology. [Diagram 42] FIG. 1 illustrates a method incorporating several aspects of the present technology. [Diagram 43] 1 is a diagram illustrating modulation of a reference signal component with a payload signal component in accordance with one aspect of the present technology. [Figure 44A] FIG. 44 illustrates a variation of the configuration of FIG. 43. [Figure 44B] FIG. 44 illustrates a variation of the configuration of FIG. 43. [Diagram 45] FIG. 44B compares selected outputs from the configuration of FIG. 43 against the configuration of FIG. 44A / 44B. [Figure 46] FIG. 44B illustrates Matlab code associated with the embodiments of FIGS. 43, 44A, and 44B. [Figure 47] 1 is a flow chart illustrating aspects of the present technology. [Figure 48A] FIG. 48A shows a grayscale image of a chair. [Figure 48B] FIG. 48B shows an excerpt of a grayscale image of a chair as rendered by a sparsely coded signal. [Figure 49] FIG. 1 illustrates how grayscale values ​​relate to different sparse patterns. [Figure 50A] FIG. 13 shows excerpts of images rendered with sparse signals of different bump sizes. [Figure 50B] FIG. 13 shows excerpts of images rendered with sparse signals of different bump sizes. [Figure 51] FIG. 13 illustrates the number of pixel locations that are excluded from marking with different exclusion distances. [Figure 52A] FIG. 13 illustrates the number of pixel locations that are excluded from marking with different exclusion distances. [Figure 52B] FIG. 13 illustrates the number of pixel locations that are excluded from marking with different exclusion distances. [Figure 53] FIG. 13 illustrates the number of pixel locations that are excluded from marking with different exclusion distances. [Figure 54] FIG. 13 illustrates the number of pixel locations that are excluded from marking with different exclusion distances. [Figure 55] FIG. 13 illustrates the number of pixel locations excluded from marking by different elliptical no-go zones. [Figure 56] FIG. 13 illustrates the number of pixel locations excluded from marking by different elliptical no-go zones. [Figure 57A] 13A-13C show different patterns in which one, two, three or four nearby pixel locations may be excluded from marking, respectively. [Figure 57B] 13A-13C show different patterns in which one, two, three or four nearby pixel locations may be excluded from marking, respectively. [Figure 57C] 13A-13C show different patterns in which one, two, three or four nearby pixel locations may be excluded from marking, respectively. [Fig. 57D] 13A-13C show different patterns in which one, two, three or four nearby pixel locations may be excluded from marking, respectively. [Figure 58] 1 is a flow diagram illustrating a method for decoding an optical code from an image signal captured from an object. [Figure 59] FIG. 1 shows an excerpt of a two-color message signal block. [Figure 60] FIG. 60 shows a sparse selection of marks copied from the message signal block of FIG. 59. [Figure 61] FIG. 1 shows a company logo acting as a mask. [Figure 62] FIG. 62 shows a sparse selection of marks copied from the message signal block of FIG. 59 at different densities according to the mask of FIG. 61. [Figure 63] FIG. 63 shows sparse marks within the tiled array of FIG. 62 on a more normal scale. [Fig. 64A] FIG. 13 shows an excerpt from a reference signal tile with a set of 2N dark waxels identified. [Figure 64B] FIG. 64B shows an optical code generated using N of the dark waxels identified in FIG. 64A to encode an N-bit message. [Figure 65A] FIG. 13 shows an excerpt from a reference signal tile with a set of N dark waxels identified. [Figure 65B] FIG. 65B shows an optical code generated using N / 2 of the dark waxels identified in FIG. 65A to encode an N-bit message. [Figure 66A] FIG. 1 shows four different dyads for signaling "0" and "1" bits using horizontally and vertically oriented Waxel pairs. [Figure 66B] FIG. 1 shows four different dyads for signaling "0" and "1" bits using horizontally and vertically oriented Waxel pairs. [Figure 66C] FIG. 1 shows four different dyads for signaling "0" and "1" bits using horizontally and vertically oriented Waxel pairs. [Figure 66D] FIG. 1 shows four different dyads for signaling "0" and "1" bits using horizontally and vertically oriented Waxel pairs. [Figure 67A]FIG. 13 shows an excerpt from a reference signal tile with a set of N dark waxel pairs identified. [Figure 67B] FIG. 68 shows an optical code generated by marking one waxel from each waxel pair identified in FIG. 67. [Figure 68A] FIG. 13 illustrates an excerpt from a reference signal tile with a set of dark waxels identified, each of which is associated with a message bit according to the waxel's spatial location. [Figure 68B] FIG. 68B shows an optical code beginning with 11110 that is generated by marking some of the waxels identified in FIG. 68A. [Figure 69A] FIG. 1 illustrates how a reference signal may have an extremum near the boundary between two waxels in one resolution, leading to a misidentification of the extremum in a higher resolution, and a solution therefor. [Figure 69B] FIG. 1 illustrates how a reference signal may have an extremum near the boundary between two waxels in one resolution, leading to a misidentification of the extremum in a higher resolution, and a solution therefor. [Figure 69C] FIG. 1 illustrates how a reference signal may have an extremum near the boundary between two waxels in one resolution, leading to a misidentification of the extremum in a higher resolution, and a solution therefor. [Figure 69D] FIG. 1 illustrates how a reference signal may have an extremum near the boundary between two waxels in one resolution, leading to a misidentification of the extremum in a higher resolution, and a solution therefor. [Figure 70] FIG. 1 shows an excerpt from a printed label containing an optical code in which some fixed marks are suppressed due to their proximity to the text, signaling that nearby variable marks should be subtracted when extracting the message. [Figure 71A] 1 illustrates an exemplary method for producing and reading a label having an optical code. [Figure 71B]1 illustrates an exemplary method for producing and reading a label having an optical code. [Figure 72A] 1 illustrates aspects of an encoder and a decoder; [Fig. 72B] 1 illustrates aspects of an encoder and a decoder; [Figure 73] FIG. 1 is a diagram of an electronic device in which components of an optical code generator, inserter, optimizer, and / or decoder as detailed herein may be implemented. [Fig. 74A] 1A-1C are diagrams illustrating different marking patterns that induce different levels of thermal stress in a thermal printer. [Fig. 74B] 1A-1C are diagrams illustrating different marking patterns that induce different levels of thermal stress in a thermal printer. [Fig. 74C] 1A-1C are diagrams illustrating different marking patterns that induce different levels of thermal stress in a thermal printer. [Fig. 74D] 1A-1C are diagrams illustrating different marking patterns that induce different levels of thermal stress in a thermal printer. [Figure 75] FIG. 13 illustrates how a block can be divided into regions, each of which can be processed separately in selecting elements for marking. [Figure 76A] FIG. 1 shows an excerpt of a sparse output block. [Figure 76B] FIG. 76B illustrates an excerpt of a data structure used to implement the no-entry constraints within the blocks of FIG. 76A. [Figure 76C] 76C is a flowchart detailing a method for using the data structure of FIG. 76B. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] This specification details embodiments of the present technology with reference to flow diagrams and explanatory text. The drawings and descriptions are implemented with processing modules that are most commonly implemented by software instructions to configure programmable hardware devices. In some embodiments, such software instructions are converted into firmware for integration into printers and scanners, or converted into digital logic circuits.

[0020] FIG. 1 illustrates a method for generating an optical code with variable spatial density to adapt the code to visual quality and reliability constraints. The objective is to generate an optical code for insertion into an image or other carrier such that the parameters of the optical code are optimized. These parameters include robustness and visual quality. The method achieves improved robustness by prioritizing optical message components that meet or exceed a robustness metric while also providing a desired spatial density and spacing of the optical code elements. The density and spacing (to avoid dot clumping) constraints allow the method to optimize optical code reliability while satisfying visual quality constraints.

[0021] The method begins with the input of a variable payload array 10 and reference (registered) signal parameters 11. From these inputs, the method constructs (12) the components of the optical code. These components consist of payload components and reference signal components. As will be described in more detail below, these components are not necessarily distinct, but need to be optimized to provide the robustness, signal capacity, and visual quality per unit area that they apply to the rendered output. This rendered output is an object that is marked with the optical code, such as by printing an image bearing the code (the "output image"), including by marking the output image onto a substrate by other means such as etching, engraving, firing, embossing, etc.

[0022] The method determines priorities to be applied to components (14), which are derived by determining parameters of an optical code that optimize robustness within constraints such as dot size, spatial density, and spacing of elements (e.g., dots or holes).

[0023] Using the priorities, the method proceeds to map the optical code to an output image within visual quality constraints (16). The output image is then rendered (18) onto a physical form such as a paper or plastic substrate for packaging or label material.

[0024] FIG. 2 is a diagram of a method for optimizing parameters of an optical code. The method optimizes dot (mark) density, dot spacing, and relative priority of optical code components. To optimize an optical code for a particular application, the method operates on a set of test images that represent the type of images for that application. For example, for optical codes used on labels, such as those typically printed by thermal printers for application on fresh produce (bakery items, meat and deli items, prepared foods, etc.), the test images are a set of label images. These label images consist of visual elements such as text, graphics, and conventional one- or two-dimensional bar codes. The test images consist of a mix of text, graphics, and conventional visible bar codes that are expected to be found on the majority of label images in normal use.

[0025] Similarly, in the case of packaging, the test images are a set of images that conform to the product manufacturer's style guide and consist of text, images, logos, color schemes (including inks and spot colors) in specific fonts, sizes, and spacing, substrate types including metal, plastic, and paper based on the packaging material, and preferred printing technologies (offset, dry offset, digital offset, inkjet, thermal, flexo, and gravure). In this case, the test images may be a set of training images of a particular packaging design that simulates various forms of degradation that images undergo due to rendering, use, and scanning.

[0026] For each of the test images, the method generates an output image with an inserted optical code (20). The optical code is constructed from payload and reference signal components using techniques that are described in more detail below. The output of constructing the code for the test images is a test image with an array of optical code elements at spatial locations. For ease of explanation, we refer to these elements as "dots", and the particular geometric structure of the dots can take a variety of shapes. The format of the image is binary in that its pixels correspond to the binary value of a mark or no mark signal. When printing with ink, mark or no mark refers to ink or no ink at that pixel location for a particular color separation (e.g., process colors CMY or K, or spot colors). The pixels of the output image may correspond to test image elements, optical code elements, or a mix of both. However, in some implementations, it is preferable to keep the spacing of the optical code elements at a minimum distance from image elements (including text) on the label, or to otherwise specify locations where the elements will not appear.

[0027] For each output image, a set of parameters is selected by sampling each parameter value from the allowable range of values ​​for that parameter. In one implementation, the parameters are the dot density of the optical code, the minimum inter-spacing of the optical code elements, and the priority of the optical code components. In one implementation, the priority values ​​are applied as the relative priorities of the optical code elements, specifically the relative weighting of the reference components and the encoded digital payload components.

[0028] After generating the output image, the method measures the robustness of the optical code in the output image (22). The robustness is measured by a robustness prediction program that calculates detection metrics from the output image to simulate degradation due to rendering, use, and scanning. These detection metrics are calculated using techniques detailed in U.S. Patent No. 9,690,967, which is incorporated by reference. See also U.S. Provisional Application No. 62 / 628,193, attached as Exhibit 1 to Application No. 62 / 634,898, which is incorporated by reference, and U.S. Application No. 15 / 154,529, filed May 13, 2016 (now U.S. Patent No. 10,217,182), and U.S. Application No. 15 / 918,924, filed March 12, 2018 (published as U.S. Patent No. 20180352111), which are also incorporated by reference herein.

[0029] Detection metrics include metrics that measure the reference signal of the optical code and metrics from the digital payload (e.g., matching the expected payload). The optical code is repeated within successive tiles of the output image. In addition, there is spatial redundancy within the tile. Thus, detection metrics may be calculated per unit area, with units of area ranging from the smallest area in which the code can be detected to the area of ​​several successive tiles in the horizontal and vertical dimensions.

[0030] The process of measuring robustness preferably takes into account the expected degradation of the optical code in rendering, use, and scanning. To do so, the degradation is simulated on the output image before measuring robustness. Since the optical code may be read by a swipe motion or by a presentation mode, the scan mode is also simulated. In the presentation mode, the object is expected to be presented to the imager, which is done so that the imager and the object are substantially static. The mode of scanning has implications for the robustness of the optical code. One implication of swiping is that the scan may introduce blurring. Another is that the optical code may be read from multiple tiles in the path of the swipe. An implication of the presentation mode is that the imager may only capture a portion of the object, e.g., a portion on one side. Therefore, the reliability of several different potential object viewpoints needs to be considered in the overall robustness score. In the case of swipe mode, the robustness measure may be summed from the detection metrics along one or more paths of the swipe scan.

[0031] The process of generating the optical code and measuring the robustness is performed for each test image and for each parameter to be optimized (e.g., minimum optical code element spacing in the optical code density of a tile, and optical code component priority). The method then generates an array of robustness measurements (24) with a robustness measure per parameter space sampling. Parameter space refers to a multi-dimensional space whose coordinates are parameter candidates, e.g., priority values, dot spacing, dot size, dot density, or some subcombination of these candidates.

[0032] The method then determines optimal parameters from the robustness measurements. To do so, the method analyzes the array of robustness measurements in the parameter space to find a region in the parameter space where the robustness measurements exceed the desired robustness constraints (26). This region defines a set of parameters for optical code element spacing and priorities that are expected to provide the desired robustness. In one approach, the method finds a location in the parameter space that minimizes the distance to the maximum value in the robustness score of each test image.

[0033] Having described the process of optimizing the parameters of the optical code, an embodiment of an optical code having variable density that is useful for integrating a code onto a label or package having text and graphics will now be described.

[0034] FIG. 3 illustrates a process for constructing an optical code. This is an embodiment of an optical code generator. In this embodiment, separate variable payload and reference signal components are generated and then combined. The payload is an array of data symbols, each representing two or more (2-ary or M-ary) message symbol values. The integer value M, referred to in the term M-ary, is the number of possible symbol values ​​per symbol element. For example, if M=3, the symbol values ​​have one of three states, such as 1, 0, and −1, or correspond to signal feature values ​​of three different quantization bins. The latter refers to a modulation scheme in which the host image feature values ​​are quantized into one of the quantization bins that correspond to the symbol values. To make the payload more robust, it is redundantly coded using a combination of error correction, error detection, repetition, and carrier signals. The processing in block 30 converts the payload into a robust coded payload component, where the symbols of the payload are conveyed within multiple elements of the coded payload component. These elements form a payload signal waveform with a certain spatial arrangement and amplitude.

[0035] The reference signal components are signals used to detect the optical code in the output image and to perform geometric synchronization. The processing in block 32 generates the reference signal components by specifying their spatial location and their signal waveform characteristics, such as amplitude. An example of this type of optical code with an encoded payload and reference signal is described in U.S. Patent No. 6,590,996, which is incorporated by reference.

[0036] An exemplary reference signal consists of several dozen spatial sine waves, each typically with a different phase, spanning a 2D spatial block between 1 and 64 cycles (alternating light-dark) in the horizontal and vertical directions. The integer frequencies ensure that the composite signal is continuous at both ends of the block. The continuous signal is sampled at uniformly spaced 2D points to obtain, for example, a 64x64 or 128x128 reference signal. (Particular reference signals, including frequencies and phases of the constituent sine waves, are detailed in Application Serial No. 62 / 611,404, filed December 28, 2017, the disclosure of which is incorporated herein by reference).

[0037] In block 34, the present embodiment assigns priorities to the elements of the encoded payload and reference signal components. This is accomplished by applying weights to the elements according to their assigned priorities. For example, the method multiplies the amplitude values ​​of the signal elements by a weighting factor proportional to the priority of their optical code components.

[0038] The embodiment of FIG. 3 then constructs the optical code into a two-dimensional spatial image representation in block 36 .

[0039] FIG. 4 illustrates another process for constructing an optical code. This is a variant of FIG. 3, where the reference signal components are formed with a configuration of encoded payload components. In block 40, this embodiment generates the encoded payload components. This approach may use error correction coding and modulation on a carrier signal similar to the embodiment of FIG. 3. Then, in block 42, this embodiment arranges the encoded payload elements into a pattern that forms the reference signal components. An example of this approach is described in U.S. Pat. No. 9,747,656, which is incorporated by reference. In a variant of this approach, the encoded payload elements are spatially alternated with fixed reference signal elements. The fixed elements form the pattern of the reference signal components.

[0040] To assign priorities to components in block 44, the present embodiment weights the signal components and fixed components of the encoded payload. This approach produces a spatial pattern of weighted components that are arranged to form a reference signal (46).

[0041] FIG. 5 is a diagram illustrating another process for constructing an optical code. This is another variation of FIG. 3, where the reference signal component serves as a carrier for the encoded payload signal element. In block 50, this embodiment generates an encoded payload component. For example, the sequence of payload components is error correction coded by converting the sequence of payload symbols into a longer sequence of encoded symbols using an error correction code such as block and / or convolutional error correction code. Some examples of block codes are, for example, BCH (Bose-Chaudhuri-Hocquenghem) and Reed-Solomon codes.

[0042] At block 52, the present embodiment modulates a component of a reference signal with an element of the encoded payload signal. In one implementation, the reference signal includes a set of spatial sine waves, each having a phase value. The payload is encoded by shifting the phase of the sine waves according to the value of the encoded payload signal element. In one protocol, the encoded payload elements are binary, meaning that they have one of two different values ​​per element. One binary value is represented by a zero phase shift, and the other is represented by a phase shift of π (180 degrees) of the corresponding sine wave. In other protocol variants, the encoded payload signal is M-ary, where M>2. The M value is limited by robustness constraints, and the higher it is, the harder it is to distinguish different symbol values ​​encoded within an image feature. The encoded payload is modulated onto the reference signal carrier component by shifting the phase to one of M corresponding phase shift states (e.g., 0, π / 2, π, or 3π / 2 radians). This may be implemented as a form of quantization-based modulation, where the phase of the reference signal components is quantized to fall within phase shift bins corresponding to the encoded payload symbols.

[0043] Not all components of the reference signal need be modulated with the payload signal. Rather, some subset of the reference signal may remain unmodulated, with this unmodulated component serving as a reliable signal for the first stage of detection. For example, the reference signal may consist of 200 sinusoids, of which a subset (e.g., 40-60) remain fixed and the others are available for modulation with the corresponding payload signal elements.

[0044] Another approach to modulating the reference signal is on-off keying of the reference signal components. In this approach, a subset of the reference signal sinusoids is fixed and the remainder is modulated to convey data using on-off keying. In this on-off keying, the encoded payload symbols can be encoded by including or not including a sinusoid at a predefined frequency location. Each encoded payload element is mapped to a frequency location within an image tile. If a payload element is a first binary value (e.g., 0 or -1), the sinusoid for that element is not included. Conversely, if a payload element is a second binary value (e.g., 1), the sinusoid for that element is included.

[0045] At block 54, the present embodiment assigns priorities to the optical signal components. This is done, for example, by applying scaling factors to selected sinusoidal components according to the priority. The higher the priority, the more weight the signal component is given by multiplying it by a larger scaling factor. In addition, different scaling factors are applied to the fixed and modulated reference signal components to provide greater relative priority to portions of the reference signal that are modulated or fixed.

[0046] In block 56, the present embodiment generates a spatial pattern of the optical code with the modulated reference signal components. For the sinusoidal embodiment, there are alternative ways to generate the spatial pattern. One alternative is to apply an inverse frequency domain transform, such as an inverse Fast Fourier Transform (FFT), to the composite components in the frequency domain. Another alternative is to start with the spatial domain waveforms of each sinusoidal component and combine them together to form the spatial pattern. As an alternative to sinusoids, other carrier signals, such as orthogonal arrays, with good autocorrelation but low cross-correlation may be used. These orthogonal arrays map to locations within the two-dimensional image tiles.

[0047] The output of each of the optical code generators of Figures 3-5 is a spatial domain image block. The pixel values ​​of the block are multi-valued, e.g., 8 bits per pixel. This image block may be used as a signal tile that is repeated and integrated with the host image content of the host image to form the output image. The output image is a label or packaging design that is rendered onto a substrate by a printer or other marking equipment (embosser, engraver, etcher, or the like). The signal components are prioritized according to assigned priorities. This priority allows the optical code to be written into the spatial domain of the host image design according to signal priorities and dot densities and spacings that optimize robustness and visual quality constraints.

[0048] (For the avoidance of doubt, "multi-valued" as used in this document refers to elements / pixels that have more than two potential states. For example, they may be greyscale elements (e.g. 8-bit representations) or they may have floating point values. At the other end of the spectrum are "two-tone" or "binary" image representations that consist of elements that have only two distinct values, e.g. black / white.)

[0049] We will now describe in detail some of the components of the optical code generator of Figures 3-5.

[0050] 6 is a diagram illustrating a method for encoding a variable digital payload to be conveyed within an optical code. This section describes further examples of how to generate the encoded payload components in the embodiments discussed above.

[0051] In the processing module 60 the data payload is processed to compute error detection bits, e.g. error detection message symbols such as cyclic redundancy check, parity, checksum, etc. Further fixed and variable messages used to identify the payload type and facilitate detection, such as synchronization signals, may be added at this stage or at subsequent stages.

[0052] Error correction encoding module 62 converts the message symbols into an array of encoded message elements (e.g., binary or M-ary elements) from which the message symbols can be recovered despite some transmission errors. Various techniques may be used. In an exemplary embodiment, the string of message elements is first applied to a forward error correction encoder, such as one that uses a block code, BCH, Reed-Solomon, convolutional code, turbo code, etc. The output is then applied to a repetitive encoder that repeats the data to improve robustness. (In some embodiments, the repetition coding is removed and replaced entirely with error correction coding. For example, rather than convolutional coding (e.g., at 1 / 3 rate) followed by repetition (e.g., repeating three times), the two may be replaced by convolutional coding to produce a coded payload having approximately the same length.) The output of module 62 may be referred to as a "signature."

[0053] The signature may be further randomized by a randomization module 64. One particular randomization module performs an XOR operation between each element of the signature and a corresponding element of a "scrambling key."

[0054] Next, the carrier modulation module 66 takes the message elements of the previous stage and modulates them onto a corresponding carrier signal. For example, the carrier can be an array of pseudorandom signal elements with an equal number of positive and negative elements (e.g., 16, 32, 64 elements), or other waveforms such as sinusoidal or orthogonal arrays. In the case of positive and negative elements, the payload signal is in the form of a binary antipodal signal. It can also be formed into a ternary (three levels: -1, 0, 1) or M-ary signal (M levels). These carrier signals can be mapped to spatial domain locations or spatial frequency domain locations. Another example of a carrier signal is the above-described sinusoid modulated using modulation schemes like phase shifting, phase quantization, and / or on / off keying.

[0055] A particular carrier modulation module 66 XORs each bit of the scrambled signature with a string of 16 binary elements (the "spreading key") to obtain 16 "chips" having "0" and "1" values. If the error correction encoding module 62 obtains a 1024-bit signature (which is then randomized by the randomization module 64), the carrier modulation module 66 generates 16,384 output chips.

[0056] The carrier signal (spreading key) provides additional robustness since it spreads the encoded message symbols across the carrier. As such, the use of a longer carrier signal reduces the need for redundancy and / or repetition codes required for error correction. Thus, error correction codes (including repetition codes) and carrier signals may be used in various combinations to generate tile encoded payload signals that achieve the desired robustness and signal carrying capacity per tile.

[0057] Mapping module 68 maps the signal elements of the encoded payload signal to locations within an image block. These may be spatial locations within an image tile. They may also be spatial frequency locations. In this case, the signal elements are used to modulate frequency domain values ​​(such as magnitude or phase). The resulting frequency domain values ​​are transformed back to the spatial domain to create spatial domain signal tiles.

[0058] An exemplary mapping module 68 includes a distribution table data structure that identifies, for each of the 16,384 output chips referenced above, the particular x and y coordinate locations within the 128×128 message signal tile to which the chip should be mapped. In such a configuration, each chip may serve to increase or decrease the luminance or chrominance at that location in the image depending on its value.

[0059] The mapping module 68 can also map the reference signals to locations within the image blocks that may or may not overlap with the locations to which the payload data is mapped. The encoded payload and reference signals are signal components that are weighted together to form the optical code signal.

[0060] To accurately recover the payload, an optical code reader must be able to extract estimates of the encoded data payload signal elements (e.g., chips) at their locations within the image. This requires the reader to synchronize the image under analysis to determine the location of tiles, and the locations of data elements within the tiles. The locations are located within the two-dimensional blocks that form each tile. A synchronizer determines the rotation, scale, and translation (origin) of each tile.

[0061] The optical code signal may include explicit and / or implicit reference (registration) signals. An explicit reference signal is a separate signal component from the encoded payload that is included together with the encoded payload, e.g., in the same tile. An implicit reference signal is a signal that is formed with the encoded payload and has a structure that facilitates geometric synchronization. Because of its role in geometric synchronization, we sometimes refer to the reference signal as a synchronization signal, a calibration signal, a grid signal, or a registration signal, which are synonymous terms. Examples of explicit and implicit synchronization signals are provided in our U.S. Patent Nos. 6,614,914 and 5,862,260, which are incorporated herein by reference.

[0062] In particular, one example of an explicit synchronization signal is a signal consisting of a set of sine waves with pseudorandom phases that appear as peaks in the Fourier domain of the suspect signal. See, for example, U.S. Patent Nos. 6,590,996 and 6,614,914, and 5,862,260, which describe the use of synchronization signals in conjunction with robust data signals. See also U.S. Patent No. 7,986,807, which is incorporated by reference.

[0063] Our U.S. Publication Nos. 20120078989 and 20170193628, also incorporated by reference, provide further methods for detecting reference signals having this type of structure and determining rotation, scale, and translation. U.S. Publication No. 20170193628 provides further teachings of synchronizing optical code readers and extracting the digital payload with a detection filter, even in the presence of perspective distortion.

[0064] Examples of implicit synchronization signals and their uses are provided in U.S. Patent Nos. 6,614,914, 5,862,260, 6,625,297, 7,072,490, and 9,747,656, which are incorporated by reference.

[0065] (In other embodiments, synchronization is achieved through a structure separate from the tiles, such as a visible crosshair.)

[0066] 7 is a diagram illustrating a portion 70 of an image tile of an optical code component. This portion consists of an array of pixels (e.g., 72), each having a value depicted here as a grayscale value. This portion of the tile has 15×15 pixels. Further examples of tile sizes and dimensions used for optical codes are provided below.

[0067] This component may be used as a reference signal component, an encoded payload component, or a reference signal encoded in the payload. It may also be used as an encoded payload signal placed within a reference signal structure.

[0068] For illustrative purposes, an example is provided in which this portion 70 is a reference signal component. Through this example, illustrated in a later figure, we explain how the reference and payload components are formed, prioritized, and combined to form a high-density optical code signal tile. This state of the optical code is called "high density" because of the intention of using it to generate a transformed version with variable spatial density that is sparser (a sparse code signal with a desired dot density). To achieve the desired dot density, this high-density optical code signal tile is then mapped into a spatial pattern based on the priority of the code signal elements. In this example, the reference signal includes sine waves that are transformed into a spatial domain image, as depicted in FIG. 7. These sine waves form peaks in the spatial frequency domain. A similar effect can be achieved by using a fixed or coded spatial pattern of payload elements with redundancies that also form peaks in the spatial frequency domain.

[0069] 8 is a diagram illustrating a portion 74 of a tile of an encoded payload signal. This portion 74 is an array of pixels (76) where the pixel values ​​are binary, either black or white. These values ​​correspond to the encoded payload signal that is conveyed by modulating each of the binary values ​​of the error correction coded payload onto a carrier (e.g., a PN array) and mapping the resulting modulated carrier signal elements to pixel locations. The result is the encoded payload signal, a portion of which is depicted in FIG. 8.

[0070] FIG. 9 is a diagram of the encoded payload signal 74 of FIG. 8 converted to the spatial resolution of the optical code component of FIG. 7. Before combining with the reference signal, the encoded payload component 74 is spatially scaled to the target resolution at which the optical code is to be inserted into the host image. This target resolution may also be the resolution at which the host image is rendered on the object. In this example, the reference signal is generated at the target resolution for insertion into the host image, and the encoded payload signal is scaled to the same target resolution. This resolution may be, for example, 203 dots per inch for many thermal label printers, or 300 dots per inch or more for other commercial printers. These are merely examples, and the target resolution may vary depending on the application and printing technology used. There are various techniques used for resizing, such as bilinear or cubic interpolation, Lanczos resampling, or the like. This spatial scaling of the encoded payload signal results in an image 76 such as the one shown on the right of FIG. 9, with pixels at the target element-per-inch resolution. The grayscale depiction of the pixels in the 15×15 pixel array of image 76 reflects that the pixels are no longer binarized.

[0071] FIG. 10 is a diagram illustrating the combination of a reference signal component 70 and an encoded payload (message) component 76 to obtain a high density composite code signal 78.

[0072] In this example, the reference signal element 70 is added to the corresponding encoded payload signal element 76 at the target resolution of the rendering system. This requires upsampling the payload components, resulting in some pixel elements of intermediate values, i.e. grey, rather than black or white. (Similarly, the upsampling, performed here by a bicubic interpolation algorithm, results in some overshooting of the signal values, resulting in some values ​​above +1 and below -1.) To prioritize the elements, either the reference component or the payload component is multiplied by a weighting factor representing the relative weighting of the reference signal to the encoded payload signal. In this example, the payload component 76 is weighted by a factor of 0.1253 and summed with the reference component 70 to form a dense composite optical code signal 78. The magnitude of the resulting values ​​establishes the priority of the individual elements of the optical code signal 78.

[0073] 10 shows the component and composite signal values ​​in floating point format. To the right of each of blocks 70, 76, and 78 is a graphical scale showing the corresponding component values.

[0074] FIG. 11 is a diagram of a mapping of a high density composite optical code signal to an output image 80 according to the priority and spatial constraints (e.g., element spacing and signal density) of its optical code elements. In this mapping, the mapping method fills pixel locations of the output image 80 according to the priority of the elements, with the highest priority elements being filled first, followed by the next highest priority elements. In addition, the filling process respects spacing (placement) constraints such as the minimum distance between dots. Both the priority and placement of the components are optimized for a particular dot density using the method described above with reference to FIG. 2. The output of the mapping is a spatial pattern of the optical code, consisting of binarized pixels at the target resolution. The binarized pixels correspond to the dots that are marked on the substrate to apply the optical code to the substrate. It has been found that within the redundantly encoded signal of a high density optical code, the peaks of the high density signal are the most important to retain within the sparse signal to achieve robustness and reliability. There are positive and negative peaks. When these are conveyed in the intensity of the image, these positive and negative peaks correspond to high and low intensity values. The same is true when the optical code is conveyed in color channels, such as the color or chroma components (e.g., CMY) of a color image or spot color. In one approach, the mapping preserves peaks that correspond to dark pixels (low luminance) on a relatively higher luminance substrate. This approach is reflected in Figure 11, where dark pixels (e.g., 82) correspond to negative peaks.

[0075] This technique can be further enhanced by encoding the positive peaks as "holes" formed by the configuration of dark pixels around the relatively higher luminance regions. On higher luminance substrates, holes are created by marking dark pixels around the empty pixels located at the positive peaks. The empty pixels allow the lighter substrate or ink layer to be exposed, so that when imaged, the empty pixels reflect the peak relative to its neighboring pixel values.

[0076] The process of Fig. 2 for optimizing optical code parameters will now be further detailed. Fig. 12 is a diagram illustrating an example of a process for optimizing dot spacing and signal component priority for an optical code at a particular dot density. An additional parameter that may be optimized for a desired dot density is dot size. In this example, dot spacing is represented as dot distance. Priority is represented as the relative priority of the signal components. An example of this priority is the relative weighting of the components described in connection with Fig. 10. These priority and spacing parameters are derived in a training process that generates an optical code at each of several parameter space coordinates of the priority and spacing parameters and inserts it into each test image in a set of test images.

[0077] Figure 12 illustrates plots of the robustness measurements of these test images. The vertical axis is dot distance, which is the minimum distance between dots in the optical code. The horizontal axis is the relative priority of the signal components, specifically the reference components and the encoded payload signal components. The robustness measurements of the test images are shown as circles (e.g., 84), with the robustness measurements ranging from low (black) to high (white) depicted in grayscale values.

[0078] As described in connection with FIG. 2, a robustness prediction program is used to predict the robustness of a test image for a given rendering and scanning process. For further details regarding predicted code detection per unit area, see U.S. Patent No. 9,690,967. In addition, U.S. Provisional Application No. 62 / 628,193, filed February 13, 2018, entitled "METHODS AND ARRANGEMENTS FOR PREDICTING RELIABILITY OF SIGNAL DECODING FROM ARTWORK ON PRINTED PACKAGING," which is attached as Exhibit 1 to Application No. 62 / 634,898, provides further teachings regarding robustness measurements for packaging and labels, referred to as scores. (The cited provisional application was based on U.S. Patent Application No. 15 / 918,924, filed March 12, 2018.) See also co-pending application No. 15 / 154,529, filed May 13, 2016 (now U.S. Patent No. 10,217,182), and co-pending application No. 15 / 918,924, filed March 12, 2018 (published as 20180352111), which are incorporated by reference. These documents detail further methods of calculating detection metrics and using these metrics to predict robustness in response to simulated degradation and scan modes.

[0079] The robustness prediction program produces a robustness measure for the test image that is a composite of the detection measurements it makes in the test image. The insertion process reproduces tiles of the optical code in the test image. This signal reproduction and signal redundancy within the tiles allows the robustness program to calculate detection metrics in image block areas smaller than the signal tiles. These detection metrics, including reference signal correlation and payload recovery metrics, are calculated for each spatial region and summed into a robustness score according to a function that takes into account image capture (e.g., a swipe motion or static presentation of a marked object to a camera). Here, the optical code is compatible with the digital watermark signal technology referenced in U.S. Pat. No. 9,690,967 and Appendix 1 to application Ser. No. 62 / 634,898. This is compatible in the sense that the signal detection of the watermark signals described in these documents also applies to the optical code described herein. The optical code conveys a compatible signal in the form of sparse dots in lighter areas and / or holes in empty or dark areas of the packaging or label design. The process for applying this optical code to a packaging or label design fills an area with the design with optical code elements at the desired dot density.

[0080] Figure 13 is a diagram illustrating the selection of optimal parameters in the example of Figure 12 based on a robustness metric measured from test images. In this example, the optimization method selects a location in parameter space (86) at coordinates of dot distance = 4, relative priority of 0.7, because this location has a robustness measure that exceeds the confidence threshold. In particular, in this example, this location provides the maximum value in the robustness scores measured for the parameter range used in the training process.

[0081] One implementation searches for a location in parameter space that provides optimal robustness. It does this by calculating the location in parameter space that provides maximum robustness for each image in a training set of test images. The parameter space is defined as the space whose coordinates are the values ​​of parameters that vary over the image, such as dot distance, dot size, dot density, and relative priority of signal components. An optimization method then finds the location in parameter space that minimizes the distance to the location of maximum robustness for each of the test images.

[0082] FIG. 14 is a flow diagram illustrating a method for forming elements of an optical code in a spatial region to achieve a desired dot density. The method begins with a high density composite optical code, such as that depicted in FIG. 10 (e.g., 78), with prioritized components. In this example, the priority is specified by the amplitude of the element values ​​in the optical code. The method proceeds to map the elements of the optical code to spatial locations of the output image to achieve a target spatial density. The mapping process prioritizes the formation of the elements of the optical code in the output image based on the amplitude. When placing dark dots in lighter regions, the process proceeds from the darkest element value to the lightest element value in the optical code. Conversely, when forming holes in darker neighboring regions, the process proceeds from the lightest element to the darkest element. Thus, for generalization, the description uses the term maximum (max) to cover both cases, with the view that the maximum value (maxima (abbreviated as max)) may refer to either the darkest or the lightest remaining element value as the process steps through the element values ​​in a priority order determined based on the amplitude.

[0083] In block 90, the mapping method begins by finding a maximum value among the multi-valued pixel values ​​in the dense optical code. An efficient way to perform the priority finding is to sort the pixel values ​​of the optical code by amplitude and then step through in amplitude order. The value being visited in an iteration of the process is called the current maximum in FIG. 14. For the current maximum, the process checks (92) the distance of the location of the current maximum with the closest element previously formed in the output image.

[0084] If this location satisfies the minimum inter-spacing distance (94), the process forms a dot at the location in the output image (96). The dot is placed according to the dot size and shape parameters set for the optical code at the target spatial resolution of the output image. If the location of the current maximum does not satisfy the minimum spacing requirement (94), the method proceeds to the next maximum among the remaining elements in the high density optical code (98) and a dot is not formed at the location of the current maximum. The placement process continues placing dots in this manner until the target spatial density is met.

[0085] The process of creating lighter "holes" in the middle of darker surrounding elements proceeds in a similar manner, except that the maximum value corresponds to the lightest element value of the optical code. Holes are created by setting pixel values ​​at output image locations such that either no ink is applied to the location, or lighter ink is applied relative to the darker ink in the neighboring locations. In some variants, both dots and inverses (holes) are created at spaced locations that satisfy minimum spacing requirements. This has the advantage of increasing signal carrying capacity and signal robustness, since more of the signal of the optical code is retained in the output image.

[0086] 15-22 graphically illustrate this process with a waveform 100 representing a high density optical code in one dimension. In discrete digital form, the high density optical code signal is quantized into levels (e.g., 0-255 for 8-bit values) for a two-dimensional array of pixel locations sampled at a target spatial resolution. Waveform 100 has minimum values ​​102, 104 and maximum values ​​106, 108, 110. Depending on the signaling scheme, the minimum to maximum values ​​range from darkest to lightest or vice versa. For illustrative purposes, an example will be described where the minimum to maximum values ​​range from darkest to lightest.

[0087] Fig. 16 depicts the beginning of the process of forming optical elements in the output image. As noted, the method of Fig. 14 forms elements in order of priority, with priority being conveyed in amplitude. Line 112 moving towards waveform 100 depicts the approach of visiting the elements of the optical code in order of amplitude, starting with the minimum and proceeding upwards. While Fig. 16 shows the optical code waveform in its original spatial configuration, its discrete amplitude values ​​are preferably sorted by amplitude, so that the method proceeds efficiently by stepping through the sorted list.

[0088] In Figure 17, the process finds the darkest element (102). As shown in Figure 18, an optical code element is formed at this location (102), and the minimum spacing depicted in ring 114 is implemented as the method forms further elements of the optical code in the output image. The minimum distance is the minimum distance between the outer edge of dot element 102 and the nearest neighboring dot element formed from the optical code signal.

[0089] FIG. 19 illustrates the placement of two additional elements (116, 118) at a location in the optical code that has the next highest priority and also satisfies the minimum spacing constraint (exemplified by rings 120, 122). As the method proceeds, it visits and forms a dot in the output image at another local minimum location at location 124 as shown in FIG. 20. This example illustrates how the method prioritizes the placement of optical code signal elements in the output image around signal peaks, since these peaks carry signal components that are most important in the robustness and reliability of the optical code. To further illustrate this point, FIG. 21 illustrates the formation of another dot 126 at the next highest priority, which is another dot around the minimum 102 (FIG. 15). The process is complete when the dot density from forming the optical code elements in the output image reaches the desired dot density. Although FIG. 22 illustrates the placement of dots in one dimension, the process applies to the placement of dots in two-dimensional output image tiles.

[0090] For many applications, the output image containing the mapped optical code elements is merged with a host image, which is then printed or otherwise marked on a substrate. Figures 23-24 illustrate an example where this output image is merged with a label design generated from a label template. The label design includes programmable elements such as a brand identifier and logo at the top, as well as text providing product information. The label design also includes dynamically generated information within the scale, such as weight and price.

[0091] There are several strategies for integrating the output image of the optical code (e.g., its "sparse" form at a target spatial density) with a host image, such as a label or packaging design image. In each, tiles of the optical code at the target spatial resolution are replicated in contiguous blocks across the host image and then integrated with the host image. One method for integration is to overlay the optical code image with the host image. For example, dot elements are placed in the host image. Since both the host and the optical code tiles are binary, if either the host or the optical code has a dot, the printer prints a dot. Another method is to do an intelligent overlay where elements of the optical code are formed in the host image while respecting no-go distances from the boundaries of characters of significant text content (such as price and weight). More specifically, dot elements are placed everywhere in the optical code except where it is within a predefined no-go distance from the outer boundaries of significant host image characters or figures (such as conventional barcode lines). (Such no-trespass guard bands around important text and other graphics are detailed in Publication 20170024840, referenced above.)

[0092] Yet another approach is to modulate the host image in place of the optical code elements so that the optical code is prioritized above less important host image information. The optical code is formed, for example, by modulating the host image with dots or holes that correspond to the output image of the optical code signal. Dots are placed to encode the dark elements of the optical code and holes are formed to encode the light elements of the optical code.

[0093] FIG. 23 illustrates an example of a label where the output image of the optical code is tiled and then merged. This is a depiction of a thermally printed label where some of the columns are set to zero, which corresponds to the failure of a printing element in the thermal printer that resulted in the printed label. When a thermal printing element fails, it no longer marks a label along the column of label stock that passes through it. Testing of the present invention reveals that the method of the present invention for optimizing an optical code for a desired spatial density achieves improved robustness against loss of information due to printing element failure.

[0094] 24 illustrates an example of a label design integrated with an optical code where even thicker columns of elements are set to zero (meaning that the dot elements are not printed). Again, in this case the method of the present invention provides improved robustness, allowing the payload to be properly encoded despite image degradation.

[0095] 25 is yet another example where tiles of an optical code are integrated with text. The inventors have tested optical codes integrated with text as shown at various font sizes and found increased robustness across various font sizes. Font size and text density are yet other features that can be included in the test images used to optimize the parameters of the optical code at different spatial densities of the optical code. Prioritization of Data Signal Components

[0096] The conversion of the original high density optical code to the artwork of the host image results in the loss of the data signal of the optical code. This occurs because the conversion removes or distorts parts of the high density data signal tiles as they are converted to a sparser spatial density (lower dot density per tile). In addition, text, graphics, and other image content of the host image into which the output image is inserted may interfere with the optical code. As the sparsity of the graphics elements increases, data signal elements are removed or altered, which reduces robustness. This reduces the capacity of the data channels within a given tile area of ​​the output.

[0097] The incorporation of data signals into artwork also affects the prioritization of signal components within the artwork's data channels. This occurs because the artwork may interfere with signal components differently. In addition, the amount of signal capacity provided for reference signals (e.g., synchronization signals) and payload signals to achieve reliable detection varies with artwork design. Thus, the ratio of signal components must be adapted for the artwork.

[0098] Here, we discuss strategies for prioritizing signal components to counteract loss of robustness. Figure 26 is a diagram illustrating a method for weighting elements of a data signal before using it to generate artwork that optimally carries the data signal. An optical code signal generator generates signal components. These include components (130) that carry a subset of payload bits and components (132) that provide reference signals (e.g., synchronization signals). In block 134, the optical code signal generator weights the components according to their priority. This priority is then used in the artwork generation to control which of the data signal elements are retained.

[0099] In one approach for adapting a host image to carry tiles of optical code signals, a process for inserting optical code signals into a host image is performed with different weightings and insertion strategies for payload and reference components for candidate artwork designs. This results in several variants of artwork carrying data signals. Further permutations of each variant are then generated by distorting the artwork according to image shifts, rotation angles, decreasing and expanding spatial scales, noise addition, blurring, and simulation of print element failures. A robustness measure based on both correlation with a reference signal for synchronization and correlation with a message signal is calculated and stored for each artwork variant. In addition, an optical code reader is run on each variant to determine whether it successfully decodes the payload. Then, component weightings and robustness metric thresholds are derived by analyzing the distribution ratios of components that result in successful payload decoding. This distribution illustrates which ratios and robustness metric values ​​are required to result in reliable detection. These ratios and robustness metrics are then used for the candidate artwork designs and the signal encoding methods in the automatic data encoding program.

[0100] Another approach optimizes the data signal in sparse artwork. To accommodate sparse artwork, the data signal is also sparse and structured to match the sparse artwork. The sparse data signal can be binary (0, 1), ternary (-1, 0, 1), or other coarse quantization. Sparse signals are typically low density, i.e., less than 50% ink or less than 50% space. Such signals have maximum robustness at 50%, so any optimal sparse algorithm should be increasingly robust as the ink / space density moves towards 50%.

[0101] Sparse signals maintain robustness by using thresholds to create binary or ternary signals. These binary or ternary signals ensure that the detection filter returns maxima at the desired signal locations. Between sparse locations in the artwork, the detection filter outputs a Gaussian distribution between the maximum negative and positive outputs due to random noise introduced by the image capture (specifically scanner or camera noise). The Gaussian width depends on factors such as the amount of blurring included in the image capture process.

[0102] During the optimization of sparse signals, a small amount of filtered noise is added to account for the fact that the detection filter creates non-zero values ​​everywhere due to noise of the image capture device. The optimization parameters of sparse signals include weighting of the reference signal relative to the payload signal, element placement rules (e.g., minimum element spacing), and thresholds. For binary signals, there is a single threshold: a negative threshold for low ink density <50% and a positive threshold for high ink density >50%. For ternary signals, there are double positive and negative thresholds. The robustness goal is the same for dense and sparse signals. Specifically, it is the detection robustness in the target workflow environment, which is modeled by distortions to the encoded artwork. Data signal component selection: filtering considerations.

[0103] Prior to decoding, the image captured from the marked object may be processed by a predictive nonlinear multi-axis filter. U.S. Patent No. 7,076,082, incorporated by reference, details such a filter, called an "8-axis" filter. An exemplary form of 8-axis filtering compares a subject image sample with its eight surrounding neighborhoods to provide eight comparison values ​​(e.g., +1 for positive differences, -1 for negative differences, 0 for equality), which are then summed. The filter output thus indicates how different the subject pixel is from its neighborhood. Different configurations and weights of the neighborhoods may be applied to shape the filter according to different functions. (Another filter variant is a cross filter, where the sample of interest is compared to the average of horizontal and vertical neighborhoods, which are then similarly summed.) Such filtering tends to emphasize the added code signal by attenuating the underlying artwork image to which the code signal is added.

[0104] According to a further aspect of the present technique, this expected filtering behavior is taken into account when selecting data signal components to be included in the printed sparse marks.

[0105] Figure 27 shows an excerpt of a composite signal resulting from combining a reference signal at the target resolution with an upsampled payload signal in a desired ratio, as described above in connection with Figure 10. The numbers indicate pixel values ​​ranging from 0, which is pure black, to 255, which is pure white. To generate a sparse signal, an illustrative embodiment sorts this signal by pixel magnitude and identifies starred pixels as places to place black dots in the output frame because they are the darkest places while also satisfying placement (e.g., spacing) constraints.

[0106] However, such an approach ignores the signaling potential of light pixels, which have no contribution to the decoding of sparse marks unless they are close to printed dark pixels. For an 8-axis, cross, or other nonlinear filter to distinguish these light tones, they must be in the presence of darker pixels such that the filter indicates their relative brightness. Otherwise, the filter will produce an unclear output (e.g., values ​​with a Gaussian distribution centered near zero).

[0107] To give the brighter pixels a role in conveying the code signal component, it is better to choose darker pixels for copying to the output frame that cause adjacent bright pixels to be similarly evaluated for their information. Thus, choosing one dark pixel may yield two, three, or more pixels' worth of information.

[0108] To illustrate, consider the starred dark pixel in Figure 28. If the starred pixel is copied to the output frame as a dark dot, then all of the circled brighter pixels also contribute to the decoded information in the detector. Data is provided from five pixels by copying only one dark pixel to the output frame.

[0109] That is, the starred mark that is copied into the output frame has a value of 0 (i.e., black). Each of the eight surrounding pixels will not be printed and will therefore have a very high pixel value in the captured image, close to 255. This is shown by inset A. Because the central pixel has a lower value than each of its eight neighbors, this results in a strong output from the 8-axis filter: -8, as shown in inset B.

[0110] Now consider the leftmost pixel from FIG. 28 with the bright "192" circled. This pixel and all its neighbors except the one with the star are not printed. (Recall that only the starred dark pixel produces a dark dot in the output print.) The neighborhood centered on this bright "192" pixel as depicted in the captured image is therefore shown in inset C. 8-axis processing produces an output for this "192" pixel as shown in inset D, due to the presence of the neighboring dark pixel. (Although the 8-axis signal is weak at +1, it is nevertheless a signal and makes a significant decoding difference across thousands of such pixels in the captured image.)

[0111] Similarly, each of the circled pixels in Figure 28 - none of which are printed - contributes some information to the decoder because the starred dark pixels nearby cause the prediction filter to produce a non-zero output signal, and of course the dark pixels also contribute information.

[0112] A simple selection of just the darkest pixel will sometimes result in choosing a dark pixel that has the effect of allowing signals from neighboring bright pixels to contribute information to the decoder, but that is merely by chance, not by strategy.

[0113] In fact, simply picking the darkest pixel will often result in the decoder misleading the decoder into thinking that the surrounding pixels are all light-colored (they won't be printed after all). This can mislead the decoder into thinking that the message signal, plus the weighted reference signal, has a high pixel value at such a point. If the surrounding pixels are actually dark (e.g., have a pixel value less than 128), this is simply wrong information.

[0114] To illustrate, consider the lower starred dark pixel in Figure 27. When copied to an output frame, printed, and then imaged, this will cause the predictive filter to think that all eight of its surrounding pixels are relatively bright. While true in a relative sense, this will mislead the detector as to the inclusion of these surrounding pixels. Four are mid-grey and the other four are various shades of dark. These latter four pixels, when predictively filtered, will convey information associated with bright pixels when in fact they are dark pixels, misleading the detector.

[0115] Therefore, in choosing dark pixels from Figure 27 (or Figure 10) to copy into the output frame as dark dots, it is best to choose pixels that are dark and are surrounded by a large number of truly light colored pixels. That way, the non-printing pixels surrounding the dark spot in the output frame will contribute the right information without cluttering it up and will be properly understood by the decoder.

[0116] Such a strategy may be implemented by applying a predictive nonlinear filter to the composite weighted gridded message signal that is likely to be used for decoding. The dark pixels with the highest 8-axis filter scores are those that are surrounded by the brightest set of neighboring pixels. Selecting these dark pixels for the output frame helps provide the most correct message and reference signal information per dark pixel copied.

[0117] Experimentation can determine the relative prioritization between these two criteria for selecting dark pixels to copy to the output frame: (a) the darkness of the candidate pixel, and (b) the value resulting from application of the filter function to the candidate pixel in the composite high density code signal. Such experimentation can reveal whether a dark pixel with a value of 10 and an 8-axis filter value of -7, or a dark pixel with a value of 30 and an 8-axis filter value of -8, is better to copy. The factor "k", optionally together with two exponents "u" and "v", has been found to indicate the relationship between the two factors so that scores can be evaluated for different {pixel value / filter value} pairs.

[0118] That is, a score (priority) S may be calculated for a pixel value P and its corresponding filter value F as follows: S=P u +kF v

[0119] Such a score may be determined for each dark pixel in the weighted grid message signal (i.e., for each pixel having a value less than 128) and the results ranked. In this particular function, the smallest score is best. Pixels may then be selected based on their position in the ranked list, subject to inter-pixel placement (spacing) constraints.

[0120] With such an approach, dark pixel selection is not simply based on inter-pixel spacing, but also on information efficiency considerations.

[0121] The flow charts of Figures 29, 30, 31 and 32 illustrate aspects of the configurations described above. In Figure 32, blocks 323a-323c define specific algorithmic operations by which the function of block 323 may be accomplished. Blocks 323aa-323cc define other algorithms by which the function of block 323 may be implemented. Selecting Data Signal Components: Payload Considerations

[0122] Codes of the type detailed herein typically convey a multiple bit payload (e.g., 20-100 bits). Each pixel in the composite signal frame of FIG. 10 (and FIG. 27) serves to signal the value of one of the payload bits. The payload bits are redundantly coded across the output signal tile such that each payload bit is typically represented by 4-60 dark dots in the output frame. These redundant bits are desirably spatially spread so that the complete payload can be recovered from an image depicting only a small portion of the output signal tile (e.g., a quarter of the tile).

[0123] Bright pixels in the output signal frame can also help signal the values ​​of payload bits, provided that such bright pixels are adjacent to dark pixels and are correctly interpreted by the decoder, as discussed in the previous section.

[0124] In accordance with further aspects of the present technology, when selecting dark pixels for copying to the output frame, consideration is given to understanding which dark pixels in the composite frame correspond to which bits of the payload. Similarly, consideration is given to understanding which adjacent light pixels in the composite frame correspond to which bits of the payload. Both considerations aim to ensure that each of the payload bits is represented with approximately the same intensity in the output signal frame, preferably on a subtile-by-subtile basis.

[0125] In particular, the output signal tile may be divided into four square subtiles, and then a tally is kept of how many times each message bit is represented by dark pixels and by light pixels within each subtile to obtain an aggregate intensity per bit for each payload bit within each subtile.

[0126] Because bright pixels generate only a small 8-axis output signal, their bit encoding may be weighted as contributing only a small fraction (e.g., one-eighth) of the output signal intensity contributed by a dark pixel encoding that same bit. That is, a dark dot may be considered to represent a payload bit having an intensity of "1," while adjacent bright pixels represent their respective payload bits with an intensity of 0.125. (However, for reasons discussed above, it may be the case that not all eight adjacent bright pixels correctly represent a payload bit.)

[0127] In one particular embodiment, the target signal strength per bit is determined, for example, as follows: If an output tile has, for example, 840 dark dots, each dark dot representing one bit with an intensity of "1" and, for example, five other bits with an intensity of 0.125 (due to surrounding white pixels that correctly encode the bits), the 840 dark dots can represent 840 payload bits at intensity 1 and 4200 payload bits with intensity 0.125. If there are 40 payload bits, each can be represented by 21 dark dots and 105 light dots. Thus, each bit is represented with a total "intensity" of 21 + (105 * 0.125), or approximately 34. Thus, each subtile can represent each payload bit with a total intensity of approximately 8. This is the target value that governs the copying of dark pixels to the output frame.

[0128] In particular, a ranked list of dark pixel candidates for copying to the output tile is generated, as detailed in the previous chapter. These dark pixel candidates are copied to the output tile in ranked order, subject to dot placement (e.g., spacing) constraints. The intensity tally of each payload bit in each subtile is tracked simultaneously (taking into account both dark pixels and adjacent light pixels). The aggregate intensity of any bit in any subtile first reaches a target value of 8, and then copying of candidate dark pixels to that subtile proceeds more judiciously.

[0129] In particular, if the next candidate dark pixel in the ranking list yields an aggregate intensity of a particular bit in the subtile that is more than 110% of the target intensity (i.e., up to 8.8 in this example), it is skipped, and consideration moves to the next candidate dark pixel in the ranking list.

[0130] With such an approach, dark pixel selection is not only based on dot placement and information efficiency considerations, but it is also based on an approximately uniform distribution of signal energy across different subtiles and across different bits of the code payload.

[0131] (The arrangement just detailed could of course be applied in other ways, e.g., to a ranked list of candidate dark pixels identified simply by a simple approach of ranking by pixel value, subject to placement constraints.)

[0132] The flow charts of Figures 33 and 33A illustrate some aspects of the foregoing. Blocks 331 and 332 define the method at a high level. Block 331 may be implemented by creating a high density code as detailed elsewhere herein, or by simply reading the code from a memory in which it was previously stored. Note that this code may be the payload code alone, which does not have to include a reference signal component.

[0133] Elements 332a-332i define the particular algorithmic operations by which the function of block 332 may be accomplished. Figure 33a further defines the algorithmic operations associated with block 332g.

[0134] In essence, this aspect of the technology seeks to represent each payload bit substantially equally in terms of intensity within the sparse output code, where substantially, as used in this manner, means within 10%, 20%, or 50% of the average intensity value of all payload bits. Varying the amplitude of reference signal components to promote signal robustness

[0135] This specification teaches various methods to increase the information efficiency and reliability of sparse signal coding, all underlying the idea that black marks in the output signal frame are valuable, and each should be exploited in a manner that optimizes some aspect of the signaling.

[0136] A limitation on the amount of information that can be conveyed by sparse marking (or the robustness with which it can be conveyed) is, for example, the density of dots in the empty areas and background of the label that is acceptable to consumers. Such labels are commonly applied to food products, and the consumer perception of a label being "dirty" is antithetical to the food market. This aesthetic consideration acts as a permanent constraint on the sparse marking of such labels.

[0137] Applicants have found that consumers will tolerate a greater density of dots on a label if the aesthetics of the marking are improved: if the dots can have a structured, non-random pattern appearance, they are less considered "smudges" and more considered "artistic" and more of them can be printed.

[0138] In the prior art, the reference signal consisted of multiple sine waves of different spatial frequencies and (optionally) different phases, but of uniform amplitude. The applicant has surprisingly found that the individual spectral components of the reference signal can be varied in amplitude without significant impairment to detectability. By varying the amplitude of different components of the reference signal, different visual patterns can be generated in a sparse pattern.

[0139] Fig. 34 shows the user interface (UI) of the software tool, by which the visual appearance of the sparse marking can be adjusted. In the center of Fig. 34 is a rendering of the currently designed sparse mark. The depicted sparse mark has a random aspect because all sliders (top right and top left) are in their leftmost positions.

[0140] To adjust the visual appearance of the sparse marks, the user manipulates these slider bars, each controlling the amplitude of a different one (or more) of the sine waves that together define the reference signal.

[0141] At the leftmost position of the slider, the corresponding sinusoidal signal is combined with a reference signal that has a weight (amplitude) of 1. As the slider is moved to the right, the weights of the component signals are increased, providing a range that varies from 1 to 50. (In different embodiments, a range that extends to zero may be used, but applicants prefer that all reference signal components have non-zero amplitudes.) As the slider is moved, the rendering of the sparse marks in the center of FIG. 34 changes accordingly.

[0142] The bottom left buttons allow the designer to select between different additional actions, e.g., applying different ones of the strategies detailed herein for combining reference and payload signal components, and for selecting pixel locations from the composite mark for use in the output signal tile.

[0143] Gauges at the bottom center of the UI indicate the strength of the reference and message signals, the same being generated by a model of the scanning and decoding process (as detailed, for example, in previously cited pending application Ser. No. 15 / 918,924, filed Mar. 12, 2018, the disclosure of which is incorporated herein by reference).

[0144] To implement the illustrated GUI, applicants used the popular GUI Development Environment (GUIDE) of the Matlab software suite.

[0145] Some reference signals contain sinusoidal components with spatial frequencies too high for humans to perceive under normal viewing conditions due to human contrast sensitivity features (e.g., 18-inch distance at 85 foot-candles illuminance). Sliders are typically not provided for such higher frequency components since their amplitude does not noticeably affect the visible pattern. Rather, controls are provided only for the lower frequency reference signal components whose spatial frequencies are perceptible to humans. (A median amplitude value of the lower frequency sinusoids may be determined and the amplitudes of these higher frequency sinusoids may be set to this median value.)

[0146] FIG. 35 shows a flow chart detailing aspects of this portion of the technology.

[0147] Figures 36 and 36A (showing a magnified excerpt from the upper left corner of Figure 36) show an exemplary sparse mark resulting from non-uniform sinusoidal amplitudes. As can be seen, the pattern is no longer purely random, but has a diagonal patterning, similar to a herringbone weave. Instead of being perceived as "messy," such an array of dots is perceived as a textured background pattern that often serves to contribute to rather than detract from the aesthetics of the label.

[0148] The non-randomness of the markings in Fig. 36 can be quantified by counting the number of dots in adjacent regions of equal size. For example, square region 361 in Fig. 36A contains 13 dots. Adjacent square region 362 contains only one.

[0149] Similarly, rectangular region 363 in Figure 36A contains 15 dots, while adjacent region 364 of the same size contains only three.

[0150] In general, a sparse pattern can be considered to avoid the appearance of randomness if a first rectangular region in the pattern contains a number A of dots and a second adjacent rectangular region contains a number B of dots, where A is at least 10 and A is at least 200% of B (often A is 400% or 800% of most B, and sometimes B is zero). These rectangular regions may be square or have one side longer than the other (e.g., at least three times longer, such as regions 363 and 364).

[0151] In many cases, the resulting sparse structure exhibits a diagonal effect, i.e., the long sides of multiple rectangles 365, 366, and 367, sized and positioned to contain a maximum number of dots in a minimum area, are parallel to each other and not to any edge of the substrate to which the markings are applied. In many cases, the diagonal effect is a mirror image about a central axis, resulting in a similarly dense grouping of marks aligned within the mirror-oriented rectangles, as exemplified by rectangles 368 and 369 in FIG.

[0152] The histogram function in Adobe Photoshop® allows the average pixel value of a region of the image to be found, which in the Figure 36A excerpt is 243.49, indicating that a total of 4.5% of the region will be printed in black.

[0153] FIG. 37 depicts an excerpt of a thermally printed adhesive label including such a background marking. As can be seen, the marking is decorative rather than a stain. Moreover, the marking redundantly and robustly conveys a payload representing not only the GTIN identifier of the item, but also its weight, its price, and its sell-by date (approximately twice as much information as the UPC-A barcode with which food products are typically marked). If any portion of the label is damaged, the complete information can nevertheless be recovered.

[0154] The Figure 37 label includes an explicit boundary (a "keep-out zone" or "guard band") several unprinted dots in width around each of the text character strokes. With this strategy, the patterning does not impair the readability of the text.

[0155] A random pattern (such as the one shown in Figure 34) would have to be much lighter in color, often twice as light (half as dark), to be as non-objectionable to shoppers as the pattern shown in Figure 37. Even then, most consumers prefer structured patterns.

[0156] It should be appreciated that the signals illustrated in Figures 34, 36, 36A, and 37 include both a payload component and a reference signal component. The two components may be combined in any of the manners detailed herein. Adjustments to the structured appearance are achieved by adjusting the reference signal component.

[0157] By using reference signals consisting of sine waves not only of different spatial frequencies but also of different amplitudes, information can be conveyed with a greater signal-to-noise ratio (i.e., greater ink density) than is commercially practical otherwise. Structured patterns with ink coverage greater than 10% can be used on text labels with good consumer acceptance. Data Signal Mapping

[0158] 38 is a diagram illustrating a method of mapping data signal elements to locations within a host image artwork. In this embodiment, optimized data signal components 136 from the signal generation discussed above are mapped to host image artwork locations 138. In a processing module 140, graphic elements are generated and / or adapted at the artwork locations.

[0159] Applying the method of FIG. 6, the payload is formatted into a binary string, which is encoded and mapped to tile locations. For illustrative purposes, an implementation of an N×M array of bit cells is described. The parameters N and M are integers, and a tile consists of an N×M array of bit cells. The size of the tile is configurable and depends on the application requirements, such as payload capacity per unit area, robustness, and visibility. Payload capacity increases per unit area with an increase in bit cells per unit area. This additional capacity can be used to improve robustness by redundantly encoding the payload in multiple bit cells. Visibility tends to decrease with higher spatial resolution (higher spatial density of bit cells) because the HVS is less sensitive to changes at higher spatial frequencies. Examples of bit cell array sizes include 64×64, 128×128, 256×256, and 512×512. Each of these is square and has dimensions that are a power of two, but tiles need not be so restricted. Bit cells correspond to spatial locations within the tile. In particular, the spatial locations correspond to pixel samples at a configurable spatial resolution, such as 75-600 DPI. The payload is repeated within successive tiles of the host image artwork. An instance of the payload is encoded within each tile, occupying a block of the artwork with a size that depends on the number of bit cells per tile and the spatial resolution. The tiles are redundantly encoded within several successive tiles to provide additional robustness as the detector accumulates signal estimates of the payload across the tiles. Additionally, the entire payload may be extracted from a portion of the tile in a configuration that is redundantly encoded within the subtile region.

[0160] Some examples help illustrate these parameters of tiles. The spatial resolution of bit cells in a tile can be expressed in terms of cells per inch (CPI). This notation provides a convenient way of spatially relating bit cells to pixels in an image that are typically expressed in terms of dots per inch (DPI). Take for example a bit cell resolution of 75 CPI. When a tile is encoded into an image with a pixel resolution of 300 DPI, each bit cell corresponds to a 4x4 array of pixels in a 300 DPI image. As another example, each bit cell at 150 CPI corresponds to an area of ​​2x2 pixels in a 300 DPI image and an area of ​​4x4 pixels in a 600 DPI image. Now, when considering tile size in terms of NxM bit cells and setting the size of the bit cells, the tile size can be expressed by multiplying the bit cell dimensions by the number of bit cells per horizontal and vertical dimension of the tile. Below is a table of example tile sizes in inches for different CPIs and the number of bit cells in one dimension N. In this case, a tile is a square array of NxN bit cells. [Table 1]

[0161] These examples illustrate that tile size varies with bit cells per tile and the spatial resolution of the bit cells. These are not intended to be limiting, as developers may select tile parameters based on application needs with respect to data capacity, robustness, and visibility.

[0162] There are several alternatives for the mapping function to map the encoded payload to bit cell locations within the tile. In one approach, the prioritized signal components from the optimization process above are mapped to locations within the tile. In another, they are mapped to a bit cell pattern of differentially encoded bit cells as described in the above-incorporated U.S. Patent No. 9,747,656. In the latter case, the tile size may be increased to accommodate the differential encoding of each encoded bit within the pattern of differentially encoded bit cells, where the bit cells correspond to embedding locations at the target resolution (e.g., 300 DPI).

[0163] For explicit synchronization signal components, the mapping function maps a discrete digital image of the synchronization signal to the host image blocks. For example, if the synchronization signal includes a set of Fourier magnitude peaks or sinusoids with pseudorandom phase, the synchronization signal is generated in the spatial domain with a block size coextensive with the tile. This signal component is weighted according to its priority relative to the payload components in the optimization process described above.

[0164] In some cases, it is necessary to accommodate the difference between the spatial resolution of the optical code elements and the spatial resolution of the printing or other rendering process. One approach, as exemplified above, is to generate the optical code signal at the target output resolution of the rendering process.

[0165] Another approach is to adapt or shape the sparse optical code signal elements to convert the optical code resolution to the output resolution. Consider the case where the rendering device is a thermal printer with a spatial resolution of 203 DPI for label printing. FIG. 39 shows an example of how different optical code resolutions are adapted for an output resolution of 203 DPI. In this example, the general term CPI introduced above is expressed as Waxels Per Inch (WPI), and the bit cells are referred to as "waxels". At the far left, the optical code resolution of 203 WPI is a one-to-one mapping to the output resolution of a thermal printer of 203 DPI. In the next case, an optical code resolution of approximately 101 WPI is obtained by mapping the dots in the bit cells of the optical code to one of the 2×2 pixel locations at the corresponding location in the output image at 203 DPI. In the next example, an optical code resolution of approximately 68 WPI is achieved by mapping the dots in the bit cells of the optical code to the center of the corresponding 3×3 pixel area in the output image at 203 DPI. The right-most example shows approximating a 51 WPI optical code resolution in an output image at 203 DPI.

[0166] The dot size of the optical code element is another variable that can be optimized in the process. In implementations, the dot size is varied by constructing the dots in the output image from a 2×2 or larger cluster of dots. For example, in this case, the dot size is expressed as the width of the dot in the output image at the output image DPI.

[0167] FIG. 40 illustrates dot pattern variations to achieve improved visual quality and robustness. In addition to varying the dot size, the configuration of the dots can be altered to improve visual quality or robustness. The dot size of the dot configuration on the left is size 2, meaning that it consists of a 2×2 cluster of dots at the output resolution of the optical code. The desired spatial resolution can be obtained with better visual quality by varying the configuration as a function of spatial position within the tile. For example, the dot clusters in the center and right of FIG. 40 encode the same optical code element as the 2×2 cluster on the left, but do so with a different dot cluster configuration that provides higher visual quality. In addition, this variation achieves similar robustness even if a thermal printing element fails, because at least a portion of the dot cluster remains in the event of a failure of a printing element that prints one of the rows of dots that pass through the dot cluster. Additional Disclosures

[0168] With reference to Figures 41, 42, 32, 44A, 44B, 45, and 46, the following discussion further elaborates on one particular embodiment 420 of the configuration previously described.

[0169] As in the arrangement of Fig. 5, two signal components, payload and reference, are first determined; one will be used to modulate the other. However, rather than modulating the phase of the reference signal component (or on / off keying such component), embodiment 420 identifies the locations of local extrema in the spatial domain reference signal and forms marks (dots) at such locations in the output signal block according to the values ​​of the spatially corresponding elements of the payload signal.

[0170] Figure 43 illustrates an excerpt 431 of an encoded payload component block 432 (which may also be referred to as a message data array). This portion consists of an array of signal elements, each drawn from two potential values ​​(e.g., {0, 1}, {-1, 1}, or {black, white}). While the depicted excerpt spans an area of ​​just 5x5 elements, a complete payload component block is typically much larger, for example having 16, 32, 64, 128, or 256 elements (e.g., pixels) on a side. A payload component block is usually square, but need not be. More generally, it may be considered to have dimensions of IxJ signal elements.

[0171] FIG. 43 also shows an excerpt 433 of a reference signal block 434 (sometimes called a spatial registration data array). This block contains a 2D array of real numbers, here ranging from 0 to 1. As mentioned earlier, the reference signal may contain a sum of multiple sinusoidal components of different frequencies, which may have different phases. The illustrated numbers are determined by summing these spatial sinusoidal components at regularly spaced points across the reference signal block 434. If the waves interfere destructively (producing a valley), the sum will be smaller and closer to zero. If the sinusoids interfere constructively (producing a peak), the sum will be larger and closer to one.

[0172] (It should be appreciated that reference signal block excerpt 433 is similar to excerpt 72 shown in FIG. 7. However, in FIG. 7, the reference signal is comprised of values ​​ranging from 0 to 255, quantified to integer values ​​to produce the depicted grayscale representation. Dark pixels in FIG. 7 are represented in FIG. 43 by real numbers closer to zero, and light pixels are represented by real numbers closer to one.)

[0173] Again, the reference signal block 434 is typically, but need not be, square. More generally, it may be considered to have dimensions of M by N elements, where M is typically greater than the I dimension of the payload component block 432 and N is typically greater than the J dimension of the payload component block.

[0174] Because the reference signal block herein uses non-integer data, its element values ​​may be stored as floating point data in the memory of a computer system implementing the detailed method.

[0175] Finally, corresponding spatial portions of payload component block 432 and reference signal block 434 are processed together to generate a spatial portion of output signal block 435. The spatial correspondence between portions of the payload component block and portions of the reference signal block may be viewed as a mapping, where each element of the payload component block maps to a location in the reference signal block. In the example of Figure 43, each element of the payload component block maps to nine elements in the reference signal block, as indicated by the dashed lines connecting excerpts 431 and 433 (and by the bold lines in excerpt 433 that bound the 3x3 region of elements). In the detailed embodiment, the output signal block is of the same dimensions as the reference signal block, i.e., MxN elements.

[0176] In an exemplary embodiment, the payload component blocks are 128x128 elements (ie, I=J=128) and the reference signal blocks (and output signal blocks) are 384x384 elements (ie, M=N=384).

[0177] According to a particular embodiment, each dark element in the output signal block 435 results from a corresponding dark element in the payload component block 432. For example, dark signal element 437a in the output signal block results from dark signal element 437b in the payload component block.

[0178] More specifically, for each of the multiple dark signal elements 437b in the payload component block, this particular method performs the following operations. (a) Determining the location within an M×N registered data array to which a dark signal element within a payload component block corresponds spatially. (b) identifying K neighboring elements within the M×N registration data array that are closest to the determined location, where K≧4 (eg, K=9); (c) Identifying which of these K elements in the reference signal block has an extreme value (eg, a minimum value). (d) identifying, from among these K(9) neighboring locations within the 384×384 element reference signal block, the first location in which an extremum is located (and conversely, identifying the other eight locations as locations in which no extremum is located). (e) in the 384 x 384 element output block, setting the element in the identified first position to one value (e.g., dark) and setting the elements in eight other second positions to a different value (e.g., light).

[0179] In a preferred embodiment, these operations are performed on all dark elements in the payload component block, so that the number of dark elements in the 128×128 payload component block 432 is the same as the number of dark elements in the 384×384 element output block 435. However, in other embodiments, a subset of the dark elements in a payload component block may be so processed, resulting in fewer dark elements in the output block than in the payload component block.

[0180] The process just detailed produces a 2D output code that represents both the message data and the reference signal data. These two components are represented in a convenient proportion to the message data. This makes the resulting output code particularly suitable for printing on merchandise that has other structures that can assist in establishing spatial registration, such as physical edges or printed borders that are parallel to the edges of the output signal block that can act as references to help establish the rotation and translation of the output signal block, as well as overt patterns (e.g., logos or text) where the scale in the captured image can be used to help estimate the scale of the output signal block.

[0181] In a particularly preferred embodiment, the I×J (e.g., 128×128) message data (payload) array includes an equal number of elements having first and second values. For example, there may be 8192 dark elements and 8192 light elements. In such an embodiment, operations (a)-(e) detailed above are performed for each of the 8192 dark elements.

[0182] Because half of the elements in the message array are light, half of the element's 3x3 neighborhood in the output code is also light. For the other 3x3 neighborhoods in the output code, each has 1 dark element out of 9. So overall, 1 in 8 elements in the output code are dark (and 17 in 18 are light).

[0183] In other embodiments, the light and dark elements in the message data array are essentially equal or nearly equal in number ("essentially" equal as used herein means within 5% and "nearly" equal means within 20%).

[0184] In Figure 43, there is an integer relationship between the dimensions of the message data array 432, the reference signal tiles 434, and the output signal tiles. In particular, each element in the message data array corresponds to nine elements in both the reference signal tiles and the output signal tiles.

[0185] Of course, other integer relationships may be used, for example each element in the message data array may correspond to 4 elements, or 25 elements in both the reference signal tile and the output signal tile, etc.

[0186] In still other embodiments, non-integer relationships may be used, i.e., M need not be an integer multiple of I (nor N needn't be an integer multiple of J).

[0187] Figures 44A and 44B show such an embodiment. M is 2.4 times I (and N is 2.4 times J). Thus, each element in the message signal array corresponds spatially to 5.76 elements in both the reference signal tile and the output signal tile. This spatial correspondence is indicated by the "+" marking in the center of each element in the message signal array 432 and its mapping to a corresponding location in the reference signal tile 434. A dashed box 441 encloses the area of ​​an element in the reference signal tile that corresponds to a single element in the message signal array.

[0188] In such an embodiment, the extreme value (through operation (b) above) is obtained from a 2×2 set of neighboring element values ​​in the reference signal tile. One of these four elements is the element into which the mapped "+" sign falls. The others are the three elements closest to the "+" sign. A set of four elements 442 and the extreme value (minimum value 443) from such set are labeled in FIG. 44B. (The values ​​of the reference signal elements in FIG. 44B are obtained from the upper left portion of the corresponding reference signal elements in FIG. 43.)

[0189] Output signal tile 435a is obtained by applying operations (a)-(e) for each of the dark elements in message signal array 432 of Figure 44B. As before, each dark element in output signal tile 435a (e.g., 447a) has a counterpart dark element in message tile array 432 (e.g., 437b).

[0190] Figure 45 compares a portion (436) of an output signal tile 435 produced from the configuration of Figure 43 (mapping each message signal element to 9 elements from the reference signal array) with a corresponding portion (436a) of an output signal tile 435a produced from the configuration of Figure 44B (mapping each message signal element to 5.76 elements from the reference signal array). Each dark element in one portion has a counterpart in the other. However, because there are more elements in portion 436, it is printed at a lighter density (1 / 18 times less, or 5.55%) than portion 436a (which is printed at 1 / (2*5.76) or 8.68% density).

[0191] The density of dots in the printed output can therefore be varied by changing the ratio of the number of elements in the message signal array and the reference signal array. Conventionally, the message signal array is of a fixed size (e.g., 64x64 elements, or 128x128 elements). In contrast, the reference signal tile can be set to any size simply by adjusting the interval at which the continuous function of which it is composed (e.g., a sine wave) is sampled. If all arrays are square (I=J and M=N), the print density (shade) can be determined by the following equation: PrintDensity=1 / (2*(M / I) Λ 2) If the M / I ratio can be set arbitrarily, the print density can be adjusted to any desired value by the following equation: M / I=SQRT(1 / (2*PrintDensity)) Thus, if the message signal array is 128 by 128 elements and a print density of 5% is desired, the continuous reference signal must be sampled to produce an array of 405 by 405 elements. If a print density of 10% is desired, the reference signal must be sampled to produce an array of 202 by 202 elements, and so on.

[0192] In addition, there is the problem of mapping the signal tile to the printing environment, which may impose some constraints on the implementation. As mentioned, a printer for adhesive labels may use a linear array of thermal elements spaced at a density of 203 dots per inch (dpi). One approach is to choose the desired number of W code elements (waxels) per inch for the message array. The complete message tile then measures, for example, 128 / W inches on a side (if the message tile is a 128x128 waxel). A prime number such as 89 may be used for W. In this case, the complete message tile measures 128 / 89, or 1.438 inches on a side. At 203 dpi, this requires (1.438 inches * 203 dots / inch) = 292 dots on a side of the output tile. The reference signal may be sampled to generate a 292x292 array onto which the 128x128 message array is mapped. The center of each element in the message array is then mapped to a point in the reference signal array, as shown in Figure 44B. The values ​​of the four closest elements in the reference signal array are examined to identify the minimum value, and then the corresponding location in the output signal tile is marked, as described above and shown in Figure 44B.

[0193] In the example just given, M / I=292 / 128, so the print density is 9.6%.

[0194] Comparing the two output signal excerpts in Figure 45, it can be seen that the location of the dark elements is relatively shifted within output signal portion 436a versus output signal portion 436. For example, dark elements 437a and 447a both correspond to the same element in the message signal array, but one is at the boundary of the output signal excerpt and the other is not. This is because this element of the message signal array is mapped to a different region of the reference signal array due to the different scale of the mapping.

[0195] Exemplary matlab code for implementing the algorithm detailed above is detailed in FIG.

[0196] As shown, the present technology can be used to print adhesive labels for application to supermarket products (e.g., bakery, deli, butcher, etc.). Such labels are characterized by straight vertical edges. They often contain generally printed straight lines, either as boundaries or graphic features separating different pieces of printed information. They also typically contain one or more lines of printed text. All of these printed features consist of closely spaced black dots printed in regularly spaced rows and columns (e.g., 203 rows / columns spaced up to an inch apart). Due to their regular arrangement, such printings exhibit characteristic properties in the spatial frequency domain that are evident if an image is captured depicting the printed label (the "query image"), and such image data is transformed by a Fast Fourier Transform.

[0197] The spatial frequency data resulting from such an FFT applied to the query image ("query FFT data") can be compared to a template of reference FFT data for that kind of label. This template can include spatial frequency data resulting when a label image of known orientation (edges parallel to the image frame) and of known scale is transformed by an FFT. By comparing the query FFT data to the reference FFT data, the affine distortion of the query FFT data can be inferred, which in turn indicates the affine distortion of the query image. A corrective dewarping can be applied to the query image to place the image squarely within the frame at the known scale. This dewarped query image can then be presented to a decoding algorithm for further refinement of the image pose (using reference signal components) and for decoding of the multi-bit payload. (Pose refinement can use least-squares techniques as detailed in our Publication No. 20170193628, or the AllPose technique as detailed in our Publication No. 20180005343 and our pending application No. 16 / 141,587, filed Sep. 25, 2018, which are incorporated herein by reference.)

[0198] Figure 47 includes a flow chart illustrating the aforementioned embodiment. The three blocks in the middle identify high level steps. The flanking flow charts in parentheses detail specific algorithmic operations that may be used to implement the corresponding steps.

[0199] For purposes of brevity, the preceding discussion has not repeated details provided elsewhere in this specification, e.g., regarding the formation of the encoded payload component, the formation of the reference (registration) signal component (optionally having a structured appearance), controlling dot density and placement constraints, resizing the signal array, inverting the signal using holes in the darker borders, etc., which those skilled in the art will recognize are equally applicable to the configuration just detailed. Using Sparse Marks in Approximating Gray-Scale Images.

[0200] As is well known, a grayscale newspaper photograph can be represented in two-color form using black dots on a white background, or vice versa. This is often called halftoning. Therefore, grayscale photographs can also be rendered with sparse marks.

[0201] This section builds on the work detailed above in our Patent No. 6,760,464, which teaches that a digital watermark can be embedded in a halftone image by using a digital watermark signal as a halftone screen. In one particular embodiment, watermark blocks are created at different darkness levels by applying different thresholds to a high density watermark block having a mid-gray average value (i.e., 128 in an 8-bit system). At each pixel in the host image, the gray level corresponds to a threshold value that is in turn applied to the high density watermark signal at that location to determine whether or not to place a dot at that location.

[0202] In one embodiment of the present technology, various sparse blocks of different dot densities (ink coverage) are pre-computed and stored in a lookup table. For each pixel in the host image, the corresponding block is accessed from the lookup table, and the pixel, indexed by the pixel's location in the block, is copied to the output image. That is, the dot density of the sparse code is locally varied according to the grayscale image data.

[0203] Figure 48A shows an example grayscale image of a chair. (Due to limitations in patent drawing reproduction, this is not actually a grayscale image, but the effect is similar.) Figure 48B shows a zoomed-in excerpt showing the legs of a chair rendered by the method from a sparse block. Each grayscale pixel in the source image is associated with a location in a tiled array of sparse blocks. A dot is written or not written to the output frame by looking up its location in a sparse mark in a lookup table that has a dot density corresponding to that pixel (grayscale) level.

[0204] FIG. 49 shows the correspondence between grayscale levels and sparse markings. Grayscale levels between 0 and 127 are formed by white dots on a black background (dot coverage ranging from 0% to 50%). Grayscale levels between 128 and 255 are formed by black dots on a white background (dot coverage ranging from 50% to 0%). There may be a different sparse pattern for each of the 254 grayscale values ​​from 1 to 254. Or, multiple grayscale values ​​may map to a single sparse pattern. For example, grayscale values ​​from 0 to 15 may map to the darkest sparse pattern (e.g., having an average ink coverage of 97%), values ​​from 16 to 31 may map to the next darkest sparse pattern (e.g., having an average ink coverage of 91%), and so on up to values ​​from 240 to 255, which may map to the lightest sparse pattern (e.g., having an average ink coverage of 3%).

[0205] Returning to Figure 48A, it should be appreciated that there is not much signal in the very dark and very light tones. Thus, if the camera is zoomed in to capture an image that includes only the dark region around reference numeral 481, decoding may be difficult or impossible, as may the bright area around reference numeral 482. However, if the camera captures an area that includes other regions, the payload may be easily recovered.

[0206] The fidelity of reproduction by this method depends in part on the element size of the sparse mark dots. FIG. 50A shows an excerpt of a grayscale lion photo converted to a sparse format in which each dot is a single pixel. FIG. 50B shows the same excerpt, but in which each dot is a 4×4 cell of pixels. (The former is sometimes called “bump size 1” and the latter is sometimes called “bump size 4.”) Aesthetically, the smallest bump size may be desired, but it physically packs the blocks into the smallest spatial extent. As such, it requires that the camera be placed relatively close to the printed object for signal detection / decoding. Often, the human factor of interaction with the printed object, e.g., a smartphone, dictates that a larger reading distance should be used, resulting in the common use of bump sizes 2 and 3. Further details on the use of sparse marks in approximating grayscale images

[0207] In a further embodiment, the reference signal and the message signal are combined with a desired weighting to produce a high density greyscale signal, as discussed above in connection with Figures 10-22. N different levels of print density may be defined. For example, N may be 19, corresponding to 5%, 10%, 15%, ... 95% ink coverage. The 5% print density is achieved by selecting the lowest value pixel, subject to the no-go distance constraint, until 5% of the pixels have a mark. Similarly for 10%, 15%, etc.

[0208] 95% coverage is achieved by selecting the highest valued pixel (whitest) to mark on a black background, subject to the no-go distance constraint, until 5% of the pixels are marked white, and so on for 90%, 85%, etc.

[0209] In certain embodiments, different print densities are achieved by setting different no-go distances: at 5% print density, no-go distance D1 is maintained; at 10% density, no-go distance D2 is maintained, where D2≦D1; at 15% density, no-go distance D3 is maintained, where D3≦D2, etc.

[0210] At the other end of the print density spectrum, everything is reciprocal, with white marks formed on a black background. At 95% print density, the no-go distance D19 is maintained. At 90% print density, the no-go distance D18 is maintained, with D18≦D19. And so on.

[0211] In some but not all embodiments, D1=D19, D2=D18, etc.

[0212] To implement such a configuration, pixel values ​​in the high density grayscale signal are sorted by value and associated with their respective locations. A 5% print density region may be achieved by setting a no-go distance to a value D1. The lowest valued grayscale pixel in the high density signal is copied as a dark mark to a corresponding location in the output frame. The next lowest valued pixel in the high density signal is examined to determine if it is at least D1 pixels away from the previous pixel. If so, it is copied as a dark mark to a corresponding location in the output frame, otherwise it is skipped. The next lowest valued pixel in the high density signal is then examined to determine if it is at least D1 pixels away from the previously copied pixel. If so, it is copied as a dark mark to a corresponding location in the output frame, otherwise it is skipped. This process continues until 5% of the pixel locations in the output frame are marked.

[0213] A 10% print density area is achieved by setting the no-go distance to D2 pixels. A similar process is followed to produce a print density area marked with 10% ink coverage. A 15% print density area can similarly be achieved by setting the no-go distance to D3 pixels and repeating the process.

[0214] The no-go distance constraint becomes difficult for 50% print density and nearby values. 50% density requires an equal number of dark and white marks, some of which must be adjacent, even diagonally. The sparsest 50% pattern is a checkerboard, or vice versa.

[0215] In converting mid-gray values ​​to sparse, the designer can take different routes. One is to simply employ a conventional dither pattern (e.g., a uniform 50% checkerboard) and not encode any information in such regions. Another is to place a dark mark in the darkest 50% of the locations in the dense signal block, without regard to neighbors. This creates a speckled effect, but provides a strong encoded signal. In other configurations, the two methods can be used in combination, with some regions using a dither pattern selected for a regular looking appearance, and other regions marked based on the darkest 50% of the dense signal, without regard to spatial uniformity.

[0216] In the former case, the signal strength as a function of print density has an M-shaped curve, with small signal strength at print densities of 1-3% and 97-99%, none at 50%, and peaks between these two values, while in the latter case the signal strength is single lobed, trending to a maximum at 50% and zero at 0% and 100%.

[0217] Although keep-out regions are generally thought of as somewhat circular, they need not be. Applicants have found that other keep-out regions often provide better control of the simulated gray tones. Figures 51, 52A, 52B, 53, and 54 illustrate why.

[0218] Figure 51 shows in cross-hatching four pixels that are excluded from marking by a no-go distance of 1.2 pixels. (In this discussion, a pixel is excluded if its center is less than a threshold distance from the center of the pixel to be marked, shown in bold.)

[0219] As shown in Figures 52A and 52B, when the no-go distance is increased slightly to 1.5 pixels, the number of excluded pixels jumps by 4 to 8. If the no-go distance is further increased to 1.8 pixels, the number of excluded pixels remains the same (still 8).

[0220] A further increase in the no-go distance to 2.2 pixels raises the number of excluded pixels by another four jumps to 12, as shown in Figure 53. A further small increase in the no-go distance to 2.4 pixels raises the number of excluded pixels by another eight jumps to 20.

[0221] It can thus be seen that the circular keep-out region provides very coarse control of the number of pixel locations that are excluded from marking: no change in number occurs for some increases in the keep-out distance, and further increases cause the number of excluded pixels to jump by four or eight, symmetrically around the central pixel.

[0222] When an elliptical keep-out region is used, a finer granularity of control can be achieved. FIG. 55 shows an ellipse with a ratio between its minor and major axes of 0.7. At a major axis length of 1.9, this ellipse excludes 8 pixels from the marking. When its size is increased to have a major axis length of 2.2 (FIG. 56), it excludes 10 pixels from the marking. As the size increases, it variously includes additional pairs of pixels above and below, additional pairs of pixels to the left and right, and additional quadruples of pixels. It should be appreciated that such an elliptical shape provides twice the granularity of control that a circular keep-out region. (In some embodiments, the ratio of the major to minor axes is fixed, in other cases it varies as the area of ​​the ellipse changes.)

[0223] To achieve even greater granularity of control, patterns can be used that are adjusted to exclude a certain number of nearby pixels from the marking.

[0224] 57A, 57B, 57C, and 57D show no-go patterns adjusted to exclude 1, 2, 3, and 4 pixels, respectively. These are just a small classification of suitable patterns. Rotations of these patterns (90 degrees, 180 degrees, and 270 degrees) can also be used, as mirror images of all rotations. Most such patterns do not have an axis of symmetry passing vertically or horizontally through the central pixel. (Although not shown, other such patterns can be formed to exclude additional numbers of nearby pixels, e.g., 5 to 25.)

[0225] As before, when a pixel is selected for marking in the output frame, one or more nearby pixels are excluded from marking based on the selected pattern.

[0226] Such configurations, such as those of Figs. 57A-D, provide a fine-grained mechanism for achieving different print densities by excluding some pixels from marking. Even finer control can be achieved by randomly selecting among two or more of the no-go patterns, e.g., excluding different numbers of pixels from marking. For example, the first and second pixel locations selected for marking in the output frame (e.g., from a sorted list) can use the top no-go pattern of Fig. 57B, the third selected location can use the top no-go pattern of Fig. 57C, and so on. This sequence can be repeated with the fourth and fifth selected pixel locations using the no-go pattern of Fig. 57B, and the sixth selected location using the pattern of Fig. 57C, and so on. With such configurations, each mark can be associated with a non-integer number of nearby pixel locations that, on average, will be excluded from marking (i.e., 2.33 in the current example). Very fine simulation of grayscale image gradations can be achieved thereby.

[0227] (Even if a desired print density can be achieved through the use of a single no-intersection pattern, such as one of those in FIG. 57C, there may be aesthetic benefit from randomly varying between two or more different patterns, such as from FIGS. 57B and 57D, which exclude fewer and more nearby marks to achieve the same average print density effect.)

[0228] In contrast to the previous discussion, in the configuration just discussed, different print densities are not achieved by different no-go distances (e.g., no-go distance D1 for 5% print density), but rather by setting different no-go location exclusion numbers. At 5% print density, a pattern that excludes 9 nearby locations may be used. At 10% print density, a pattern that excludes 5 nearby locations may be used. At 15% print density, a pattern that excludes 3 nearby locations may be used (e.g., as shown in FIG. 57C). At 20% print density, a combination of patterns that excludes, on average, 2.5 nearby locations may be used, and so on. Different renderings of grayscale images may be achieved by varying the mapping where different print densities (grayscale levels) correspond to different numbers of nearby excluded pixel locations. Reading the payload from the captured image

[0229] FIG. 58 is a flow diagram illustrating a method for decoding an optical code from an image signal captured from an object.

[0230] In an image capture process (e.g., scan 200 of FIG. 58), an image is captured at a resolution preferably close to the resolution at which the encoded payload signal was encoded in the original image (e.g., 300 DPI, 100 DPI, etc.) Image upsampling or downsampling operations may be performed to convert an image provided by a digital camera or scanner to a target resolution for further decoding.

[0231] At least a portion of one or more blocks of the encoded data signal are captured in the scan.

[0232] In the initial processing of the decoding method, it is advantageous to select frames and blocks within frames whose image content is most likely to contain the encoded payload. The block size is desirably selected to be large enough to span substantially all of a complete tile of the encoded payload signal, and preferably a collection of neighboring tiles. However, because the distance from the camera or scanner may change, the spatial scale of the encoded payload signal is likely to change from its scale at the time of encoding. This spatial scale distortion is further addressed in the synchronization process.

[0233] The first stage of the decoding process filters the incoming image signal to prepare it for detection and synchronization of the encoded payload signal (202). The decoding process further divides the image into blocks and selects blocks for further decoding operations. The first filtering stage converts the input color image signal (e.g., RGB values) into the color channel(s) in which the auxiliary signal is encoded by applying appropriate color weights. See, for example, U.S. Patent Publication No. 20100150434 for details regarding color channel encoding and decoding. The input image may also be a single channel image (one pixel value per pixel) corresponding to capture by a monochromatic sensor in the presence of ambient or artificial illumination, such as a typical red LED with a wavelength centered around the spectral band around 660 nm.

[0234] The second filtering operation isolates the data signal from the host image. The pre-filtering is adapted for the data payload signal encoding format, including the type of synchronization used. For example, if an explicit synchronization signal is used, the pre-filtering is applied to isolate the explicit synchronization signal for the synchronization process.

[0235] As mentioned, in some embodiments, the synchronization signal is a set of peaks in the Fourier domain. Prior to transformation into the Fourier domain, the image block is pre-filtered. See, for example, the Laplacian pre-filtering detailed in the above-incorporated U.S. Patent No. 6,614,914. A window function is applied to the block, followed by transformation into the Fourier domain using an FFT. Another filtering operation is performed in the Fourier domain. See, for example, the pre-filtering options detailed in U.S. Patent Nos. 6,988,202 and 6,614,914, and U.S. Publication No. 20120078989, which are incorporated by reference.

[0236] The input image is typically filtered with a predictive "8-axis" filter, as described above, which acts to suppress the underlying host image (which typically exhibits relatively high local correlation) and thereby emphasize the noise signals that carry the code signal components.

[0237] A synchronization process (204) is then performed on the filtered blocks to recover the rotation, spatial scale, and translation of the encoded signal tiles. This process may use a log polar method as detailed in U.S. Pat. No. 6,614,914, or a least squares or AllPose approach as detailed above, to recover the rotation and scale of the synchronization signal, which consists of peaks in the Fourier domain. To recover the translation, the phase correlation method of U.S. Pat. No. 6,614,914 is used, or the phase estimation and phase shift methods of U.S. Pat. No. 20120078989 are used.

[0238] An alternative method performs synchronization relative to an implicit synchronization signal, for example as detailed in US Pat. No. 9,747,656.

[0239] The decoder then steps through the bit cell locations in the tile to extract bit estimates from each location (206). For each location, the process applies rotation, scale, and translation parameters to extract bit estimates from each bit cell location (206). As the process visits each bit cell location in the tile in a particle, it transforms it to a location in the received image based on the affine transformation parameters derived in synchronization, and then samples around each location. This process occurs because the bit cell location and its neighborhood feed inputs into a detection filter (e.g., 8-axis or cross) to compare the samples at the embedding location with the neighborhood. The outputs of each comparison operation (e.g., 1, -1) are summed to provide an estimate for the bit cell location. Each bit estimate at a bit cell location corresponds to an element of the modulated carrier signal.

[0240] The signal decoder estimates (208) the value of each error correction coded bit by accumulating bit estimates from that bit's bit cell position in the carrier signal. For example, in the above encoder embodiment, the error correction coded bits are modulated (e.g., multiplied or XORed with a binary antipodal signal) across a corresponding carrier signal having 16 or 32 elements. The bit values ​​are demodulated from estimates extracted from the corresponding bit cell positions of these elements. This demodulation operation multiplies the estimates by the carrier signal code and adds the results. This demodulation provides a soft estimate for each error correction coded bit.

[0241] These soft estimates are input to an error correction decoder to generate the payload signal (210). For convolutionally coded payloads, a Viterbi decoder is used to generate the payload signal including a checksum or CRC. For other forms of error correction, compatible decoders are applied to reconstruct the payload. Examples include block codes, BCH, Reed-Solomon, and Turbo codes.

[0242] The payload is then verified (212) by calculating a checksum and comparing it to the decoded checksum bits. The checksum will, of course, match the one in the encoder. In the above example, the reader calculates a CRC on a portion of the payload and compares it to the CRC portion in the payload.

[0243] At this stage, the payload is then passed to another requesting process, such as an application program or software routine that uses the content in further processing.

[0244] In an embodiment where the encoded payload is conveyed in the phase of a sinusoid, the decoder performs a similar first stage synchronization on a reference signal component, such as a subset of the sinusoid. This subset of the sinusoid forms a peak in the spatial frequency domain. After synchronization, the decoder extracts an estimate of the encoded payload element in each reference signal carrying the payload. The phase shift is measured directly relative to the unmodulated state using the phase estimation and shift method of US Publication No. 20120078989. The decoder applies a geometric transformation coordinate of the sinusoid component in the spatial frequency domain. The decoder then estimates the phase of this component in the image by weighting nearby composite components at nearby integer coordinates based on weights derived from the point spread function. This estimate of phase is then compared to the expected phase (e.g., a phase representing 1, 0, or -1, or 1 or 0 in a ternary or binary encoding scheme). The bit value extracted in this component is the one that corresponds to the estimated phase. This process is repeated for each sinusoid component carrying the payload signal. The resulting sequence of symbols is then error-correction coded and the process proceeds to error detection as described above. Pre-marked media

[0245] In another aspect of the present technology, a roll of heat-adhesive labels is pre-marked, typically with ink (rather than thermochromic), to convey a signaling component. This pre-marking generally occurs before the roll of labels is delivered to a user (e.g., a grocery store) and before it is placed in a thermal printer.

[0246] In one illustrative embodiment, each label on the roll is pre-marked with a reference signal component that includes a printed pattern, e.g., of dots. However, the dots are not black. Rather, they are of a color to which the human eye is relatively insensitive (compared to black) when printed on white media, but which provides a discernible contrast when imaged with red light illumination (e.g., 660 or 690 nanometers) from a point of sale scanner. One such ink color is Pantone 9520 C. (For more detailed information regarding marking with Pantone 9520 C and related issues, see our co-pending application Ser. No. 15 / 851,143, filed Dec. 21, 2017, which is incorporated herein by reference.)

[0247] A pattern of dots may be created from the multi-valued reference signal (e.g., 70 in FIG. 10) by first placing a dot in the output signal block at a location corresponding to the darkest lowest value pixel in the signal 70, and continuing to select successively less dark pixels until a reference pattern of sufficient detection robustness is achieved. In one particular embodiment, a 5% dot density may be used, and in another, a 20% dot density. In some embodiments, placement constraints are used as described elsewhere to limit dot clumping. This reference signal block may then be tiled and printed across the entire length of the label, or only across specific regions.

[0248] In one particular embodiment, such a pattern of reference signal dots is printed onto a roll of adhesive labels by an offset press that also applies other pre-printed markings, such as a store logo. (Such other markings are typically applied using different ink colors.) In other embodiments, inkjet printing is used. (Of course, such printing may be applied to the label substrate before the substrate is formed into a roll and before the adhesive is applied and / or before the label is adhered to its release backing.)

[0249] In a different embodiment, the reference signal is printed with visible ink, but in a patterned manner that depicts or is reminiscent of a distinct pattern, such as a company logo.

[0250] Because the reference signal is pre-printed on the adhesive label stock, the printer need only thermally print the message signal. In an illustrative system, the message signal is a bimodal signal, e.g., a block of 128x128 elements, half of which (8,192) have one value (e.g., black) and half have the other value (e.g., white). Figure 59 shows an 80x80 excerpt of such a purely bimodal message signal. As with other embodiments, a subset of the black marks may be used (e.g., approximately 500 of the 8192 black marks) while still ensuring reliable signal recovery.

[0251] In one particular embodiment, black marks are randomly selected from the pure message signal block of Figure 59, subject to placement constraints, until a desired percentage of black marks is selected. These are then copied from the pure message signal block to corresponding output block locations. Such a resulting array is shown in Figure 60. If 10% of the marks are selected for copying to the output block (i.e., 819 marks), this reduces the printing density from 50% to 5%. A larger or smaller percentage of marks can be so selected to produce different sparsities.

[0252] In other embodiments, the marks are not randomly selected from the pure message signal of Figure 59. Instead, they are preferentially selected from several regions to give a patterned appearance to the resulting array of marks in the output block. For example, marks from the majority of the blocks may be selected in one proportion (e.g., 5%), but within an outline corresponding to a company logo, a denser selection of marks (e.g., 10%) may be chosen to result in a logo-patterned sparse block.

[0253] Figures 61 and 62 show such a configuration. The company logo, illustrated by a star in Figure 61, acts as a selection mask. In the black areas of the mask, marks are selected at a greater density than in the white areas of the mask. A sparse pattern reflecting the company logo can be generated and tiled across the label, as shown in Figure 62. An array of such blocks, depicted at the scale at which they might appear on the actual label, is shown in Figure 63. Of course, with greater or lesser print density inside the mask area, a pattern of greater or lesser prominence can be formed.

[0254] (Dot placement constraints may or may not be used within the darker density excerpts. In Figures 62 and 63, no such constraints are used.)

[0255] Although described in the context of marking a message signal only, it will be appreciated that the selection of dots at different densities in different areas can achieve results such as those shown in Figures 62 and 63 in other marking configurations, for example in an embodiment in which both the reference component and the message signal component are formed by thermal black marks.

[0256] To read the message from the image captured by the point of scale scanner, the affine distortion of the captured image relative to the printed original (due to the pose in which the object is presented to the scanner) must be determined. Reference signals detected from pre-printed dots allow the scale and rotation of the imaged pattern relative to the original pattern to be established. However, the translation also needs to be determined.

[0257] One way to establish the translation (e.g., to find the upper left corner of the message signal block in the captured image) is to thermally print an indicium, such as a reference marking, as part of the message signal, at a known location relative to the message signal block. The reference may be a known pattern, such as a double circle marking, a diamond, a plus symbol, or a logo. Alternatively, the indicium may be a unique 2D pattern of sparse dots, to which the signal decoder can synchronize, such as by spatially correlating the known 2D pattern with an image excerpt until a match is found. In some embodiments, the unique pattern is achieved by setting some of the payload bits to fixed values ​​and printing some or all of the dots that correspond to such pattern. The location of the known pattern relative to the reference signal defines the translation of the message signal, allowing decoding to proceed.

[0258] Such an arrangement, using fiducials printed by the label printer, allows the message signal to be applied to the preprinted reference signal in any spatial relationship, and then the detector determines the unknown translation offset based on the position of the detected fiducial relative to the detected reference signal. In another embodiment, the tolerance of the printing mechanism is sufficiently precise to ensure that the thermally printed message signal appears at a known spatial location on the label, e.g., with the top right corner of the message signal block coinciding with the top right corner of the label (or wherever such label corner is, if the label corner is not rounded). Because the reference signal is preprinted on the label with high precision (e.g., as is commonly required in offset printing presses to achieve alignment of different plates and screens), the reference signal and the message signal can be printed in spatial alignment that counters the spatial alignment of an arrangement in which both signal components are printed in a common motion. At worst, a small brute force 2D correlation search, e.g., based on fixed bits of the encoded message, can correct for any small offset. Decoding of the message from the captured image can then proceed in the usual manner.

[0259] In yet another configuration, the thermal printer includes an optical sensor that captures image data from a pre-printed label prior to thermal printing and determines the location of the upper left corner of the block of reference signals from the sensed data, thereby enabling the printer to print a message signal in registered alignment with the reference signals such that no translational search is required.

[0260] In one such embodiment, the optical sensor includes a 2D camera that captures an image including the reference signal. This image reveals the location of the pattern and allows the printer to apply the message signal in registered alignment. In a simpler embodiment, the optical sensor is simply a photodiode and photodetector arrangement positioned to sense a pre-printed tick mark on the margin of the label in the same pre-print operation as the reference pattern. Again, by locating the tick mark, the printer can print the message signal in registered alignment with the reference signal.

[0261] In a variant configuration, synchronization marks or patterns for detection by an optical sensor in the printer are not pre-printed on the label area itself, but instead are formed on adjacent media, such as a trim piece to the side of the label (the piece that remains when the label is peeled from its backing), or on a backing or trim piece between the labels. Message signaling by reference dot selection

[0262] The signaling schemes described below are advantageous in that they approach the Shannon limit for information transfer (at a given reliability) more closely than prior art sparse code schemes.

[0263] Applicant has found that prior art watermark detectors that are globally optimized to discern optical codes hidden within continuous tone host artwork (e.g., those detailed in U.S. Patent Nos. 9,747,656, 9,959,587, and application Ser. No. 15 / 628,400, filed Jun. 20, 2017, and references cited therein, sometimes collectively referred to herein as "conventional" or "continuous tone" watermark decoders) are suboptimal when applied to sparse codes because the majority of the artwork in sparse codes is empty (or uniformly toned). While empty, captured images within such regions are not uniformly valued (e.g., not all such pixels have a perfect white value: 255). Rather, there is typically a slight variation between pixel values, ranging from, for example, 230 to 255 for a white background. This variation results in the prior art detectors finding a signal when in fact there is no signal. Such "phantom" signals act as noise that interferes with the correct decoding of the true signal.

[0264] To avoid this problem, applicants have devised various configurations that limit or avoid the recovery of phantom signals from regions that are expected to lack signal (e.g., be empty). In particular, such embodiments identify a subset of image locations where sparse dots are expected to be located (e.g., less than 50% of the image locations, more typically 15%, 10% or less of the image locations). The decoder discerns the message signal only from this small subset of locations. Noise is reduced proportionately. In a preferred embodiment, these locations correspond to the extreme values ​​of the multi-valued 2D reference (registered) signal.

[0265] With configurations such as those described below, applicants have demonstrated that the number of dots used to represent a message can be reduced by 30%, 50%, 70%, or more compared to previous sparse code configurations such as those taught in U.S. Patent No. 9,635,378, without significantly compromising robustness. (Robustness can be analyzed by adding increasing levels of Gaussian white noise to the encoded image and noting the noise levels at which the detection rate falls from 100 to some threshold, such as 98%, over a large number of sample images.)

[0266] In a first such embodiment, only 1024 dark marks are used out of 16,384 regions within a 128x128 signal tile: all the marks represent the reference signal (by their extrema), but their selection represents the message signal.

[0267] The method begins with a reference signal tile, such as depicted as signal 70 in FIG. 10. At the center of each square element (e.g., waxel) in the reference signal tile (e.g., a 128×128 element tile), the reference signal has a corresponding real signal value, e.g., ranging from 0 (black) to 255 (white). (In other systems, such as that shown in FIG. 10, the values ​​are real values ​​that vary, e.g., from about −0.6 (black) to 0.6 (white).) The 16,384 elements are sorted by value to generate a ranked list containing the 2048 darkest elements. Each entry in the list is associated with an ordinal position (1, 2, 3...) and {X,Y} data that specifies the element's position in the tile by column and row. Table 2 shows an excerpt of such a list. [Table 2]

[0268] (The reference signal values ​​are calculated as real, rather than integer, values ​​at the center of each element to ensure unambiguous ordering up to that point.)

[0269] For example, a 47-bit payload is processed by convolutional encoding and, optionally, repetition and CRC coding to obtain a message that is 1024 bits in length. Each bit in the message is associated with a successive pair of reference signal elements in a ranked list. One pair consists of the locations ranked 1 and 2. The next pair consists of the locations ranked 3 and 4, etc.

[0270] If the first bit of the message signal is even valued (i.e., 0), then the even ranked location from the first pair in Table 2 (i.e., #2) determines the location in the output signal tile that is to be darkened. If the first bit is odd valued (i.e., 1), then the odd ranked location from the first pair (i.e., #1) determines the location in the output tile that is to be darkened. Similarly, for the second bit of the message signal, we select between the locations ranked 3 and 4, and so on. Thus, 1024 of the reference signal elements are selected from the 2048 elements identified in Table 2 based on the bit values ​​of the 1024 message bits to define the 1024 locations in the output tile that are to be darkened.

[0271] To illustrate, consider a message that begins with 01001110.... In such a case, the elements in the output signal tile identified in Table 3 are darkened. [Table 3]

[0272] Each of the 1024 dots in the output signal tile corresponds to one of the darkest values ​​in the original reference signal tile, and each such dot also represents a corresponding bit of the 1024 message bits.

[0273] Figures 64A and 64B depict such a configuration. Figure 64A shows an excerpt of a reference signal in which several waxels have extreme values ​​(i.e., the darkest waxels) highlighted by white boxes. In the embodiment discussed, 2048 such extreme values ​​are identified within the complete reference signal tile. (The waxels shown have been chosen such that no two are directly adjacent, implementing a simple no-go constraint.)

[0274] The extreme values ​​are paired (not shown) and one location of each pair is marked according to the respective bit of the message signal, resulting in a sparse code excerpt such as that shown in Figure 64B. Half of the 2048 candidate locations, 1024 locations, are marked within a complete 128x128 waxel tile.

[0275] In decoding a captured image depicting a sparse pattern such as that shown in Fig. 64B, an affine transform of the image is first determined with reference to a reference signal. (Although the dot markings in Fig. 64B are sparse, they are sufficient to characterize the affine transform of the captured image over a larger excerpt of the tile, since the dots correspond to the most significant parts of the reference signal, the extreme values.) The image is then typically inversely warped to restore the pattern to its original representation. (More precisely, the received image is resampled according to a coordinate system defined from the determined affine transform.) These operations are detailed more specifically in the prior art documents cited above.

[0276] To extract the message, the detector uses its own copy of the data from Table 2. (This table is consistent for all marks that use a particular reference signal and occupies negligible memory in the detector code.) The detector looks at the inversely warped image to determine pixel values ​​at the two locations specified by the first pair of entries in the table (i.e., ranks 1 and 2). Ideally, one dark and one light. The darker one indicates the value of the first message bit. The detector then looks at the image to determine pixel values ​​at the third and fourth entries in the table (i.e., ranks 3 and 4). Again, ideally, one dark and the other light. The darker one indicates the value of the second message bit, and so on.

[0277] In practice, in considering each potential bit of a message by a detector, the two locations examined may be far apart in value (indicating high confidence in the bit decision) or may be close to each other in value (indicating lower confidence). To quantify the confidence associated with each message bit decision, a score is calculated based on the values ​​of the pixels at the locations indicated by the pair of odd and even numbered entries in the table. One suitable score is: Score = Log2(pixel value at even position / pixel value at odd position) It is.

[0278] In the above example, if the pixel at even position {72, 32} has a value of 30 and the pixel at odd position {18, 22} has a value of 240, the score would be negative 3, indicating that the first bit in the message has a value of "0." (Any negative value indicates a bit value of "0.")

[0279] Considering the next bit, the detector may find that the pixel at even position {26, 82} has a value of 130, and the pixel at odd position {1, 33} has a value of 101. In this case, the score is 0.364. A positive score indicates that the corresponding bit value is "1". However, the absolute magnitude of the score is low (e.g., for the absolute value of the first bit score: 3). This indicates a lower confidence in this decision.

[0280] The string of message bits obtained by this procedure (after considering all 2048 candidate locations in the inversely warped image), along with a confidence score for each, is applied to a soft decoder such as a Viterbi, Reed-Solomon, or Turbo decoder. From these raw bit decisions and the confidence scores, the decoder returns the original 47-bit payload.

[0281] It should be appreciated that the decoder just described looks at exactly 2048 locations within a 16,384 waxel reference signal tile. The other 14,336 waxels are ignored so that any phantom signals present in those other waxels do not interfere with the decoding.

[0282] The just described configuration pairs extreme points in the reference signal based on their proximity in the sort order. This is a logical choice since every other location for each payload bit representation is of similar reference signal strength. However, this is not required. The pairing can be done in any manner, for example randomly within the subset of reference signal elements that have values ​​below a threshold.

[0283] Reconsidering again, in this first particular embodiment, the message consists of a number of bits each having a first or second value (e.g., 0 or 1) at a respective position in the binary message string. A list of M (e.g., 2048) 2D reference signal elements is ranked by value such that each has an ordinal position in the list, and each is associated with a location in the 2D reference signal. The list thus defines a number of pairs of elements having ordinal positions of 2N-1, 2N, for N=1, 2, ... (M / 2). Each pair of elements includes an element having an even ordinal position and an element having an odd ordinal position. Each position in the message signal is associated with a pair of elements in the ranked list. A mark is provided in the output signal tile at a location corresponding to the location of the even element of the pair when the associated position in the message signal has a first value (e.g., "0"). Similarly, a mark is provided in the output signal tile at a location corresponding to the location of the odd element of the pair when the associated location in the message signal has a second value (e.g., "1").

[0284] In the first particular embodiment just described, the 1024-bit message signal is represented by 1024 marks (dots) located among 2048 possible locations, i.e. a mark is formed for each message bit, regardless of whether the bit has a value of "0" or "1". In the second particular embodiment, this is not the case.

[0285] In a second particular embodiment, each respective bit position in the message string is associated with the location of a single extremum in the reference signal (rather than a pair of locations as in the first embodiment). Each successive bit of the message signal may be mapped to successive locations in the Table 2 ranking, i.e., the first message bit corresponds to the dimmest extremum (rank #1), the second message bit corresponds to the second dimmest extremum (rank #2), etc.

[0286] In this second embodiment, a "1" message bit is signaled by a mark, while a "0" message bit is signaled by the absence of a mark (or vice versa). Instead of drawing from 2048 candidate locations and marking only half, this second embodiment draws from 1024 locations. Of these 1024 locations, some are marked and some are not, depending on whether a "1" bit or a "0" bit is represented at that location.

[0287] This second configuration is illustrated in Figures 65A and 65B. Comparing with Figures 64A and 64B, it can be seen that only half of the candidate locations are identified. (However, these are the darkest of the dark waxels. The brighter ones highlighted in Figure 64A are no longer selected in Figure 65A.) Of these candidate locations, about half are marked. (The number of "1" bits in a message signal that are worthy of being marked is typically between 400 and 600 bits, and the number of locations marked is rarely exactly half of the 1024 candidate locations.)

[0288] As in the first embodiment, the detector in this second embodiment is coded with a list of 1024 candidate locations, and an association of each location with a respective bit position in a 1024-bit message string.

[0289] It should be appreciated that this second particular embodiment of Figures 65A and 65B involves much fewer marks and is therefore much less noticeable than the first embodiment above. The decoder looks at only 1024 locations for data instead of 2048 in the first embodiment. 15,360 of the 16,384 locations in the reference signal tile are ignored, further reducing the impact of phantom signals. However, the information conveyed by the dots (message signals and reference signals) is conveyed with correspondingly less robustness, since roughly half the ink is used to convey the same amount of information.

[0290] Due to the redundant coding, e.g., convolutional coding, of the payload to generate the string of message signal bits, the robustness of the message signal is usually not an issue. The correct payload can typically be recovered even from a smaller number of dots than is used in the second particular embodiment. However, such a reduction in the number of dots also reduces the robustness of the reference signal, sometimes to an unacceptable level (depending on the particular application).

[0291] To increase the robustness of the reference signal, additional dots (fixation marks) that do not represent any message bits but only serve to further represent the reference signal may be added to the FIG. 65B pattern.

[0292] For illustration, in this second particular embodiment, a 1024-bit message signal may include 505 "0" bits and 519 "1" bits. Thus, 519 marks are formed within each output signal tile to represent the message signal. To increase the robustness of the reference signal, an additional 300 fixed marks may be added to signal only the reference signal.

[0293] In one such embodiment, an ordered list of 1324 most extreme values ​​in the reference signal, each with an associated spatial location (as in Table 2 above), is generated (e.g., by sorting). The first 1024 locations are assigned to represent bit values. (In the current example, 519 of these 1024 locations are marked.) The last 300 locations in the ordered list (i.e., locations ranked as #1025 through #1324) are used as fixed marks solely to enhance the reference signal. By using 300 additional locations to represent the reference signal, the number of dots that the decoding system can distinguish in the reference signal (and the affine transformation of the captured image) increases from 519 to 819 (a 58% increase).

[0294] The gain in reference signal robustness does not actually reach this 58% figure just mentioned, since the fixed mark locations correspond to less extreme values ​​of the reference signal. However, in variant embodiments, the extreme locations dedicated to representing only the reference signal can be taken from the top of the ranked list instead. In the above example, of the 1324 locations in the ordered list, locations #1 to #300 can be used for fixed marks only to represent the reference signal, while locations #301 to #1324 can be used to represent bits of the message signal (as well as to represent the reference signal). In such a variant, the strength of the reference signal is increased by more than the 58% indicated by the simple ratio of 819 / 519, since the 300 fixed marks correspond to the most extreme values ​​of the reference signal.

[0295] In other embodiments, fixed marks dedicated to representing only the reference signal may be drawn from the middle of the ranked list, or may be drawn from scattered positions within the list, for example every sixth place in the ranked list may be dedicated to representing the reference signal and not represent any message signal bits.

[0296] In yet another embodiment, the payload is not represented as a 1024-bit string, e.g., with 519 dark marks. Instead, the convolutional coding rate is adjusted to reduce the length of the resulting message bit string, e.g., to 600 or 800 bits, and fewer locations are marked accordingly. The payload can still be recovered due to its redundant convolutional coding. The extreme locations thus freed from message transmission can instead be used as fixed marks to represent reference signals.

[0297] Combinations of the foregoing configurations may of course also be used.

[0298] (Although 300 fixed marks have been referenced in the preceding discussion, it should be recognized that the reference signal may be supplemented by any number of additional locations as best suits the application. In some applications, 100 or fewer such additional locations may be used. In others, 500 or more such additional locations may be used. Similarly, while the use of fixed marks is described in the context of a second specific embodiment, such configurations may be used in all of the embodiments described herein.)

[0299] In a third particular embodiment, the 1024 message bits are again represented by 1024 marks. However, rather than being drawn from 2048 potential locations, these 1024 marks are found in 1024 bi-waxel regions. The bit encoded by each mark depends on which of the two waxels is marked in its respective region.

[0300] In particular, the marks in this third embodiment are 2x1 or 1x2 element features called "dyads." Each dyad includes a marked element adjacent to an unmarked element.

[0301] Four potential dyads are shown in Figures 66A-D. Figures 66A and 66B show a horizontal dyad. Figures 66C and 66D show a vertical dyad. Figure 66A represents a "0" message bit. Figure 66B represents a "1" bit. Figure 66C represents a "0" bit. Figure 66D represents a "1" bit. Each consists of a dark (marked) element adjacent to a white (unmarked) element.

[0302] In this third embodiment, instead of ranking candidate single elements in a reference signal tile by value (e.g., as in Table 2), 2x1 and 1x2 regions across the tile are ranked by their average (or sum) value. The darkest 1024 regions are selected. Each is associated with one bit position in the 1024-bit message. Each region is marked with a dyad. If the selected region is horizontally oriented, one of the two horizontal dyads, Fig. 66A or Fig. 66B, is used depending on whether the message bit to be coded at that location is a "0" or a "1". Similarly, if the dark region is vertically oriented, one of the two vertical dyads, Fig. 66C or Fig. 66D, is used depending on whether the message bit to be coded at that location is a "0" or a "1".

[0303] This is made clearer by the examples depicted in Figures 67A and 67B. Figure 67A shows 1x2 and 2x1 waxel regions of the reference signal that are known to have the lowest signal values ​​(i.e., darkest in total or average). In Figure 67B, one waxel of each dyad is marked depending on whether the message signal bit represented by that dyad has a "1" bit or a "0" bit, using the configuration shown in Figures 66A-66D. The number of marks across the reference signal tiles is the same as in the first embodiment (Figures 64A, 64B), but the positions of the dots are different due to the different selection criteria used (i.e., the darkest pair of adjacent waxels).

[0304] Each dot in this third embodiment is always in approximately the same location regardless of the message being encoded, shifting only a single waxel element one way or the other depending on its bit value. This contrasts with the first embodiment, where each dot can be located in either of two potentially widely spaced locations. The generally consistent placement of dots in this third embodiment, around 1024 locations, is advantageous in, for example, sparse marking of small physical areas, where the 2048 potential locations required by the first embodiment might sometimes force two dots to be undesirably close together, or place dots too close to adjacent text.

[0305] This variant of the third embodiment does not rank the candidate regions based on the average (or sum) value of two adjacent elements of the reference signal. Instead, the ranking is obtained based on the individual element values, as in the first and second embodiments. 1024 of these extreme value locations are selected, each anchoring a two-waxel region associated with a bit position in the message. Each is analyzed to determine the structure of the reference signal pattern at that location, whether it is evidence of a horizontal or vertical aspect. In one particular implementation, the four edge-adjacent waxel elements, i.e., to the north, south, east, and west of the selected element, are examined to determine which has the closest value to the (extreme) value of the selected element. The one with the closest value is selected as the second element to be paired with the selected element for placement of the dyad. As before, different dyads are placed in different locations to represent different bit values.

[0306] Sometimes a single element of the reference signal may have an extreme (dark) value, but be surrounded by much brighter elements, such that a two-element region containing the extreme element is not selected for placement of a dyad. (Such an isolated element is shown at 671 in FIG. 67A.) These single dark elements are candidates for marking to enhance the reference signal, if necessary. In some implementations, a list is generated from the 100, 300, or 750 darkest elements that were not selected for placement of a dyad representing a message bit, and these elements are instead marked to represent the reference signal.

[0307] As in the embodiment described above, the detector is coded with information indicating where the dots are to be placed (here 1x2 and 2x1 waxel regions), and the association of each of the message bit positions to such regions. As before, the detector looks only at those locations in the captured image that are expected to carry dots (2048 in this embodiment, two locations per dyad), and other locations are excluded from decoding.

[0308] (In a variant of the previous embodiment, this information about where dots will / can be placed, and the message bit importance of each location, is not hard-coded into the detector. Instead, the detector computes it on-the-fly based on knowledge of the reference signal, from which the detector can identify and rank the extreme values ​​and construct the message bit mapping.)

[0309] Although reference has been made to assigning successive bits of the message signal to elements of the reference signal in the order of successive reference signal values, this is not required. For example, in another configuration, the assignment may be made based on the spatial arrangement of the reference signal extrema. For example, in the second embodiment, 1024 extrema may be identified and the assignment may begin at the top left of the reference signal tile, with the leftmost extrema in the top row being assigned to the first bit of the message, the next extrema being assigned to the next message bit, and so on in a raster scan order downward across the tile. These and other such mappings may be considered rational, i.e., based on logical rules. Such rational mappings contrast with prior art methods in which successive message bits were deliberately randomly (or more accurately, pseudo-randomly) assigned to locations within a 128×128 message tile.

[0310] Such a bit allocation scheme is shown in Figures 68A and 68B, where message bits 1-5 (out of a 1024 bit message) are identified based on their spatial location. It should be appreciated that in this second embodiment, the presence of a mark indicates a "1" bit and the absence of a mark indicates a "0" bit, so that the mark shown in Figure 68B indicates a message string beginning with the five bits 11110.

[0311] A fourth particular embodiment begins with a binary message signal tile of the type previously shown (in excerpted form) in Figure 8. The 1024 message signal bits are redundantly spread across 16,384 waxel positions within the tile, with approximately 8,192 dark elements (i.e., signaling a message value of "0") and an equal number of light elements (i.e., signaling a message value of "1").

[0312] This fourth embodiment allows the number N of dark elements in the final sparse output tile to be roughly configurable by the user as an input parameter. For example, say we want about 750 dots. Twice this number of darkest elements in the reference signal tile (e.g., the darkest 2N locations in the reference signal tile of FIG. 7), now 1500 waxel locations, are identified. A dot is formed in the output sparse code such that one of the approximately 8,192 dark elements (i.e., representing a "0") in the binary message code pattern is found in one of these 1500 identified waxel locations. In other words, the 1500 identified waxels start out dark, but are turned off whenever the message tile calls for encoding "1" data.

[0313] An advantage of this fourth embodiment (in addition to the user-configurable number of dark elements) is that it can be decoded with prior art watermark decoders as specified above: although the message bits are located in their conventional randomly spread spatial locations, many such locations are left empty.

[0314] As with the other embodiments, the decoder begins by compensating the captured image for affine distortions using the reference signal in a conventional manner (i.e., as described in the references cited above). In decoding the message signal, only data from the 2N identified locations (of the reference signal dark elements) is considered by the decoder. A value of 255 (white) may be substituted for all other elements, overwriting any phantom signal that may otherwise be present in those locations. This improves the robustness of the message decoding compared to prior art watermark decoding.

[0315] In this fourth embodiment, as in the other embodiments, the procedure for creating the sparse optical code may be performed at a resolution that matches the resolution at which the code will be printed. In other implementations, the procedure is performed at a lower resolution. In these latter cases, the resulting sparse pattern may be upsampled to a higher printing resolution, typically while maintaining the same number of dots. (For each dot, the closest integer neighbor to each fractional upsampled coordinate at the printing resolution is selected to carry the dot.)

[0316] Upsampling a signal from its native tile resolution (e.g., 128x128) to a print resolution (e.g., 203 DPI) can result in dots being placed in places in the upsampled signal space that do not coincide with local extrema of the reference signal. Steps can be taken to mitigate this problem.

[0317] For example, consider the reference signal excerpt indicated by the bottom circled region in Figure 68A. This region is shown greatly expanded in Figure 69A, with the waxel boundaries more clearly shown. A local extremum of the reference signal in this region is near the boundary between two waxels. The right waxel is darker and will be darkened in the output code if the value of the message signal element that maps to this location is "0". The corresponding excerpt of the resulting sparse output code is as shown in Figure 69B.

[0318] If the original sparse output code is upsampled by a factor of 3 / 2 and a single dot from the original code is maintained in the upsampled code at the element corresponding to the center of the original dot (indicated by a white plus sign), an output code such as that shown in Figure 69C results. However, a more faithful replica of the true reference signal extremum (Figure 69A) is obtained by nudging the dot one element to the left, as shown in Figure 69D.

[0319] In a specific implementation of the fourth embodiment encoder, the upsampled sparse code is processed to identify which dots are no longer at the sample points that best correspond to the extreme points of the reference signal. These dots are nudged left or right, or up or down, to reposition them into better agreement with the locations of the true reference signal extrema before printing. This helps to obtain an accurate geometric registration of the captured image of the code, which in turn improves the recovery of the message bits.

[0320] However, because the dots are typically placed far away from their ideal message signaling positions, such nudging can impair the decoding of message bits if the decoder does not take note of it. Fortunately, such problems can be recognized by the decoder because artifacts resulting from upsampling of reference signal extreme points are predictable, and such data can be stored in tables included with the decoder. For example, after geometric registration (and optional downsampling), the decoder can consult stored data tables that identify which dots, if any, should be nudged in a particular direction before demodulation, and by how much. (In other embodiments, instead of consulting a table to obtain such information, the decoder can model the upsampling of the sparse code and identify which dots have been nudged to better match reference signal extrema, such as the dots in FIG. 69D. The decoder then applies corrective nudging to each such dot before extracting the encoded message.) In some embodiments, the nudging is a small fraction of a waxel or a small fraction of a printed dot row / column, as needed for decoding with maximal fidelity.

[0321] Decoding can also be aided by converting the captured image back to the print resolution for decoding, rather than converting back to the original tile resolution.

[0322] As in other embodiments, in very sparse signals the reference signal may be difficult to detect due to lack of ink. As before, this may be remedied by adding further dots at locations corresponding to additional extrema in the reference signal. The detector is configured to ignore the dots at these additional locations when extracting the message signal, where they serve only as reference signal data. (Alternatively, if a prior art detector is used and does not ignore such additional dots, convolutional coding of the message bits will generally allow correct recovery of the payload despite the additional dots.)

[0323] In this fourth embodiment, experiments suggest that if a dot is detected at a location, this means with fair certainty that there is zero probability of a "1" message bit being represented at that location. However, if the dot is not detected, everything is less certain, and the probability that a "0" bit is represented depends on the value of the reference signal at that location.

[0324] As the value of the reference signal approaches zero (dark), the probability that a "0" bit is represented correspondingly vanishes (and the probability that a "1" bit is represented correspondingly increases). However, as the reference signal increases in value (e.g., above 128), not detecting the mark is associated with a lower probability decision. Either a "1" can be represented, or a "0" is possible. At values ​​above about 128, it is a coin flip. Such tentative probability assessments can be provided to a soft decoder, along with the respective waxel values, for enhanced decoding.

[0325] The four just discussed embodiments use reference signals with a random appearance, but in other implementations, reference signals with a structured appearance (e.g., as in Figures 36 and 36A) may be used instead.

[0326] In some implementations of the foregoing embodiments, the candidate extrema of the reference signal are filtered to enforce distance constraints (no-go regions), e.g., such that no two extrema (individual elements, or dyads) are closer than a threshold distance from each other. In some such embodiments, the no-go regions may be asymmetric about the horizontal and / or vertical axes (e.g., as shown in Figures 55-57D).

[0327] In other implementations, dots may be clustered depending on the value of the reference signal extremum. In one such configuration, if a first and a second edge or corner adjacent waxel are both among the 1024 lowest valued reference signal values ​​in the tile and one of them is among the x lowest valued reference signal values ​​(where x is, for example, between 20 and 200), then they may both be marked (or, in the case of marks representing bits, may serve as a candidate for marking) despite their proximity. If a third waxel edge or corner is adjacent to both the first and second waxels and is also among the 1024 lowest valued extremums, then it may also be marked. The same is true for a fourth extremum waxel adjacent to the previous three waxels. In this last case, a 2x2 region of waxels is marked. (Such a configuration might result in some 2x2 marked areas, some further clumps of 3, and still further clumps of 2, but no more than X such clumps in total per tile.)

[0328] Dot coalescence is most commonly used when the contrast between the dot color and the substrate color is not noticeable due to the insensitivity of the human visual system. For example, a dot of Pantone 9520C ink (a very light green) on a white substrate is difficult for a human to distinguish. However, a red light scanner of the kind used at supermarket point-of-sale stations can easily distinguish such markings. (Further information regarding Pantone 9520C ink, and its uses, is provided in U.S. Patent Publication No. 20180047126.)

[0329] Although reference has been made to sorting the values ​​of image elements to identify extreme values, techniques other than sorting may essentially be used. For example, a thresholding operation may be applied to identify reference signal waxels having values ​​below, say, 30. If that operation does not yield enough locations, the threshold may be raised to 40 and applied to locations that did not pass the previous thresholding test, etc. The threshold may be raised until the required number of points is identified. (This smaller set of points may then be sorted if required for a particular implementation.)

[0330] It should be appreciated that while significant decoding advantages are achieved by predictably ignoring empty regions in the captured images, identifying such regions typically first requires geometric registration of the captured images, e.g., correcting for affine distortion. Determining affine distortion is performed by considering the complete set of captured images, and no regions are ignored at this stage of computation. Ignoring empty regions is used after registration to enhance decoding of message bits.

[0331] It should be understood that the sparse patterns resulting from the first to third embodiments described above cannot be decoded using the cited prior art watermark decoders. Although geometric registration of images depicting such patterns (e.g., determining their affine transforms) can proceed in the conventional manner, the representation of the message signal itself is unconventional and must be performed by a decoder designed for this purpose.

[0332] The sparse pattern resulting from the fourth embodiment may be decoded using the cited prior art watermark decoders, but this should not be the case as such decoders would not know to ignore empty regions as predicted by the sparse code.

[0333] In a preferred implementation, the decoder is multifunctional, capable of applying different decoding procedures to different marks: such a decoder makes an initial determination of the type of encoding used to represent the message signal and applies the corresponding decoding method.

[0334] In one such configuration, the type of encoding is signaled by the presence or absence of some spatial frequencies in a reference signal. As mentioned, this reference signal typically contains several tens of different spatial frequencies (and phases). Some more spatial frequencies (e.g., 1-10) may be added (or removed) to act as flags indicating to a compliant detector that a particular one of the encoding procedures just detailed is being used, and that a corresponding decoding method should be used as well. That is, such a detector examines the reference signal to determine whether some flag spatial frequencies are present (or absent) in the reference signal, and applies a decoding method corresponding to the output of such a decision. The presence or absence of such frequencies does not interfere with the purpose of the reference signal to enable synchronization of the decoder to the message signal, since the synchronization process is robust to various distortions of the reference signal.

[0335] In another embodiment, the decoder starts by compensating the captured image for affine distortion using a reference signal in a conventional manner. The decoder then examines the locations used for marking in the embodiments described above and the locations that should be empty. The decoder decides which are to be marked and which are not. If some threshold number K of marks are found in locations where a particular embodiment should not have marks, that embodiment is eliminated. Similarly, if some threshold number M of unmarked areas are found in locations where a particular embodiment should have marks, that embodiment is eliminated. By a process of elimination, the decoder narrows the possibilities to preferably one, or in some cases two, particular embodiments that may be in use. The decoder then applies the decoding algorithm for one embodiment, and if it does not yield valid data (e.g., as indicated by checksum information), the decoder applies the decoding algorithm for the second embodiment (if still a candidate).

[0336] One particular implementation identifies tile locations that should not have any markings by identifying extrema of the bright reference signal, i.e., values ​​greater than 128. This can be done by sorting the reference signal samples for the 16,384 tile locations to be identified, e.g., the 1024 highest value extrema. A similar number of the lowest value (darkenest) extrema of the reference signal are determined conversely. If the number of dots in the location associated with the lowest value extrema is J times the number of dots in the location associated with the highest value extrema (J is, for example, 2, or 3, or more), the input signal is apparently a sparse mark and a sparse decoding procedure can be applied. Otherwise, a conventional watermark decoding procedure can be applied.

[0337] A related configuration computes two correlation metrics from the input signal after 8-axis filtering (e.g., producing output values ​​in the range -8 to 8) and geometric registration. The first metric, called "sparseLocs", is based on the signal values ​​at a set of locations, e.g., 1024, where the reference signal has the lowest (darkest) value. The second metric, called "compLocs", is based on the signal values ​​at a set of locations, e.g., 1024, where the reference signal has the highest (brightest) value.

[0338] The first metric, "sparseLocs", is calculated as follows: sparseMet=-sum(x(sparseLocs)) / sqrt(x(sparseLocs)'*x(sparseLocs))

[0339] The second metric, "compMet", is calculated as follows: compMet=sum(x(compLocs)) / sqrt(x(compLocs)'*x(compLocs)) where x(sparseLocs) is a vector (e.g., a row vector) of tile values ​​at the 1024 sparseLocs locations, and X(sparseLocs)' is its transpose. Similarly for x(compLocs).

[0340] When applied to images marked with a continuous-tone watermark, both metrics have approximately the same value. However, when applied to images marked with a sparse code, the metrics diverge, with sparseMet having values ​​that are typically 4-10 times larger than the value of compMet.

[0341] These metrics can of course be based on more or fewer points. In one alternative, sparseMet is based on a fixed set of marks (representing only the reference signal), while compMet is based on the same number of brightest values ​​in the reference signal tiles.

[0342] Yet another approach to distinguish a sparse input signal from a conventional continuous-tone watermark signal is by referring to the spatial frequency structure of the reference signal. Representing the reference signal by a sparse selection of extremum points distorts its spatial frequency structure somewhat. For example, higher frequency components, when represented by sparse extremum dots, have higher amplitude than lower frequency components. Extremums that are always marked to boost the reference signal contribute, on average, to a stronger signal component than extremums that may be present or absent depending on the message bit values, etc.

[0343] A conventional watermark decoding process involves correlating a Fourier transform of the captured image signal with a template of a reference signal (i.e., a matched filter operation). The decoder can apply two such matched filtering operations to the transformed image signal, one determining the correlation with a conventional continuous-tone reference signal, and the other determining the correlation with a distorted counter-part associated with a sparse selection of reference signal extrema (e.g., some of the extrema that are at half intensity due to bit modulation). If the captured image is found to better correspond to the latter signal, this indicates that the sparse mark has been decoded, and so a corresponding decoding process can be applied instead of the conventional decoding process.

[0344] Yet another approach to detect whether an input signal is sparse is to try different input filtering operations. Conventional watermark detectors typically use an 8-axis filter as described in various patent publications, including US 20180005343. Alternative filtering operations, such as a 5x5 pixel min-max filter kernel, or a donut filter, may be more suitable for sparse codes. (A min-max filter produces an output equal to the central element value divided by the difference between the maximum and minimum values ​​of a 5x5 element region centered on the central element. A donut filter determines the correlation of a 5x5 element patch with a reference pattern consisting of black elements surrounded by white elements, for example.) By running both the 8-axis filter and one of the alternative filters on the input data and examining the results, the type of input data can be distinguished as either a conventional watermark or a sparse watermark.

[0345] Just as the presence or absence of certain spatial frequencies in a reference signal can be used to signal different encoding schemes, the same approach can additionally or alternatively serve to signal different print resolutions. For example, a sparse code printed on a 300 dpi printer may be composed of a reference signal containing spatial frequencies of 11 and 21 cycles per inch. A sparse code printed on a 203 dpi printer may be composed of a reference signal containing spatial frequencies of 13 and 19 cycles per inch. A decoder can distinguish such frequencies and convert the captured image to the corresponding resolution before extracting the message bits.

[0346] (Although the preceding discussion has referred to 1024-bit message strings, 47-bit payloads, 128x128 waxel tiles, etc., it should be recognized that these numbers are merely for illustrative purposes and may be varied to suit a particular application.)

[0347] In a particular implementation, the 1024-bit message string is formed as the concatenation of (a) a 100-bit string indicating the encoding protocol used in the code, followed by (b) a 924-bit string based on 47 bits of payload data. These latter bits are formed by concatenating the 47 bits of payload data with 24 corresponding CRC bits. These 71 bits are then convolutionally encoded at a rate of 1 / 13 to yield the 924 bits.

[0348] Above we mentioned soft decision decoding where 1024 message bits and corresponding reliability values ​​are input to, for example, a Viterbi decoder. In some embodiments, the reliability of a dark mark (signaling a "0" bit) is based on its darkness (e.g., 8-bit waxel value).

[0349] In one implementation, each candidate mark location is examined and those with a value less than 128 are considered dots, others are considered empty. The average value of the waxels with dots is then calculated. The average value may be, for example, 48. This may be considered the nominal dot value. The confidence of each dot is then determined based on its value's deviation from this nominal value. A dot with a value of 40 is treated as more confident. A dot with a value of 30 is still treated as more confident. Conversely, dots with values ​​of 60 and 70 are treated as less and less confident. The dot with the average value may be assigned a first confidence level (e.g., 85%), and lower and higher value dots are assigned higher or lower confidence values, respectively.

[0350] In another implementation, the nominal dot value is based on a fixed mark signaling a reference signal, and the message dot is then assigned a reliability value relative to the average value of the fixed marks.

[0351] Sometimes fixation marks and message marks are not printed, for example, if dots in a portion of a code tile are suppressed due to their location within a text-based keep-out zone. Figure 70 provides an example showing an infinitesimal portion of a label. The circles indicate where fixation marks would normally be placed, but are suppressed due to the presence of text. (Message marks close to the text are similarly suppressed, but their absence is not marked.)

[0352] According to another aspect of the present technology, these absent fixed marks serve to demarcate regions of labels (indicated by dashed rectangles and aligned with waxel rows) where all data is unreliable. Dots in candidate message positions may not reliably signal a "0". Missing dots in candidate locations (such as in the second embodiment above, where the encoding scheme is such that some empty regions signal a "1" message bit) may not reliably signal a "1". Data extracted from such regions, whether signaling a "1" or a "0" bit value, are all assigned a very low confidence value (e.g., zero).

[0353] Fig. 71A shows an illustrative method according to the foregoing that may be practiced by a printer, for example in the deli or bakery department of a retail store, and Fig. 71B shows a corresponding method that may be practiced by a point-of-sale retail scanner.

[0354] From the foregoing, it will be appreciated that improved sparse messaging, in which the dot density is much lower than in the prior art, can be achieved by providing the decoder with a priori knowledge of the candidate dot locations, enabling the decoder to ignore predictably empty regions of the captured image and the phantom image signals that such regions may represent. Specific Implementations

[0355] The following discussion provides additional details regarding specific implementations based on the above fourth embodiment. Unless otherwise specified, the features discussed above may be used with these detailed implementations.

[0356] In this configuration, the reference signal consists of 32 or less, e.g. 16, spatial sinusoids. These reference frequencies are a subset of the (more than 32) frequencies that form the reference signal in the continuous-tone watermark. This allows the synchronization algorithm for the continuous-tone watermark to also perform synchronization for this sparse watermark.

[0357] The reference signal is represented in a tile of size 128x128 waxels. The 1500 darkest local extrema in this reference signal are determined. This may be done by computing the reference signal value at each point in a finely spaced grid across the tile (e.g., 1 million uniformly spaced points) and sorting the results. The darkest point is chosen and points close to it (e.g., within a no-go distance of one or two waxels) are disqualified. The darkest point is then chosen and points close to it are disqualified. This process continues until 1500 points have been identified. (Though tedious, this process only needs to be performed once.) This results in a table that lists, in floating point, the X and Y coordinates of the 1500 local extrema in the reference signal tile. These 1500 darkest locations are called "printable locations".

[0358] Of the 1500 printable locations, the 300 darkest locations are always marked (black) in the output signal (optical code) so as to strongly represent the extremes of the reference signal (the "always dark" locations). The remaining 1200 candidate locations ("variable data locations") are either marked or not marked depending on whether the corresponding element of the message signal tile conveys a "0" or a "1". (Hereafter, we use the equivalent -1 / 1 notation for the two states of a binary signal.)

[0359] A list of floating point X and Y coordinate values ​​for the 300 constantly dark locations and for the 1200 variable data locations are stored as side information in the data table of the exemplary decoder.

[0360] In this particular implementation, the tiles are printed at a scale of approximately 150 Waxels Per Inch (WPI). At 150 WPI, each tile spans 128 / 150, or approximately 0.85 inches.

[0361] Although the locations of the extremes are known with floating-point resolution, actual printing hardware can only produce marks at discretely spaced locations. Popular printers have printheads that produce output markings at resolutions of 203 dots per inch (DPI) and 300 DPI. These resolutions require interpolation (e.g., by bilinear or bicubic interpolation) of 128x128 message tiles.

[0362] In DPI independent encoding, the encoder looks up a -1 or +1 value in the interpolated message array at the location closest to each printable variable data location. If the interpolated message has a "-1" value at that location, the variable data location in the output code is marked. If the interpolated message has a "1" value at that location, the variable data location in the output code remains unmarked.

[0363] At the decoder, after the marked image has been geometrically registered, decoding can proceed by interpolating from within the registered image data to determine signal values ​​at variable data locations defined by the stored floating-point X and Y coordinate values.

[0364] It should be recognized that in such a configuration, the decoder sees the exact locations of the extrema during decoding, but the encoder could not place marks at those exact locations. This is a compromise, but it works regardless of the DPI of the printing hardware, i.e., the decoder does not need to know the DPI of the printer.

[0365] A variant configuration can be used if the DPI of the printing hardware is known (or determinable) by the decoder. In such a case, instead of identifying extreme values ​​in the high resolution reference signal (i.e., resulting in floating point coordinates), the reference signal values ​​are sampled at the center of each of the locations that the printer can mark within the reference signal tile, for example at 203 DPI. The 1500 darkest extreme values ​​are identified from this smaller sampled set.

[0366] A tile that is 128 waxels wide at 150 WPI, when printed at 203 dpi, calculates to be 173.23 dots wide. That's a tricky number to work with. It's better for each tile to have a size in dots that is an integer, and preferably divisible by 2. In this illustrative implementation, 174 is chosen as the tile dot size, a value divisible by 4. This results in a WPI value of (203*128) / 174=149.33 WPI, a negligible difference from the nominal 150 WPI value.

[0367] The reference signal is calculated at sample points (quantization points) across a tile of 174x174 dot locations (i.e., 30,276 dots). The 1500 sample points with the smallest (darkest) values ​​are identified as printable locations. (Again, no-go zones can be used if desired.) As before, the very darkest 300 locations act as always dark locations, while the other 1200 act as variable data locations.

[0368] Again, a listing of these locations is provided to the decoder as side information, but instead of being expressed as floating point coordinates, the printable locations may be identified simply by their row / column number within a 174x174 dot tile.

[0369] In this variant configuration, the decoder looks for marks at the locations of the dots (and the marks are printed at these same dot locations), as opposed to the previous configuration where the decoder looks for marks at floating point locations (and the marks are printed slightly differently even though the exact locations of the dots are not known).

[0370] One particular decoder uses a hybrid of the previous configurations. Such a decoder has stored side information that represents the coordinates of printable locations in both forms, as floating-point coordinates and as row / column coordinates based on 203 DPI. To decide which to apply, after performing a geometric registration of the input tile, the decoder does a preliminary search of, say, 100 of the locations that are always dark, using both the floating-point coordinates and the 203 DPI row / column coordinates. If the latter set of coordinates results in image samples that are darker on average than the former set of coordinates, the decoder knows that the code was printed at 203 DPI and searches all of the printable locations using the row / column data. Otherwise, the decoder uses the floating-point coordinates.

[0371] Such an arrangement may be extended to include other DPIs as well, for example a decoder may have printable locations defined by floating point coordinates, row / column coordinates within a 203 DPI tile, and row / column coordinates within a 300 DPI tile. Each may be tested. If the row / column coordinate at 203 or 300 DPI results in a darker sample, it may be used, otherwise the floating point coordinates may be used.

[0372] Figure 72A illustrates one particular embodiment of an encoder 720. Data to be conveyed by the optical code (e.g., user data and associated CRC bits, totalling N bits) is provided to an error correction coding module 711. This module applies convolutional coding (e.g., tailbite coding at a ratio of 1 / 13) and, optionally, repetition coding. It produces as its output a longer (M-bit) string, or signature. In a particular embodiment, M=1024.

[0373] Each bit of the signature is XORed 712 with each element of a multi-element binary spreading key 713. An 8-element key is shown in FIG. 72A, but keys of other lengths may be used (e.g., 4 or 16 elements). This operation converts a single bit of the signature (e.g., "bit-K") into eight corresponding binary "chips" of -1 or +1 value. A distribution table 714 assigns each of the chips to a different location within the message tile 715, as indicated by the "+" and "-" symbols in FIG. 72A.

[0374] Tile 715 has 1500 printable locations and many more non-printable locations. Some of the printable locations are always black, reducing the number of printable locations available to represent chips. In the depicted FIG. 72A tile, the circles represent printable locations available to represent chips and that are mapped to the chip associated with bit-K. (It is rare that a chip for a single signature bit is assigned to two printable locations.) The distribution table maps one chip with a "+1" value to one printable location and another chip with a "-1" value to another printable location. As discussed above, only one of these two different binary values ​​results in a printing mark, here -1. The location to which the +1 chip is assigned remains unprinted. Thus, the chip for bit-K is assigned to two locations, but only one location is marked. (When chips are assigned to two locations and both chips have the same value, either (a) if the chips have a value of -1, then both chip locations are marked, or (b) if the chips have a value of +1, then neither chip location is marked.)

[0375] In this implementation, each of the M-bit signatures is spread by the same spreading key.

[0376] (Not shown in FIG. 72A is the scrambling operation applied to the M-bit signature by XORing each of its bits with the corresponding bit of an M-bit scrambling key. This results in a keyed M-bit signature from which the chips are derived. A reciprocal unscrambling operation is performed during decoding. Such scrambling / descrambling is straightforward and is not repeated any further.)

[0377] When a particular tile encoded according to the method described above was analyzed (but using a 16-bit spreading key, resulting in 16 chips per signature bit), it was found that 344 bits of the M=1024-bit signature were not mapped to any of the variable data locations - i.e., none of the 16 chips associated with each of these 344 bits were assigned to one of the 1200 variable data locations.

[0378] Each of the 382-bit signature bits was mapped to one of the variable data locations, i.e., of the 16 chips associated with each of these 382 bits, one chip for each was mapped to a variable data location by the distribution table.

[0379] Each of the 210-bit signatures was mapped to two of the variable data locations, i.e., the two chips representing each of these 210 bits found one location out of the 1200 variable positions. (This is the case for bit-K in Figure 72A.)

[0380] 75 of the 1024 signature bits were represented by three chips each.

[0381] A smaller number of bits in the signature were represented by 4 to 6 chips in the variable data location.

[0382] Despite the odds being rather difficult (e.g., only 1200 variable data locations out of 30,276 tile locations and 344 bits (slightly over one-third) of the 1024-bit signature are known to represent nothing), the originally input user data / CRC can be recovered with a robustness comparable to other schemes that result in much more noticeable markings. As will be noted, this is due in part to the decoding scheme ignoring most of the input image data and only looking at locations where data is known to possibly be encoded.

[0383] A complementary decoder embodiment is shown in Figure 72B. This decoder first performs geometric synchronization on the captured image based on 300 always dark marks and approximately 600 dark marks that serve dual purposes representing both reference signal extrema and "-1" chips. Once the code is synchronized, it is resampled, for example, at 128x128 WPI and / or 174x174 DPI intervals.

[0384] The decoder knows the locations of the 300 always dark places (due to stored side information). It determines the luminance (or chrominance) statistics at some or all of these locations, e.g., finds the average luminance value (on an 8-bit binary scale) and standard deviation across the always dark places. The decoder then looks at the remaining 1200 variable data locations (where the decoder knows the x and y locations from stored information) and notes the luminance at each. Any locations that have a luminance within a given threshold of the average luminance just calculated for the always dark places (e.g., have a value less than 1.5 standard deviations above the mean) are considered dark and assigned a chip value of "-1". Any other locations out of the 1200 that do not meet this test are considered bright and assigned a chip value of "+1".

[0385] Each of the chip values ​​discerned from the 1200 printable locations is mapped to an associated bit of the signature and despread (e.g., by XORing with the associated element of the spreading key) to indicate the value of that signature bit. If a bit of the signature is represented by more than one chip at a printable tile location (as in FIG. 72A), the signature bit values ​​respectively indicated by these chips are summed. In the absence of errors, each such chip will consistently indicate the same signature bit value, and the sum of the multiple chips will be +2 or +3 or -2 or -3, etc. Higher absolute values ​​indicate to the decoder successively higher confidence in the value of that particular signature bit. In the presence of errors, and two such chips indicate opposing bit values ​​for the signature bit, the sum of the multiple chips is equal to zero. This indicates to the decoder that there is no information available regarding the value of that signature bit.

[0386] As stated, many of the 1024 signature bits originally encoded are not represented in the optical code; none of those bits map to printable variable data locations. These are treated as missing bits in the signature and are similarly assigned a value of "0" when presented for decoding.

[0387] The reconstructed signature is then assembled and presented to a Viterbi decoder, which (in conjunction with an optional iterative decoder) outputs an N-bit string of data including the encoded user data and the decoded CRC bits. The CRC bits are used to check the user data, and after a match is found, the user data is output to the receiving system.

[0388] As stated, more than one third of the 1024 scrambled signature bits do not see representation in the optical code (in this particular embodiment). This is because the distribution table (1) maps most of the corresponding chips to locations in the tile that are not among the 1500 printable locations, or (2) maps them to locations always reserved for dark marks. In variant embodiments, the distribution table is designed to map the chips representing the 1024 signature bits differently so that each finds representation in at least one of the 1200 variable data locations. However, applicant prefers the detailed configuration because the distribution table can be the same one used with existing continuous-tone watermarks, thus protecting backward compatibility. (Another variant involves redesigning the reference signal so that the dark extremes fall where the existing distribution table maps at least one chip for each scrambled signature bit, but this also hinders backward compatibility.)

[0389] It should be understood that the number of 1500 printable locations (as well as the component numbers of 300 always dark locations and 1200 variable data locations) can be varied as different applications dictate. By increasing the number of always dark locations, the reference signal becomes more resilient (i.e., more robust) to interference. By increasing the number of variable data locations, the message signal becomes more resilient to interference. By decreasing the number of printable locations, the code becomes less noticeable.

[0390] The decoder can auto-detect which of the various encoding protocols is used. For example, different protocols may have the following always dark locations and variable data locations (identified from a ranked list of reference signal extrema): [Table 4]

[0391] All of the protocols share the same reference signal. Protocol A is as described above. Protocol B has 100 more dark locations and 100 fewer variable data locations than Protocol A. Protocol C has 200 more dark locations and 300 more variable data locations than Protocol A. The decoder is provided with a ranked list of the 2500 darkest locations, each with its coordinate values.

[0392] When an image is captured (and geometrically registered using a reference signal represented by printed dots), the decoder looks at the locations ranked 1-300 (which should be dark in all protocols) and generates luminance (or chrominance) statistics, e.g., mean and / or standard deviation, for these always dark locations. This information is then used to evaluate the image to see if it is coded with protocol A, B, or C.

[0393] In particular, the decoder looks at locations 301-400, which should always be dark in both protocols B and C. If the statistics for these 100 locations match the statistics for locations 1-300 to a specified degree of match, then locations 301-400 are also considered always dark. (The specified degree of match could be, for example, having an average within +20% / -20% of the other's average and / or a standard deviation within +30% / -30%.) If no such match is found, the protocol is known to be protocol A, and the decoder proceeds as above, looking at the extreme locations ranked 301-1500 to discern user data.

[0394] If locations 301-400 are determined to be always dark, the decoder looks at locations 401-500. If the statistical data for these locations matches the statistical data for locations 1-300 within a specified degree of match, locations 401-500 are also considered to be always dark. In this case, the detector knows that the image is marked according to protocol C. The detector then looks at extreme locations ranked 501-2500 to identify user data. If the statistical data does not match, the detector knows that the image is marked according to protocol B. The detector then looks at extreme locations ranked 401-1500 to identify user data.

[0395] This is a simple example. In more complex configurations, there may be additional encoding protocols that are differentiated as well. Also, the decoder may use different distribution tables, spreading keys, scrambling keys, etc. depending on the identified protocol (based on the number of locations identified as always dark). Operating environment

[0396] The above method is implemented in software instructions or digital circuits that are configured in modules. These modules include an optical code optimizer, a generator, an inserter, and a decoder. Regardless of any particular discussion of the embodiments set forth herein, the term "module" refers to software instructions, firmware, or circuits configured to perform any of the methods, processes, functions, or operations described herein. The software may be embodied as a software package, code, instruction, instruction set, or data recorded in a non-transitory computer-readable storage medium. For example, software instructions to perform detailed functions written in MATLAB, C, C++, Visual Basic, Java, Python, Tcl, Perl, Scheme, Ruby, etc., together with associated data, may be written by an engineer without undue experimentation from the description provided herein. The firmware may be embodied as code, instruction, or instruction set, or data that is hard-coded (e.g., non-volatile) into a memory device. As used herein, the term "circuitry" may include, for example, alone or in any combination, hardwired circuitry, programmable circuitry such as a computer processor with one or more individual instruction processing cores, state machine circuitry, or firmware that stores instructions executed by a programmable circuit.

[0397] Implementations may additionally or alternatively use special purpose electronic circuits that are custom designed and manufactured to perform some or all of the component operations as an Application Specific Integrated Circuit (ASIC). To achieve such implementations, the relevant module(s) (e.g., encoding and decoding of optical codes in host image content) are first implemented using a general purpose computer using software such as MATLAB (from Mathworks, Inc.). A tool such as HDL Coder (also available from Mathworks) is then used to convert the MATLAB model to VHDL (an IEEE standard) or Verilog. The VHDL output is then applied to a hardware synthesis program such as Design Compiler by Synopsis, HDL Designer by Mentor Graphics, or Encounter RTL Compiler by Cadence Design Systems. The hardware synthesis program provides output data that specifies a particular array of electronic logic gates that implements the technology in hardware form, as a special purpose machine dedicated to such purpose. This output data is then provided to a semiconductor fabrication contractor who uses it to produce customized silicon parts. (Suitable contractors include TSMC, Global Foundries, and ON Semiconductors.)

[0398] HDL coders can also be used to create field programmable gate array implementations. FPGAs can be used to prototype ASICs or as implementations within FPGA chips that are integrated into electronic devices.

[0399] For illustrative purposes, FIG. 73 is a diagram of an electronic device in which the optical code generator, inserter, optimizer, and decoder components described above may be implemented. This is not intended to be limiting, as embodiments may be implemented in other device architectures or electronic circuits. For example, an electronic device represents a computer in which program instructions for generating, optimizing, inserting, and decoding optical codes are stored and executed to perform the methods described in this document. An electronic device also represents special-purpose computer systems such as thermal label printers, label printers, and meters with barcode scanners. An electronic device also represents head-worn devices such as virtual and augmented reality eyewear and headsets. Like more general-purpose computers and mobile devices (e.g., smartphones and tablets), these devices also include memory for storing firmware implementations of these methods and processors for executing them. They may also include the above-referenced FPGA or ASIC implementations of the optical code optimizer, generator, inserter, and / or decoder.

[0400] Referring to FIG. 73, a system for an electronic device includes a bus 300 to which a number of devices, modules, etc. (each of which may be generally referred to as a "component") are communicatively coupled. The bus 300 may combine the functionality of a direct memory access (DMA) bus and a program input / output (PIO) bus. In other words, the bus 300 may facilitate both DMA transfers and direct CPU read and write instructions. In one embodiment, the bus 300 is one of the Advanced Microcontroller Bus Architecture (AMBA) compliant data buses. Although FIG. 73 illustrates an embodiment in which all components are communicatively coupled to the bus 300, it should be understood that one or more subsets of the components may be communicatively coupled to a separate bus in any suitable or beneficial manner, and any component may be communicatively coupled to two or more buses in any suitable or beneficial manner. Although not illustrated, the electronic device may optionally include one or more bus controllers (e.g., a DMA controller, an I2C bus controller, or the like or any combination thereof) through which data may be routed between some of the components.

[0401] The electronic device also includes a CPU 302. The CPU 302 may be a microprocessor, mobile application processor, or the like known in the art (e.g., reduced instruction set computer (RISC) from ARM Limited, Krait CPU family, X86-based microprocessors including those in the Pentium, Xeon, Itanium, Celeron, Atom, Core i-series family of products available from Intel Corporation, etc.). The CPU 302 executes an operating system of the electronic device, executes application programs, and optionally manages various functions of the electronic device. The CPU 302 may include or be coupled to a read-only memory (ROM) (not shown), which may hold an operating system (e.g., a "high-level" operating system, a "real-time" operating system, a mobile operating system, or the like or any combination thereof) or other device firmware executing on the electronic device.

[0402] The electronic device may also include a volatile memory 304 electrically coupled to the bus 300. The volatile memory 304 may include, for example, any type of random access memory (RAM). Although not shown, the electronic device may further include a memory controller that controls the flow of data to and from the volatile memory 304.

[0403] The electronic device may also include a storage memory 306 connected to the bus. The storage memory 306 typically includes one or more non-volatile semiconductor memory devices, such as ROM, EPROM and EEPROM, NOR or NAND flash memory, or the like, or any combination thereof, and may also include any type of electronic storage device, such as, for example, magnetic or optical disks. In an embodiment of the invention, the storage memory 306 is used to store one or more items of software. The software may include system software, application software, middleware (e.g., Data Distribution Service for Real-Time Systems (DDS), MER, etc.), one or more computer files (e.g., one or more data files, configuration files, library files, archive files, etc.), one or more software components, or the like, or any stack or other combination thereof.

[0404] Examples of system software include an operating system (e.g., one or more high-level operating systems, real-time operating systems, mobile operating systems, or the like or any combination thereof), one or more kernels, one or more device drivers, firmware, one or more utility programs (e.g., that help analyze, configure, optimize, manage, etc., one or more components of the electronic device), and the like.

[0405] Also connected to the bus 300 is a user interface module 308. The user interface module 308 is configured to facilitate user control of the electronic device. Accordingly, the user interface module 308 may be communicatively coupled to one or more user input devices 310. The user input devices 310 may include, for example, a button, a knob, a touch screen, a trackball, a mouse, a microphone (e.g., an electret microphone, a MEMS microphone, or the like or any combination thereof), an IR or ultrasonic emitting stylus, an ultrasonic generator (e.g., for detecting user gestures, etc.), one or more structured light generators (e.g., for projecting structured IR light to detect user gestures, etc.), one or more ultrasonic transducers, or the like or any combination thereof.

[0406] The user interface module 308 may also be configured to present to a user the effects of user controls of the electronic device, or any other information related to operations being performed by or functions otherwise supported by the electronic device. Accordingly, the user interface module 308 may also be communicatively coupled to one or more user output devices 312. The user output devices 312 may include, for example, a display (e.g., a liquid crystal display (LCD), a light emitting diode (LED) display, an active matrix organic light emitting diode (AMOLED) display, an electronic ink display, etc.), a printer, a loudspeaker, or the like, or any combination thereof.

[0407] Typically, the user input device 310 and the user output device 312 are an integral part of the electronic device, although in alternative embodiments, any user input device 310 (e.g., microphone, etc.) or user output device 312 (e.g., speaker, display, or printer) may be a physically separate device that is communicatively coupled to the electronic device (e.g., via a communications module 314). Printers encompass different devices for applying images carrying digital data to objects, such as 2D and 3D printers (thermal, intaglio, inkjet, offset, flexo, laser, gravure, etc.), as well as equipment for etching, engraving, embossing, or laser marking.

[0408] Although the user interface module 308 is illustrated as an individual component, it should be understood that the user interface module 308 (or portions thereof) may be functionally integrated into one or more other components of the electronic device (e.g., the CPU 302, the sensor interface module 330, etc.).

[0409] Also connected to the bus 300 are an image signal processor 316 and a graphics processing unit (GPU) 318. The image signal processor (ISP) 316 is configured to process images (still frame images, video images, or the like or any combination thereof) captured by one or more cameras 320 or by any other image sensor to generate image data. Common functions typically performed by the ISP 316 may include Bayer transformation, demosaicing, noise reduction, image sharpening, or the like or any combination thereof. The GPU 318 may be configured to process the image data generated by the ISP 316 to generate processed image data. Typical functions performed by the GPU 318 include compressing image data (e.g., into JPEG format, MPEG format, or the like or any combination thereof), creating lighting effects, rendering 3D graphics, texture mapping, calculating geometric transformations (e.g., rotation, translation, etc.) to different coordinate systems, etc., and transmitting compressed video data to other components of the electronic device (e.g., volatile memory 304) via bus 300. Image data generated by the ISP 316, or processed image data generated by the GPU 318, may be accessed by a user interface module 308, where the image data is converted into one or more suitable signals that may be transmitted to a user output device 312, such as a display, printer, or speaker.

[0410] The communications module 314 includes circuitry, antennas, sensors, and any other suitable or desired technology that facilitates transmitting or receiving data (e.g., within a network) via one or more wired links (e.g., via Ethernet, USB, Firewire, etc.) or one or more wireless links (e.g., configured according to any standard or otherwise desired or suitable wireless protocol or technology, such as Bluetooth, Bluetooth Low Energy, WiFi, WiMAX, GSM, CDMA, EDGE, cellular 3G or LTE, Li-Fi (e.g., for IR or visible light communication), sonic or ultrasonic communication, etc.), or the like or any combination thereof. In one embodiment, the communications module 314 may include one or more microprocessors, digital signal processors or other microcontrollers, programmable logic devices, or the like or any combination thereof. Optionally, the communications module 314 includes a cache or other local memory device (e.g., volatile memory, non-volatile memory, or a combination thereof), a DMA channel, one or more input buffers, one or more output buffers, or the like or combination thereof. In some embodiments, the communications module 314 includes a baseband processor (e.g., performing signal processing and implementing real-time wireless transmission operations for the electronic device).

[0411] Also connected to the bus 300 is a sensor interface module 330 that is communicatively coupled to one or more sensors 333. The sensors 333 include, for example, scales for weighing items (such as scales used to weigh items and printed labels in retail or food manufacturing environments). Although illustrated separately in FIG. 73, any camera 320 may be considered a sensor 333. In general, the sensor 333 generates one or more signals (typically electrical signals) in the presence of some type of stimulus (e.g., light, sound, moisture, gravitational field, magnetic field, electric field, etc.), in response to a change in the applied stimulus, or the like, or any combination thereof. In one embodiment, all sensors 333 coupled to the sensor interface module 330 are an integral part of the electronic device, but in alternative embodiments, one or more of the sensors may be physically separate devices that are communicatively coupled to the electronic device (e.g., via the communication module 314). To the extent that any sensor 333 is operable to detect user input, such sensor 333 may also be considered a user input device 310.

[0412] The sensor interface module 330 is configured to enable, disable, or otherwise control the operation (e.g., sampling rate, sampling range, etc.) of one or more sensors 333 (e.g., according to instructions stored internally or externally in the volatile memory 304 or storage memory 306, ROM, etc., according to commands issued by one or more components, such as the CPU 302, the user interface module 308, etc.). In one embodiment, the sensor interface module 330 can encode, decode, sample, filter, or otherwise process signals generated by one or more of the sensors 333. In one example, the sensor interface module 330 can aggregate signals generated by multiple sensors 333 and, optionally, process the aggregated signal(s). The signals may be routed from the sensor interface module 330 to one or more of the aforementioned components of the electronic device (e.g., via the bus 300). However, in another embodiment, any signal generated by the sensor 333 may be routed (e.g., to the CPU 302) before being processed.

[0413] In general, the sensor interface module 330 may include one or more microprocessors, digital signal processors or other microcontrollers, programmable logic devices, or the like, or any combination thereof. The sensor interface module 330 may also include a cache or other local memory device (e.g., volatile memory, non-volatile memory, or a combination thereof), a DMA channel, one or more input buffers, one or more output buffers, and any other components that facilitate the functions it supports (e.g., as described above).

[0414] Other suitable operating environments are detailed in the documents incorporated by reference. conclusion

[0415] Although the principles of the present technology have been described and illustrated with reference to specific implementations, it should be recognized that the present technology can be embodied in many other different forms.

[0416] For example, although some of the detailed techniques for generating sparse marks involve filling empty output tiles with dots until a desired print density is reached, different approaches may be used. For example, output signal tiles that are too dark may be generated first (e.g., by including too many dark dots), and then some of the dark dots may be selectively removed based on various criteria.

[0417] For example, if 10% print density is desired, the darkest 15% of the pixels in the high density grayscale composite signal 78 may be copied as dark dots in the initial output signal frame. The frame may then be examined for the pair of dots that are most closely spaced, and one of the two dots may be discarded. This process is repeated until a dot is discarded and the print density is reduced from 15% to 10%. The remaining array of dark dots is thus augmented to increase the average inter-pixel distance, improving visual appearance compared to the simple approach described above. (For example, if the simple approach described above has an inter-pixel spacing constraint of 6 pixels, many pixel pairs will have this threshold spacing. However, if the output tile is initially overcrowded and then sparsely populated by the procedure detailed, fewer of the remaining dots will be at this threshold spacing from their nearest neighbors. Here, the tradeoff may be signal strength, but in many applications signal strength is less important than visual aesthetics.)

[0418] Similarly, an initially densely populated output frame may be sparsed based on criteria such as optimizing information efficiency (e.g., boosting the signal due to white pixels) and achieving an approximately uniform distribution of signal strength among different bit positions of the payload, as discussed above.

[0419] Unless otherwise noted, the term "sparse" as used herein refers to a two-color code in which 50% or less of the substrate is marked to yield a contrasting mark (e.g., ink on a white substrate, or a light void surrounded by a contrasting ink). More typically, a sparse mark will have less than 30% of the substrate so marked, with print densities of 2-15% being most common.

[0420] It should be noted that sparse techniques of the kind detailed in this patent document can be used in conjunction with continuous tone artwork, for example, on food and other packaging. For example, a sparse code could be over CMYK and / or spot color artwork, for example depicting a photographic image. Similarly, a sparse code could be used in flat (e.g., white) areas of the packaging, while other areas of the packaging with continuous tone artwork could be encoded using prior art watermarking methods.

[0421] In cereal box artwork, for example, the continuous tone illustration of the cereal may be watermarked using the prior art methods referenced above. The black text may be encoded with sparse marks in a first contrasting color. The area between the black text and the cereal illustration (e.g., a yellowish spot color) may be encoded with sparse marks in a second contrasting color. Thus, a single package may contain two or three (or more) different forms of encoding, all carrying the same payload. Desirably, the reference signals contained in all marks are geometrically consistent, i.e., indicating common values ​​of scale and rotation relative to the decoding device, as well as a common origin relative to the translational reference frame.

[0422] The sparse code may be applied by a monochrome printing technique such as thermal or inkjet. Alternatively, the sparse code may be applied by the same printing technique used for the CMYK or spot color printing of the packaging artwork, such as offset or flexographic printing, and in some cases applied by the same printing plate that prints the host artwork elements.

[0423] Mention has been made of continuous-tone watermarking and watermarks. Such signaling is characterized by complementary adjustments to the host signal to represent "1" and "0" message bits. For example, the luminance of the host artwork may be increased in some places (e.g., at the waxels) and decreased in others. Or the chrominance of the host artwork may be adjusted in one color direction (e.g., more blue) in some places and in a different color direction (e.g., less blue or more yellow) in other places. The complementarity of such adjustments is in contrast to sparse marks, where all adjustments are made in the same direction (e.g., decreasing the luminance).

[0424] Reference has been made to testing certain parameters to determine whether they are below a threshold (e.g., in selecting dark elements for copying to an output signal block). It should be appreciated that other embodiments may instead test whether a parameter is above a threshold, depending on implementation details. Both such cases may be encompassed by language such as testing whether a parameter has a value that passes a threshold test.

[0425] It should be appreciated that although the detailed implementation refers to tiles made up of square waxels arranged in rows and columns, this is not required - for example, tiles could be made up of elements arranged in hexagonal cells, etc.

[0426] Although this specification describes the reference signal components as consisting of sine waves of different spatial frequencies, the reference signal may alternatively or additionally include orthogonal patterns, which may also be varied in amplitude to obtain different looking patterns, for example using the configuration of Figure 34.

[0427] This specification makes repeated references to "image data," "images," and the like. It should be understood that such terms refer not only to pixel data and the like, but also to derivatives thereof. One example is a paired set of data generated by filtering pixel data (e.g., 8-axis filtering).

[0428] Although the detailed techniques are described in the context of forming a code by printing black dots on a white background (or vice versa), it should be recognized that the code can be formed in other ways. For example, a clear varnish or other surface treatment can be applied to locally vary the reflectivity of the surface, for example between glossy and matte. Similarly, the code can be formed in 3D form, such as by locally raised or recessed features. Laser engraving or 3D printing are some of the techniques that can be used. Laser ablation is well suited to generate sparse data markings on the skins of fruits and vegetables, for example to convey identifiers, harvest dates, expiration dates, and / or country of origin. (Sparse marks, as detailed herein, cause less damage to the fruit / vegetable than linear 1D barcodes, which are more likely to break the skin due to their elongated elements.)

[0429] Still other forms of marking may also be used. Consider plastic and cellophane food wrappers, which may be perforated to prevent condensation from forming and being trapped within the wrapper. The pattern of perforations may convey one of the sparse marks detailed herein. Or the perforations may convey the extrema of a reference signal and the message signal may be marked in another manner, such as by ink. The perforations may be made by a forming roller pressed against the plastic, which makes holes sized to allow air to escape but not food particles to escape.

[0430] While this specification focuses on sparse marks formed by black dots on a white substrate, it should be recognized that colored marks can be used on a white background or on a contrasting color (lighter or darker) background. Similarly, light marks can be formed on a black or colored background. In some embodiments, the color of the sparse markings can vary across a host artwork, such as a label. For example, the dots can be cyan in one area, black in a second area, and Pantone 9520 C in a third area.

[0431] In configurations where bright dots are formed on a dark background, "bright" pixels must replace "dark" elements in the algorithmic descriptions herein (and high signal values ​​replace low signal values).

[0432] Thermal printers commonly used for label printing have a finite life that depends in large part on thermal stress resulting from the number of times the individual print elements are heated and cooled. In some embodiments, it is preferable to avoid dot clumping, while in other embodiments, some clumping is advantageous, which can extend the useful life of the thermal print head.

[0433] For example, the configuration of the dots may be altered to improve visual quality or robustness, as discussed above in relation to Figures 39 and 40. There are several different configurations that may be used.

[0434] FIG. 74A shows a 4×4 configuration of marking locations, three of which are printed. A single thermal element prints all locations in a single column, indicated by the arrows. In FIG. 74A, there are six thermal wear events: three when the thermal element heats up to form a mark in a printer row, and three when the thermal element cools down to not form a mark in the next row. These thermally stressed events are indicated by circles. In this example, one print head element remains thermally unstressed.

[0435] Fig. 74B shows an alternating cell (dot) configuration. Again, three marks are made, but their locations are chosen to reduce thermal stress on the print head elements. Now there are only four thermal stress events. Two print heads remain unstressed.

[0436] Fig. 74C shows a further example: Again, three marks are made, but their positions are chosen such that cells are printed with only two thermally stressed events. Three print heads remain unused.

[0437] Returning to FIG. 40, in contrast to the rightmost 2×2 pattern, a 2×2 pattern that is less thermally stressed would be to mark two vertically adjacent locations and leave a horizontally adjacent location unmarked. Such a configuration is shown in FIG. 74D. Such signal blocks are particularly advantageous in some thermal printers that print at resolutions higher than 203 dpi (e.g., 300 pi). At such higher resolutions, a single dot may not convey as much signal (in a signal-to-noise sense) as is desired, but a complete 2×2 mark (as in the leftmost example of FIG. 40) would be too dark to be visually appealing. In such cases, the pattern of FIG. 74D may provide the best balance of signal and obscurity while prioritizing printer life.

[0438] A thermal stress score for a label may be generated by counting the total number of print head element heating and cooling events involved in printing the data markings throughout the label. The software used to design the label may include a slider control to establish the degree to which print head life should be prioritized (versus prioritizing the avoidance of agglomeration) in determining where the marks should be placed. As discussed above in connection with FIG. 34, the user interface may include a preview panel that shows the pattern being designed. The label designer may use the slider in conjunction with the preview panel to achieve the marking pattern that results in the lowest thermal stress score (e.g., a cell dither pattern as in FIG. 40 and FIG. 74A-D) while still providing a visually pleasing result.

[0439] Exemplary thermal printers are detailed in U.S. Patent Nos. 9,365,055, 7,876,346, 7,502,042, 7,417,656, 7,344,323, and 6,261,009. Direct thermal printers may use cellulosic or polymeric media that is coated with a thermal dye, for example, as detailed in U.S. Patent Nos. 6,784,906 and 6,759,366.

[0440] This specification refers to optimizing parameters related to visual quality and robustness such as spatial density, dot spacing, dot size, and priority of optical code components. It should be recognized that this is an incomplete list and that various other parameters may be optimized using the teachings herein, such as, for example, the intensity with which each payload bit is represented, the number of pixels conveying the desired information, the visual structure of the resulting mark, etc.

[0441] This specification sometimes refers to a pixel, but it should be recognized that this is shorthand for "picture element." A single such element may consist of multiple parts, e.g., a 2x2 or 3x3 element area. Thus, depending on the implementation, a pixel herein may be realized by a group of pixels.

[0442] This technology is sometimes implemented in printer-equipped scales used, for example, by grocery stores in their deli departments. Because such scales have simple processors, various optimizations can be used to ensure that the image processing that can be used to generate single-use adhesive label patterns does not slow down the workflow.

[0443] One such optimization is to pre-calculate a reference signal at the resolution of the printing mechanism (e.g., 203 dots per inch). This pattern is then cached and immediately available for combining with the (variable) message payload components.

[0444] In some embodiments, the payload components are created as two-color patterns at a fixed scale, such as 64x64 or 128x128 elements, and then upsampled to a grayscale pattern at the printing mechanism resolution (e.g., as shown and described in connection with FIG. 9). This upsampling can be time consuming depending on the interpolation algorithm. Bicubic interpolation has been shown to provide a good tradeoff between computational speed and accuracy on simple processors.

[0445] Some embodiments involve processing the pixels in a rank-dependent order in a composite dense code to fill the output block with marks. Rather than sorting all pixels by their value, applicants have found it advantageous to apply a threshold comparison operation to identify pixels having values ​​less than, for example, 50 or 100. Such an operation is very fast. The subset of pixels that pass the thresholding test is then sorted, and this ranked list is then processed. (The threshold is typically determined empirically, based on experience with pixel values ​​required for a particular application.) Alternatively, the pixels may be sorted into a number of coarse value bins, for example of uniform or binary spans, such as (a) 0-15, 16-31, 32-63, 64-127, and 128-255. Some or all of these bins may be sorted separately, and the resulting pixel lists may be concatenated to result in a ranked list containing all pixels.

[0446] Sometimes it is preferable to divide the high density code into portions, e.g., bands having widths of 16, 24, or 32 pixels across a code block, and sort each band separately. For example, if the high density code is 384x384 elements, band #1 may include rows 1-24 of elements, band #2 may include rows 25-48 of elements, etc., as shown in FIG. 75. Dots are selected across the block, first from one band, then the adjacent band, etc., to achieve the desired dot density. (In an alternative embodiment, dots are selected from the sorted pixels of band #1, then band #3, then band #5, etc., until the block is traversed, then continue by selecting dots from the sorted pixels of bands #2, #4, #6, etc., until finished.) Because the statistics of a high density code are generally uniform across space, selecting dots in this manner produces substantially the same results as would be achieved by sorting the entire block and selecting dots from the resulting data. Moreover, since sorting complexity (e.g., using a quicksort algorithm) is related to n*log2(n), there are significant computational efficiencies to be gained by, for example, sorting 16 smaller bands instead of one large block. Moreover, the sorting operation (and dot selection) can be performed in parallel for each of multiple bands, allowing for efficient multi-threaded implementations.

[0447] Application No. 62 / 673,738 is accompanied by a Wikipedia article detailing the quicksort algorithm and bicubic interpolation.

[0448] The dot selection process often involves analyzing candidate dot locations to ensure that no-go regions around previously selected dots are observed. Consider the candidate dot at row 11 and column 223. If the no-go region is a distance of four elements (pixels), one implementation explores whether any dots have been previously selected within rows 7-15. This set of previously selected dots is further examined to determine whether any are found within columns 219-227. If so, the distance between such previously selected dots and the candidate dot is determined by calculating the square root of the sum of the squared row difference and the squared column difference. If any such distance is less than four, the candidate dot is discarded.

[0449] Applicant has found that substantial computational savings can be achieved by a different algorithm that maintains a lookup data structure (table) with dimensions equal to those of the dense code, and also bounds equal to the forbidden distance. Thus, the data structure has dimensions of 392 rows by 392 columns for a 384 by 384 element dense code (and a forbidden distance of 4). Each element in the data structure is initialized to a value of 0, which means that the corresponding location in the sparse block is available for a dot.

[0450] When a first dot is selected for inclusion in the sparse block, the corresponding location in the data structure, and neighboring locations within a distance of 4, are changed to a value of 1, meaning that they are no longer available for the dot. When a second candidate dot is considered in a given row / column of the sparse signal block, the corresponding row / column of the data structure is checked to see if its value is 0 or 1. If 0, the dot is written to the sparse output block and the corresponding neighbors of the location in the data structure are changed to a value of 1 to prevent any other dots from violating the no-entry constraint. This process continues, with each candidate dot location being checked against its corresponding location in the data structure, and if it is still 0, the dot is written to the sparse output block and the data structure is updated accordingly.

[0451] Figure 76A shows an excerpt of an output sparse block 671, which (so far) contains three dots. Figure 76B shows an excerpt of the just-described data structure 672 corresponding to block 671, and shows how values ​​are changed from 0 to 1 within the neighborhood surrounding where the dot is located (indicated by the thick border) to enforce the four-element no-go distance.

[0452] Of course, this configuration may be used for non-circular exclusion zones as well, as detailed above.

[0453] FIG. 76C is a flow chart detailing aspects of an embodiment using the configurations described above.

[0454] Although frequent references to dot spacing or distance constraints are made, it should be recognized that this is just one approach to avoiding dot clumping: other approaches may be substituted, such as the patterned keep-out regions discussed above.

[0455] Although this specification has at times referred to rolls of adhesive label stock, it should be recognized that the label stock may be provided in other manners, such as in a continuous form configuration, without departing from other principles of the technology detailed.

[0456] Similarly, while much of this disclosure focuses on labels, it should be recognized that much of the technology detailed is more broadly applicable to thermally printed media (including, for example, receipts and coupons from point-of-sale terminals) as well as media printed by other methods.

[0457] One application of this technology is to assist human workers who frequently view printed documents such as drawings or manuals. Head-worn devices such as Google Glasses devices can image sparse markings in the document and present linked data such as close-ups of components, layout diagrams, etc. Head gestures can drill down for additional details or enlargements, or advance the enlargement to the next step in a procedure.

[0458] Although the focus of this specification is on sparse codes in the form of isolated dots, it should be understood that other optical codes can be derived from sparse patterns. Examples are Voronoi, Delaunay, and stipple patterns, as discussed in U.S. Application No. 62 / 682,731, filed June 8, 2018, and International Application No. PCT / US18 / 64516, filed December 7, 2018. Other artistic representations of data-bearing patterns are detailed in Application No. 62 / 745,219, filed October 12, 2018. (The disclosures of these applications are incorporated herein by reference.) The patterns generated by the configurations detailed herein can be used as the basis for more complex patterns detailed in the just-cited specification. The resulting artwork can be printed (e.g., on product label artwork) and later scanned to convey digital data (e.g., GTIN data). Those specifications may provide other teachings suitable for use in connection with the features of the technology detailed herein, and vice versa.

[0459] Some of the implementations detailed have gathered statistics characterizing "always black" pixels based on a set of 100-300 such pixels, although sets of different sizes could of course be used (5 pixels would probably be near the lower end of the size range for such a set).

[0460] Most of the detailed configurations can achieve a variable user configurable darkness (density) pattern by controlling the number of marks printed (e.g., by varying the number of darkest reference signal locations to make them available for signaling message information). In other configurations, density can be increased in other ways (and robustness can be increased as well), such as by varying the size of the marks. The marks can be single dots, or clusters of two dots (e.g., in a 2×1 or 1× array), or clusters of three dots, or clusters of four dots (e.g., in a 2×2 array), etc. In configurations that always use dark marks to help signal the reference signals, the darkest reference signal locations (e.g., ranked #1-20) are printed with clusters of four dots each. The next darkest locations (e.g., ranked #21-40) are printed with clusters of three dots each. The next darkest locations (e.g., ranked #41-60) are printed with clusters of two dots each. Any further locations in the ranking list are printed as isolated dots.

[0461] This specification has detailed many configurations for generating sparse codes from dense codes. Although composite dense codes including payload and reference signals are most commonly used, the configurations can be variously applied to dense codes consisting of only payload or reference signals. Furthermore, as described elsewhere, payload data can be conveyed by the reference signal (e.g., by the presence or absence of certain spatial frequency components). Similarly, reference information can be conveyed by the payload signal (e.g., by using fixed bits in the payload data to form an implicit synchronization signal with known signal characteristics that allow a detector to locate the payload signal for decoding).

[0462] One configuration creates a sparse code by applying a thresholding operation to the dense code to identify locations of extreme low values ​​(i.e., dark) within the dense code. These locations are then marked in sparse blocks. The threshold level establishes the printing density of the resulting sparse marks.

[0463] Another configuration identifies the darkest elements of the reference signal and combines these with the dark elements of the payload signal by a logical AND operator to identify locations within the sparse signal block where marks should be formed. A threshold can establish which reference signal elements are dark enough to be considered, and this value can be varied to achieve a desired print density.

[0464] Yet another configuration uses a reference signal generated at a relatively higher resolution and a payload signal generated at a relatively lower resolution. The latter signal has only two values ​​(i.e. it is two colors) and the former signal has more values ​​(i.e. it is multi-level, such as binary grayscale, or consists of floating point values). The payload signal is interpolated to the higher resolution of the reference signal, converting from a two-color format to multi-level in the process. The two signals are combined at the higher resolution and a thresholding operation is applied to the result to identify locations of extreme (e.g. dark) values. Again, these locations are marked within the sparse block. The threshold level again establishes the print density of the resulting sparse marks.

[0465] A further configuration is based on a dense multi-layer reference signal block. The elements of this signal are sorted by value to identify the darkest elements, each with a location. These darkest elements are paired. One element is selected from each pairing according to the payload bits. The location in the sparse block that corresponds to the location of the selected dark element is marked to form a sparse signal.

[0466] Yet another configuration sorts the samples within a tile of the reference signal by darkness, resulting in a ranked list in which each dark sample is associated with a location. Some locations are always marked to ensure that the reference signal is strongly represented. Others are marked or unmarked based on the value of the message signal data assigned to such locations (e.g., by a distribution table).

[0467] More specifically, one aspect of the present technology is a method for generating a sparse 2D optical code output signal block that allows for variable spatial density of marked elements. The method uses as input (a) a 2D payload signal block and (b) a 2D reference signal block. The 2D payload signal block includes an array of M×M binary elements, each having a first or second value and each having an associated location within the M×M payload signal block. The 2D reference signal block includes an array of N×N elements, each element having a value and an associated location within the N×N block, where N>M. The elements within the reference signal block are multi-valued. The method further includes interpolating the M×M payload signal block to obtain an N×N signal block. The interpolation also serves to change the elements of the payload signal block from the M×M binary elements to the N×N multi-valued elements. The interpolated N×N payload signal block is combined (e.g., by addition) with the N×N reference signal block in a weighted ratio (typically other than 1:1, e.g., 1:0.7 or 0.7:1) to obtain a composite dense code block consisting of N×N multi-valued elements. Locations for marking within the sparse N×N output signal block are then selected based on the ordering of the values ​​of the elements within the N×N composite dense code block.

[0468] In certain such embodiments, the act of selecting includes identifying a first element in the composite dense code block having an element value that passes a threshold test and evaluating a location of the first element to determine whether it is within a no-go zone. When it is determined that the first element is not within a no-go zone, the method includes forming a mark in the sparse output signal block corresponding to the location of the first element in the N×N composite dense code. Similarly, the act of selecting includes identifying a second element in the composite dense code block having an element value that passes a threshold test and evaluating a location of the second element to determine whether it is within a no-go zone. When it is determined that the first element is within a no-go zone, the method includes not forming a mark corresponding thereto in the sparse output signal block.

[0469] In some embodiments, the method includes sorting the element values ​​of the composite dense code block to identify an order of element darkness. A mark is provided in the sparse output signal block at a location (e.g., at the location of the darkest element) corresponding to one of the sorted element values ​​in the darkness order. For the next darkest element in the order, the method includes checking to ensure that a mark is not already present in the sparse output signal block at a location within a distance of K elements of the location of the next darkest element (e.g., K=4). If such a determination is made, the method includes providing a mark in the sparse output signal block at a location corresponding to this next darkest element (or, if such a determination is not made, the method includes not providing a mark in the sparse output signal block at a location corresponding to the next darkest element). The foregoing operations are repeated with successive elements from the darkest element order until a desired sparse print density is achieved.

[0470] Some embodiments include using a printer to print an adhesive label including a sparse N×N 2D optical code output signal block. Such a printer may include a linear array of print head elements, where there is a 1:1 mapping between N elements in a row or column of the N×N 2D optical code output signal block and N adjacent print head elements in the linear array of print head elements. An exemplary print head may have a spacing of 203 print head elements per inch.

[0471] Another aspect of the present technology relates to constructing an optical code that includes an encoded variable digital payload and a reference signal structure for geometric synchronization of the encoded variable digital payload. Elements of the optical code are mapped to spatial locations in the output code by the following process.

[0472] The optical code element value with the highest priority in the optical code is found, and an optical code element is formed in the output image at the spatial location of the optical code element found with this highest priority. Additional optical elements are similarly formed in the order of the priorities of the additional optical elements, with the constraint that this formation adheres to the spatial distance constraint. The resulting output image can then be rendered on a substrate, for example by printing. By finding a smaller or larger number of optical elements of consecutive priority, the output image can be made to have a lighter or darker appearance as required by the particular application.

[0473] Certain such methods include error correction encoding a sequence of variable data symbols into an encoded variable digital payload and combining the encoded payload with a geometric synchronization signal, the combining including applying signal weighting to the encoded variable digital payload or the geometric synchronization signal to set a relative priority of the encoded variable digital payload to the geometric synchronization signal.

[0474] In some such embodiments, constructing the optical code includes assigning priorities to data symbols of the encoded variable digital payload according to their location within the optical code to control redundant distribution of instances of the data symbols in the output image.

[0475] Optimization of the method may involve (a) assigning varying relative priorities to synchronization components of the data and optical codes, (b) generating an output image having optical codes at each of the relative priorities, (c) measuring the robustness of the optical codes in the output image, and (d) determining relative priorities that satisfy the robustness constraints.

[0476] Another optimization of the method may involve (a) assigning varying minimum spacing distances to the mapping of elements of the optical code to the output image, (b) generating an output image having the optical code mapped according to different minimum spatial distances, (c) measuring the robustness of the optical code in the output image, and (d) determining the minimum spatial distance that satisfies the robustness constraints.

[0477] Yet another aspect of the present technology relates to a method of generating a sparse machine-readable 2D code from a message signal and a 2D reference signal. (The 2D reference signal comprises an array of locations, each having a value.) Such a method includes examining the values ​​of elements comprising the 2D reference signal to identify a first set of locations in the 2D reference signal that correspond to extreme values ​​in the 2D reference signal element values. A subset of this first set of locations is selected according to the message signal. An output signal is then generated having marks at the selected subset of locations in the output signal block. With such an arrangement, the output signal functions as a sparse machine-readable 2D code, with the marks all representing extreme values ​​of the reference signal element values, a selection of which represents the message signal. Additionally, by selecting a larger or smaller subset of the first set of locations, the spatial density of the output signal can be altered to meet the requirements of a particular application.

[0478] One such embodiment further includes sorting the values of at least some elements that include the 2D reference signal to identify a ranked list by element darkness. Based on this sort, the M locations of the M darkest elements are identified, and M marks are placed at M locations within the output signal block corresponding to these M identified locations. These M marks represent the 2D reference signal and do not represent the message signal. Similarly based on this sort, the N locations of the next N darkest elements are identified, and P marks are placed at a subset of P locations within the output signal block corresponding to these N identified locations, where P < N. These P marks represent both the 2D reference signal and the message signal.

[0479] Yet another aspect of the technology is a method for generating an output sparse code block from (a) data representing a multi-bit message and (b) an N×N element 2D reference signal useful for geometrically registering the output sparse code block for decoding. Such a method includes (a) identifying the locations of the extrema within the 2D reference signal, (b) marking a first location within the output sparse code block corresponding to the locations of a first subset of the identified 2D reference signal extrema to assist in representing only the reference signal and not assist in representing the message, and (c) marking a second location within the output sparse code block corresponding to the locations of a second subset of the identified 2D reference signal extrema to assist in representing both (a) the message and (b) the reference signal. By marking a greater or lesser number of these first and / or second locations, the spatial density of the output signal can be varied to meet the requirements of a particular application.

[0480] In a particular embodiment of such a method, the data representing the multi-bit message includes a message block of N×N elements, each having either a first value or a second value (each location in the N×N element 2D reference signal corresponds to a respective element of said N×N message block). The second locations are identified extremum locations in the N×N element 2D reference signal where the value of the corresponding element in the message block is the first value.

[0481] A further aspect of the present technology is a method of generating an output sparse code block that allows for a variable spatial density of marking elements from (a) data representing a multi-bit message and (b) an N×N element 2D reference signal useful for geometrically registering the output sparse code block for decoding. Such a method again includes identifying extremum locations in the 2D reference signal and marking first locations in the output sparse code block that correspond to the locations of a first subset of the identified 2D reference signal extremums to help represent only the reference signal and not the message. The method further includes, for each bit of the message, marking one of two second locations in the output sparse code block, each corresponding to an identified extremum location, based on the value of the bit, to help represent both (a) the message and (b) the reference signal. By marking a larger or smaller number of first locations, the spatial density of the output signal can be modified to meet the requirements of a particular application.

[0482] Another aspect of the present technology relates to a method for decoding a sparse 2D code block representing (a) a multi-bit message and (b) a reference signal to aid in geometric registration of the sparse code. Such a method includes geometrically transforming a sparse code tile based on the reference signal to obtain sparse signal elements at locations in an N×N array. The multi-bit message is then extracted from the geometrically transformed sparse code tile, characterized in that the extraction ignores most of the locations in the N×N array.

[0483] Yet another aspect of the present technology relates to a method of decoding an M-bit payload represented by an optical code depicted in an image. Such a method includes determining a geometric registration of the optical code in the image with reference to reference signals represented by marks in the optical code. (In an exemplary embodiment, the marks correspond to extrema in a set of a plurality of space-domain sinusoids that serve as reference signals.) Data from N locations in the image (N>M) is processed to determine whether a mark is present at each of these locations. However, data is not similarly processed at locations between these N locations (i.e., the presence or absence of a mark at these other intermediate locations is ignored). A P-bit string is generated with reference to the presence or absence of a mark at the N locations. This P-bit string is applied to an error correction decoder to obtain M decoded bits. By ignoring the presence or absence of a mark from locations between the N locations, a potential source of error is minimized.

[0484] Yet another aspect of the technology involves receiving data defining a 2D optical code block of elements, each element having a location within the block and associated with one bit of a multi-bit payload. Each bit of the payload is associated with multiple elements in the optical code block. The method includes selecting fewer than all of the element locations for forming corresponding marks in the sparse output signal block to represent each of the payload bits having substantially equal intensity in the sparse output signal block (substantially meaning within 50%<, or 20%, or 10%> of the average intensity value of all payload bits).

[0485] Yet another aspect of the present technology is a method that includes defining four or more spatial frequency waveforms and controlling the amplitude of one or more of the waveforms so that the waveforms do not all have the same amplitude. The waveforms are then combined (by a hardware processor to configure such operations) to generate a pattern in the spatial domain. This pattern includes values ​​at multiple discrete spatial points (e.g., more than 1000 points). At least a portion of this pattern is then incorporated into the 2D optical code output signal block as a reference pattern to enable geometric registration of the 2D optical code.

[0486] A further aspect of the present technology is a printed label that includes a reference pattern defined by four or more waveforms having different spatial frequencies, at least two of which have unequal amplitudes. This pattern serves as a reference signal that enables a processor associated with a point of a scale scanner to determine the rotation and scale at which the label is depicted in an image captured by the scanner, such that the point of the scale scanner correctly decodes the machine-readable data also conveyed by the label.

[0487] Yet another aspect of the present technology is a label, which may be applied, for example, to food packaging. The label includes printed text and a machine-readable code. The code includes marks in a structured pattern that avoids the appearance of randomness. More specifically, a first rectangular region of the label having a length of X inches and a width of Y inches contains I of the marks, and a second region of the same dimensions, bordered by an edge, contains J of the marks, where I is at least 10 and I is at least 200% of J.

[0488] Yet another aspect of the present technology is a method that includes providing a library of multiple reference optical code signal blocks, each block encoding a common payload but with a different print density. An image is received that is made up of pixels, each pixel having a location and a value. For each of a plurality of pixels in the image, the method further includes (a) identifying an optical code signal block from the library that has a print density corresponding to the value of the pixel, (b) identifying a location in the identified optical code signal block that corresponds to the location of the pixel, and (c) copying output elements from the identified location in the identified optical code signal block to an output image frame. With such a configuration, an encoded output image is assembled from elements of the multiple reference optical code signal blocks.

[0489] A further aspect of the present technology is a method of operating a scanner associated with a point of sale terminal. Such method includes receiving a first image depicting a first sparse pattern of dots on a contrasting background of the packaging. The first image is analyzed to determine that the first sparse pattern of dots depicted thereby represents a data string encoded by a first encoding method. The first data string is decoded from the first image by applying a first decoding method corresponding to the first encoding method. The method further includes receiving a second image depicting a second sparse pattern of dots on a contrasting background of the packaging. The second image is analyzed to determine that the second sparse pattern of dots depicted thereby represents a data string encoded by a second encoding method. The latter data string is decoded from the second image by applying a second decoding method corresponding to the second encoding method, the second decoding method being different from the first decoding method. The described analyzing operations include converting the first and second images into a spatial frequency domain representation and determining that one of the first or second images includes one or more reference signal components that are absent from the other.

[0490] Another aspect of the present technology is a method of creating a sparse machine readable code from a dense machine readable code having elements of different values ​​at different respective locations in a 2D block. Such a method includes providing, for a first of the elements, a first mark in the output signal block at a first location corresponding to the location of the first element in the 2D block. Such a method further includes determining, for a second of the plurality of elements, that the location of the second element does not fall within a region of excluded pixel locations adjacent to the first mark, and as a result, providing, for the output signal block, a second mark at a second location corresponding to the location of the second element in the 2D block. Such a method further includes determining, for a third of the plurality of elements, that the location of the third element falls within a first or second region of excluded pixel locations adjacent to the first or second mark, respectively, and as a result, not providing, for the output signal block, a third mark at a third location corresponding to the location of the third element in the 2D block. In this method, at least one of the first or second regions is asymmetric about a vertical or horizontal axis.

[0491] A further aspect of the present technology is a method of generating a sparse dot pattern for printing on an item to encode information thereon, the printing being performed by a printer having a thermal print head including a plurality of thermal elements. The method includes determining that the sparse dot pattern includes two adjacent dots that may be printed with a spatial relationship drawn from a plurality of alternatives including vertical adjacency and horizontal adjacency. The method further includes selecting one of the alternatives that reduces a number of thermal heating and cooling events of the print head thermal elements.

[0492] Yet another aspect of the present technology is a method for determining that image data corresponds to a sparse code rather than a continuous-tone watermark. The method includes (a) transforming image data into the spatial frequency domain, (b) correlating the transformed image data with a template representing a first reference signal to generate a first value, (c) correlating the transformed image data with a template representing a second reference signal to generate a second value, (d) determining that the second value is greater than the first value, and (e) concluding based on such determination that the image data corresponds to a sparse code rather than a continuous-tone watermark. A decoding routine specific to the sparse code may then be initiated as a result.

[0493] Yet another aspect of the present technology is a method for determining that image data corresponds to a sparse code printed at 203 dots per inch rather than a sparse code printed at 300 dots per inch. Such a method includes (a) transforming the image data into the spatial frequency domain, (b) correlating the transformed image data with a template representing a first reference signal component to generate a first value, (c) correlating the transformed image data with a template representing a second reference signal component to generate a second value, (d) determining that the second value is greater than the first value, and (e) based on such a determination, concluding that the image data corresponds to a sparse code printed at 203 dots per inch. Also based on such a determination, the image data may be transformed back to a 203 dots per inch resolution for decoding.

[0494] Configurations affecting the composite code may further include weighting the reference signal and the payload signal in a ratio other than 1:1 to achieve particular visibility or robustness goals.

[0495] Each of these configurations may further include the operation of applying a spacing constraint to candidate marks within the sparse block to prevent agglomeration of marks. The spacing constraint may take the form of a keep-out zone that is circular, elliptical, or other (e.g., irregular) shape. The keep-out zone may (or may not) have more than one or less than two axes of symmetry. Enforcement of the spacing constraint may use an associated data structure with one element for each location within the sparse block. When a dark mark is added to a sparse block, corresponding data is stored in a data structure that identifies locations that are no longer available for potential marking due to the spacing constraint.

[0496] In each of these configurations, the reference signal can be adjusted to have a non-random appearance by varying the relative amplitudes of the spatial frequency peaks so that they are not all of equal amplitude. Such variations in the reference signal appearance have a consequential effect on the sparse signal appearance.

[0497] These configurations may also include applying a nonlinear filter to a multi-layer code (e.g., the original dense code) to identify locations that most effectively form marks within the sparse blocks to represent the information represented by the non-printed sparse elements. These locations are then prioritized in selecting locations for marking within the sparse blocks.

[0498] The configurations just reviewed are detailed more fully elsewhere in this disclosure.

[0499] The means for forming a sparse code from a dense code may use any of the hardware configurations detailed herein (i.e., in the discussion entitled Operating Environment) configured to implement any of the detailed algorithms.

[0500] This specification has discussed several different embodiments. It should be understood that the methods, elements, and concepts detailed in connection with one embodiment may be combined with the methods, elements, and concepts detailed in connection with other embodiments. Some such configurations have been specifically described, while some have not been described due to the number of permutations and combinations. Applicant also recognizes and intends that the methods, elements, and concepts herein may be combined, substituted, and interchanged, not only among and among themselves, but also with those known from the cited prior art. Furthermore, it should be recognized that the detailed techniques may be included to advantageous effect with other current and future techniques. The implementation of such combinations will be straightforward for one skilled in the art from the teachings provided in this disclosure.

[0501] Although this disclosure details particular orders of operations and particular combinations of elements, it should be understood that other contemplated methods may rearrange the operations (perhaps omitting some and adding others), other contemplated combinations may omit some elements and add others, etc. As one example, in embodiments described as combining payload and reference signals in a weighting configuration other than 1:1, 1:1 weighting may alternatively be used.

[0502] Although disclosed as a complete system, subcombinations of the detailed components are also separately contemplated (eg, omitting various features of the complete system).

[0503] Although some aspects of the present technology have been described with reference to illustrative methods, apparatus configured to perform the operations of such methods are also contemplated as part of Applicant's inventive work. Similarly, other aspects have been described with reference to illustrative apparatus, and methodologies performed by such apparatus are likewise within the scope of the present technology. Still further, tangible computer-readable media containing instructions for configuring a processor or other programmable system to perform such methods are also expressly contemplated.

[0504] The methods, processes, and systems described above may be implemented in hardware, software, or a combination of hardware and software. For example, the signal processing operations for generating and reading optical codes are implemented as instructions (including both software instructions and firmware instructions) stored in memory and executed in a programmable computer. Alternatively, the operations are implemented as digital logic circuits in special purpose digital circuits, or a combination of instructions executed in one or more processors and digital logic circuit modules. The methods and processes described above may be implemented in a program executed from the memory (a computer-readable medium such as an electronic, optical, or magnetic storage device) of the system.

[0505] In order to provide a comprehensive disclosure, while complying with the requirements of brevity under U.S. patent law, applicants incorporate by reference each of the documents referenced herein (such materials are incorporated in their entirety even if cited above with reference to certain of those teachings). These references disclose techniques and teachings which applicants intend to be incorporated in the configurations detailed herein and which incorporate the techniques and teachings currently detailed.

[0506] In view of the various embodiments to which the principles and features discussed above may be applied, it is apparent that the detailed embodiments are merely illustrative and should not be taken as limiting the scope of the invention, rather, applicant claims the invention as including all such modifications as may come within the spirit and scope of the following claims and their equivalents.

Claims

1. 1. A method of generating a machine readable binary 2D code enabling variable spatial density of marking elements, the machine readable binary 2D code comprising marking elements at positions in an N×N output array comprising an N×N two dimensional arrangement of positions, the machine readable binary 2D code representing both a message signal and a reference signal, the reference signal comprising a greyscale or floating point value in an N×N reference signal array, each position in the N×N output array corresponding to an associated position in the N×N reference signal array, the reference signal having a structure enabling geometric synchronization of the machine readable binary 2D code when depicted in a camera captured image, the method comprising: receiving a message signal including first and second binary valued bits in an N by N message signal array, each location in the N by N output array corresponding to an associated location in the N by N message signal array; identifying a first set of extreme values ​​of the reference signal and identifying a first set of locations within the N×N output array that correspond to the first set of extreme reference signal values; marking with a marking element a location in the first set of locations in the N×N output array that corresponds to a location in the N×N message signal array having the first binary value; the N×N output array functions as a machine-readable binary 2D code, with all of the marking elements representing extreme values ​​of element values ​​of the reference signal, and the marking elements also representing bits of the message signal having the first binary value; A method according to claim 1, wherein the spatial density of the machine-readable binary 2D code is variable by identifying a first set of greater or lesser extreme values ​​of the reference signal.

2. the first set of locations in the N×N output array comprises no more than 15% of the locations in the N×N output array. The method of claim 1.

3. identifying a second set of extreme values ​​of the reference signal; identifying a second set of locations within the N×N output array that correspond to a second set of extreme values ​​of the reference signal; marking all positions within the second set of positions in the N×N output array with a marking element, regardless of the binary value of the message signal; The method of claim 1 , comprising:

4. - sorting the values ​​of the reference signal to obtain a ranked list of values ​​of the reference signal; identifying a value of a reference signal within one range of the ranked list as one of the first and second sets of extreme values ​​of the reference signal; identifying a value of a reference signal within a range different from the one range of the ranked list as the other of the first and second sets of extreme values ​​of a reference signal; The method of claim 3 , comprising:

5. identifying reference signal values ​​ranked from 1 to M in the ranked list as the second set of extreme values ​​of the reference signal values; identifying reference signal values ​​ranked M+1 through P in said ranked list as said first set of extreme reference signal values; The method of claim 4 , comprising:

6. inserting said machine readable binary 2D code into a host image content of a label; printing the label; The method of any one of claims 1 to 5, further comprising:

7. A label produced by the method of claim 6.

8. 1. A method of decoding a binary 2D code, the binary 2D code representing both a message signal and a reference signal, the binary 2D code comprising binary marking elements at locations in an array of N by N locations, the array of N by N locations being an N by N two-dimensionally arranged array of locations; The method comprises: receiving a camera-captured image depicting the binary 2D code; detecting the reference signal from the camera-captured image and using the reference signal to compensate the camera-captured image for affine distortion, thereby enabling identification of the N x N array of locations shown in the camera-captured image; extracting a message signal from the compensated camera-captured image, based on a set of no more than 15% of the locations in the N×N array of locations depicted in the compensated camera-captured image, ignoring locations in the N×N array of locations depicted in the compensated camera-captured image that are not within said set, thereby avoiding noise interfering with correct extraction of the message signal; The method includes:

9. disregarding locations in the array of N x N locations depicted in the compensated camera-captured image that are not within the set comprises replacing locations in the array of N x N locations depicted in the compensated camera-captured image that are not within the set with a fixed value. The method according to claim 8.

10. 1. A substrate marked with a binary 2D code, the binary 2D code representing both a message signal and a reference signal, the binary 2D code comprising an N by N array of two-dimensionally arranged positions, some of the positions in the N by N array of two-dimensionally arranged positions being marked and other of the positions in the N by N array of two-dimensionally arranged positions being unmarked, and wherein all of the marked positions represent a reference signal and some but not all of the marked positions represent a message signal.

Citation Information

Patent Citations

  • Apparatus, system and method for processing image, image forming apparatus, and program

    JP2010147676A

  • Data input / output method using dot code

    JP2017063503A

  • Sparse modulation for robust signaling and synchronization

    US20170024840A1

  • Sparse modulation for robust signaling and synchronization

    WO2016153911A1