NZ260173A - Optically readable label with information encoded polygons: optical and computer system for decoding - Google Patents

Optically readable label with information encoded polygons: optical and computer system for decoding

Info

Publication number
NZ260173A
NZ260173A NZ260173A NZ26017389A NZ260173A NZ 260173 A NZ260173 A NZ 260173A NZ 260173 A NZ260173 A NZ 260173A NZ 26017389 A NZ26017389 A NZ 26017389A NZ 260173 A NZ260173 A NZ 260173A
Authority
NZ
New Zealand
Prior art keywords
polygons
information
article
recited
hexagons
Prior art date
Application number
NZ260173A
Inventor
Donald Gordon Chandler
Eric Paul Batterman
Govind Shah
Original Assignee
United Parcel Service Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US07/178,600 external-priority patent/US4874936A/en
Priority claimed from US07/330,111 external-priority patent/US4896029A/en
Application filed by United Parcel Service Inc filed Critical United Parcel Service Inc
Publication of NZ260173A publication Critical patent/NZ260173A/en

Links

Landscapes

  • Character Input (AREA)
  • Credit Cards Or The Like (AREA)

Description

2 6 u i 7 3 Priority Date(s):...?i!t.\.?.® Complete Specification Fifed: Class: (6) Q!<>.tf:.\511.Q£+<y*4.9.'Ri Publication Date: !!L^L(i.QJLj99$"~- P.O. Journal No: (f4r.!.??. l^oo 23 W tr;>' ■ orv« ..OP.- *sa !#•••••"" -Aa-dase* h Patents Form No. 5 This is a divisional out of application number^ 241291 dated 13 January 1992.
NEW ZEALAND PATENTS ACT 1953 COMPLETE SPECIFICATION POLYGONAL INFORMATION ENCODING ARTICLE, PROCESS AND SYSTEM WE, UNITED PARCEL SERVICE OF AMERICA, INC., of.51 WoaTgg "T (yracis, £<334(, Stroot /—Greenwich Office Bask 5,—Greenwich,—Connec-fciouti 06831> U.S.A, a -eeggeratlon-organisod and existing- under 6com(eK the laws of Dolawaro> United States of America hereby declare the invention, for which we pray that a patent may be granted to us, and the method by which it is to be performed, to be particularly described in and by the following statement: 260 , 7 i ABSTRACT OF THE INVENTION The article of the invention is an optically readable label for storing encoded information, said label comprising a data array of a multiplicity of information-encoded polygons arranged in a predetermined geometric pattern, and said polygons having at least two different optical 'properties.
A process for encoding information in an optically-readable data array comprised of information-encoded polygons by assigning optical properties to individual polygons in a . predetermined pattern, ordering the polygons in a predetermined sequence, and printing the polygons with-at least two optical properties.
A process for retrieving information by optically scanning a data array of information-encoded polygons, preferably hexagons, creating an optical replica of the digital bit stream representative of the optical properties of the. information- -encoded polygons, decoding that optical replica and retrieving the decoded bit stream.
A system for performing the foregoing encoding and decoding processes. -la- 260 1 A Microfiche Appendix is included in the present application comprising one microfiche and a total of one test target frame and-78 frames of• computer program listings. The microfiche Appendix is included by way of tables 1 to 21 at pages 75(al)-75(a78).
This invention relates to an improved optically readable label and a reading system therefor, and, in particular, to an improved optically readable label, attached to or printed on a substrate, for storing information within a two-dimensional data array, comprising a multiplicity of.polygons arranged in a predetermined geometric pattern, and said polygons having at least two different optical properties.
Merchandise, various component parts,, letters, packages, containers and a whole gamut of related items being shipped or transported, frequently are required to be identified with information as to origin, flight number, destination, name, price, part number and numerous other kinds of information. In other applications,° reading encoded information printed on labels affixed to such items permits automation of sales figures and inventory or the operation of electronic cash registers. Other applications for such encoded labels include the automated routing and sorting of mail, parcels, baggage, and the like, and the placing of labels bearing manufacturing Instructions on raw materials or component parts in a manufacturing.process. Labels for these types of articles are conventionally marked with bar codes, one of which is the Universal Product Code. Numerous other bar code systems are also known in the art.
Commercially-available bar code systems typically lack sufficient data density to accommodate the present and increasing need to encode more and more information on labels of increasingly smaller size. Attempts to reduce the overall size and spacing of bars in various bar code systems to increase data 2- C 0 u density have not solved the problem; optical scanners having sufficient resolution to detect bar codes comprising contrasting bars spaced five mils or less apart are generally not economically feasible to manufacture because of the close tolerances inherent in the label printing process and the sophisticated optical apparatus required to resolve bit-encoded bars of these dimensions. Alternatively, to accommodate increased amounts of data, very large bar code labels must be fabricated, with the result that such labels are not compact enough to fit on small articles. Another important factor Is the cost of the label medium/ such as paper. A small label has a smaller paper cost than a large label; this cost is an important f&ctor In large volume operations.
Alternatives to bar codes include: circular formats employing radially disposed wedge-shaped coded elements, such as I in U.S. Patent 3,553,438, or concentric black and white bit-encoded rings, such as in U.S. Patents, Nos. 3,<371,917 and 3,916,160; grids of rows and columns of datr - icoded squares or rectangles, such as in U.S. Patent No. 4,286,146; microscopic spots disposed in cells forming a regularly spaced grid, as in U.S. Patent No. 4,634,850; and densely packed multicolored data fields of dots or elements, such as described in U.S. Patent No. 4,488,679. Some of the coding'systems described In the foregoing examples and other coding systems known in the art primarily suffer from deficiencies in data density, such as in the case of encoded circular patterns and grids of rectangular or square boxes. Alternatively, in the case of the grids comprised of microscopic spots or multicolored elements referred to above, such systems require special orientation and transport means, thus limiting their utility to highly controlled reading environments.
Due to the size and speed of modern conveyor systems, (utilizing conveyor belt widths of 3 to 4 feet, for example) and having belt speeds approaching 100 inches per second or more, carrying packages of varying heights on which information encoded labels are affixed, and the need to utilize a small, inexpensive. 26 0 compact label of about one square inch, great strains are placed on the optical and decoding systems required to locate and read the data encoded labels on these rapidly moving packages and the like. There are difficulties in the optical scanner simply acquiring the label image. Furthermore, ones acquired or identified, the label image :nust be accurately decoded before the next operation on the package in the conveyor system takes place, often in a fraction of a second. These problems have led to the need for providing a simple, rapid and low-cost means of signaling the presence of a data-encoded label within the field of view of an optical scanner mounted in a manner to permit scanning the entire conveyor belt. This feature desirably is coupled with a high density data array, described in more detail below.
Data arrays containing acquisition targets are known in the art; for example, concentric geometric figures, including rings, squares, triangles, hexagons and numerous variations thereof, such as described in U.S. Patents Nos. 3,513,320 and 3,603,728. -U.S. Patents Nos. 3,693,154 and 3,801,775 also describe the use of symboltj comprising concentric circles as identification and position indicators, which symbols are affixed to articles to be optically scanned. However, these systems employ two separata symbols to determine the identification of the data field and its position, thereby increasing the complexity of the logic circuitry required to detect the symbols, as well as reducing the data-carrying capacity of the associated data field.
Also, when two symbols are used, damage to one causes problems in locating the position of the data field and the attendant ability to recover information from the data field. In the latter system, separate position and orientation markings are utilized at opposite unds of data tracks having data-encoded linear markings of only limited data carrying capability. 7.*he foregoing systems are generally scanned with an optical sensor capable of generating a video signal output corresponding to the change in intensity of light Reflected off the data array and position and orientation symbols. The video out- 26 0 1 put of such systems, after it is digitized, has a particular bit pattern which can be matched to a predetermined bit sequence.
These systems, however, suffer the drawback of requiring two separate symbols for' first ascertaining the image and secondly 5 determining its orientation. Also, the process of having to match tha digitised signal output of the optical-sensor with a predetermined bit sequence representing both the position and orientation symbols, is more likely to produce erroneous readings that the process and system of this invention, because the prior art 10 .label acquisition systems provide an inflexible characterization of the acquisition target signal level.
U.S. Patent No. 3,553,438 discloses a circular data array having a centrally-located acquisition target comprising a series of concentric circles. The acquisition target provides a 15 means of acquiring the circular label by the optical sensor and determining its geometric center and thereby the geometric center of the circular data array. Tfels is done through logic circuitry operating to recognize the pulse pattern representative of the bulls-eye configuration of the acquisition target. However, as 20 for bar codes, the data array has only a limited data capacity and the system requires a second circular scanning process. Use of both a linear and circular scan for a system of such limited data capacity creates undesirable complexity in the system for a slight gain in data capacity over conventional bar codes. 25 To increase the data carrying capacity of data arrays, codes employing multiple high density colored dots have been developed, as described in U.S. Patent No. 4,488,679. Systems of I the type described in U.S. Patent Mo. 4,488,679, however, require the use of hand-held optical scanners, which are totally incapable ■ 30 of recording and decoding rapidly moving data arrays on a package being transported on a high-speed conveyor belt. Analogously, high density coding systems employing microscopic data-encoded spots, as described in U.S.'Patent No. 4,634,850, require special transport means, thereby ensuring that the data array is moved in 35 a specific direction, rather than simply at a random orientation, 26 0 1 7 - / 2342-89-283 as might be found with a package being transported on a conveyor belt or the like. ThU9, the coded label must be read track by track, utilizing a linear scanner coupled with label transport means to properly decode the information encoded on the label.
Also, in this patent, the position of the card in relation to the sensor must be very carefully controlled to be readable.
Multiple colors have also been utilized in the art of producing bar code systems so as to overcome the optical problems of scanning very minute bars. A bar co^e utilizing more than two 10 optical properties to encode data in a data array, by for instance, use of alternating black, gray and white bars, is described in U.S. Patent No. 4,443,694. However, systems of. the type described, although an improvement over earlier bar code systems, nevertheless fail to achieve the compactness and data density of the 15 invention described herein.
It is an object of the present invention to provide improved compact, high-information-density, optically-readable labels or to at least provide the public with a useful choice.
It is a further object of the present invention to provide improved methods of and systems for encoding and decoding compact, high density, optically-readable labels or to at least provide the public with a useful choice.
Further objects and advantages of the invention will become apparent from the description of the invention which follows.
According to .the present invention there is provided an optically readable label for storing encoded information comprising a multiplicity of contiguously arranged, information-encoded polygons, each polygon having one of at least two different optical properties. -6 (followed by page 6a) 2 6 0 1 a further aspect of According to/ the .present invention there is provided a process for encoding information in an optically- readable label comprising a multiplicity of information-encoded hexagons contiguously arranged in a honeycomb pattern, each hexa- gon having one of at least two optical properties, comprising the steps of: (a) assigning one of at least two optical properties to each hexagon to create a plurality of contiguous hexagons having different optical properties; (b) encoding the information by ordering the hexagons in a predetermined sequence; and (c) printing each hexagon in its assigned optical property. „ ,, . _ a further aspect of According to / the present invention there is provided a process of storing and ■ grieving data, com-. prising the steps of: (a) printing on a label a multiplicity o£ information-encoded hexagons contiguously arranged in a ■ honeycomb pattern, each hexagon having one of at least two different optical properties; (b) illuminating said label; (c) optically sensing light reflected from said hexagons with an electro-optical sensor; (d) generating analog electrical signals corresponding to the intensities of light reflected from said optical properties as sensed by individual pixels of said sensor; (e) converting said analog electrical signals into sequenced digital signals; (f)' storing said digital signals in a storage connected to a computer medium to/form a replica of said digital signals in said storage medium; (g) decoding said replica of said digital signals to retrieve the characteristics of the intensities, locations and orientations of the individual optical properties of said hexagons; and -6 a- (followed by page 6b) 2 6 0 i (h) generating a digital bit stream output from the computer representing the decoded information represented by the hexagons. • ^ _ a further aspect of According to /the present .invention there is provided a process .of storing and retrieving data, comprising the steps of: (a) printing on a substrate a multiplicity of information-encoded hexagons contiguously arranged in a honeycomb pattern, and a plurality of centrally-located Concentric Rings, each hexagon having one of at least two different optical properties, and said Concentric Rings having alternating optical properties corresponding to at least two of the optical properties of said hexagons; (b) illuminating said substrate; (c) optically sensing light reflected from said hexagons and said Concentric Rings with an electro-optical sensor; (d) transmitting digital electrical signals corresponding to the intensity of light reflected from said hexagons and said Concentric Rings as recorded by individual pixels of said sensor; (e) filtering said digital electrical signals y through a digital bandpass filter to determine the presence of said Concentric Rings, thereby detecting the presence of said hexagons within the field of view of said sensor; (f) storing said digital electrical signals in a storage medium connected to a computer to form a replica of said digital electrical signals in said storage medium; (g) decoding said replica of said digital electrical signals to retrieve the characteristics of the intensities, locations and orientations of the individual optical properties of said hexagons; arud (h) transmitting a digital bit stream output from said computer representing the decoded hexagons. -6b- (followed by page 6c) 260 a further aspect of According to/the present, invention there is provided an optical mark sensing and decoding system for an optically readable label for storing encoded data comprising a multiplicity of information-encoded hexagons contiguously arranged in a honeycomb pattern,' each hexagon having one of at least two different optical properties, comprising: (a) taeana for illuminating a predetermined area; (b) means for optically imaging said predetermined illuminated area through which said label is arranged to pass and generating analog electrical signals corresponding to the intensities of light reflected from said hexagons and striking each pixel of said imaging means; (c) means for converting said analog electrical signals into a sequenced digital bit stream corresponding to the intensities of light recorded by said pixels of said imaging means; (d) means for storing said digital bit stream for subsequent decoding of said label; and (e) means for decoding said digital bit stream, said decoding means producing an electrical output representative of the encoded information. a further aspect of According .to 'the present invention there is provided em optically readable label for storing encoded information comprising a multiplicity of information-encoded polygons, said polygons arranged with the geometric ceTnters of adjacent polygons lying at the vertices of a two-dimensional array, and said polygcms haying one of at least two different optical properties. - 6c - 2 6 0 i / 3 a further aspect of .According to / the present invention there is ' provided a combination optical mark sensing and decoding system, comprising: (a) an optically readable label for storing encoded information comprising a multiplicity of information-encoded polygons, said polygons arranged with the geometric centers of- -'adjacent"- polygons lying at the vertices of a predetermined two-dimensional array, and said polygons having one of at least two different optical properties; (b) means for illuminating a predetermined area; (c) means for optically imaging said predetermined illuminated area through which said label is arranged to pass and generating analog electrical signals corresponding to the intensities of light reflected from said polygons and striking each pixel of said Imaging means; (d) means for converting said analog electrical signals into a sequenced digital bit stream corresponding to the intensities of light recorded by said pixels of said imaging means; (e) means for storing said digital bit stream for subsequent decoding of said label; and (f) means for decoding said digital bit stream, said decoding means producing an electrical output representative of the encoded information. - 6d - 260 17 According to a further aspect of the present invention there is provided a combination optical .mark sensing and decoding system, comprising: (a) an optically readable label for storing encoded information comprising a multiplicity of information-encoded polygons, said polygons raonccntiguously or partially ccntinguously arran«pd .with the 'geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, said polygons having one of at least two different optical properties; (b) means for illuminating a predetermined area; (c) means for optically imaging said predetermined illuminated area through which said label is arranged to pass and generating analog electrical signals corresponding to the intensities of light reflected from said polygons and striking each pixel of said imaging means; (d) means for converting said analog electrical signals into a sequenced digital bit stream corresponding to the intensities of light recorded by said pixels of said imaging means; (e) means for storing said digital bit stream for subsequent decoding of said label; and (f) means for decoding said digital bit stream, said decoding means producing an electrical output representative of the encoded information.' According to a further aspect of the present invention there is provided a process for encoding information in an optically readable label ocmpriaing a multiplicity of ncnocntiguously car partially contiguously arranged polygons defining a multiplicity of interstitial spaces among said polygons, said polygons arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, and said polygons and said lnterstiti'al spaces having one of at least two different optical properties, comprising the steps of: (a) assigning one of at least two optical properties to each polygon to create a plurality of partially contiguously-arranged polygons having different optical properties; - 6e - 26 Q I7j (b) encoding the Information by ordering the polygons in a predetermined sequence; and (c) printing each polygon in its assigned optical property.
According to a further aspect of the present invention there* is provided a process of storing and retrieving data, comprising the steps oft (a) printing on a label a multiplicity of ncaiccsitiouously err partially contiguously arranged polygons encoded in accordance with an encoding process, said polygons defining a multiplicity of interstitial spaces among said polygons, said polygons arranged With the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, and said polygons and said Interstitial spaces having one of at least two different optical properties; (b) illuminating said label; (c) optically sensing light reflected front said polygons with an electro-optical sensor; (d) generating analog electrical signals corresponding to the intensities of light reflected from said optical properties as sensed by individual pixels of said sensor; (e) converting said analog electrical signals into sequenced digital signals; (f) storing said digital signals in a storage medium connected to a computer to form a replica of said digital signals in said storage medium; (g) decoding said replica of said digital signals to retrieve the characteristics of the intensities, locations and orientations of the individual optical properties of said polygons ; and (h) generating a digital bit stream output from the computer representing the decoded information represented by the polygons. - 6f - 26 0 l According to a further aspect of the present invention there is provided a process for encoding information in an optically readable label comprising a multiplicity of contiguously-arranged polygons, said polygons arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, said polygons having one of at least two dif- " ferent optical properties, comprising the steps of: (a) assigning one of at least two optical properties to each polygon to create a plurality of contiguously-arranged polygons having different optical properties; (b) encoding the information by ordering the polygons in a predetermined sequence; and (c) printing each polygon in its assigned optical property.
According to a further aspect of the present invention there is provided a process of storing and retrieving data, comprising thi steps of: (a) printing on a label a multiplicity of contiguously-arranged polygons encoded in accordance with an encoding process, said polygons arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, and said polygons and said interstitial spaces having one of at least two different optical properties, (b) illuminating said label; (c) optically sensing light reflected from said polygons with an electro-optical sensor; - 6g - (followed by page 7) kti o (d) generating analog electrical signals corresponding to the intensities of light reflected from said optical properties as sensed by individual pixels of said sensor; (e) converting said analog electrical signals into sequenced digital signals; (f) storing said digital signals in a storage medium connected to a computer to form a replica of said digital signals in said storage medium; (g) decoding said replica of said digital signals to retrieve the characteristics of the intensities, locations and orientations of the individual optical properties of said polygons; and (h) generating a digital bit stream output from the computer representing the decoded information represented by the polygons.
The present invention comprises an optically-readable label for storing data encoded in bit form, comprising a predetermined two-dimensional data array of a multiplicity.of inform«\tion-encoded polygons arranged contiguously, partially contiguously or noncontlguously in a predetermined two-dimensional pattern and -having at least two different optical properties as well as methods and apparatus for encoding and decoding such optically-readable labels. 2342-89-283 Optically readable -.absis af the invention may comprise predetermined two-dimensional g&omefcria arrays of polygons where the geometric centers of such polygons lit* at the vertices of the intersecting axes as moire fully discusaad below of a predetermined 5 two-dimensional array and where the polygone have one of at least two different optical properties. The polygone of such optically readable labels may be regular or irregular polygons and the two-dimensional arrays of polygons on the optically readabls labels may have two or more equally- or unequally-angularly spaced ax»3 10 in the plane of the label.
Optically readable labels may be printed with configurations of polygons which are totally contiguous, partially contiguous or noncontiguous. The latter two configurations inherently define & multiplicity of interstitial spaces on the 15 optically readable label between adjacent polygons. Such interstitial spaces may have the same or different optical properties as the two or more optical properties, of the polygons. Two-dimensional arrays of contiguous polygons having five or more sides are usable as optically readable label configurations of 20 the invention. Also, two-dimensional arrays of either regular or irregular, and either partially contiguous or noncontiguous, polygons having three or more sides, when prearranged on predetermined axes of such arrays, may be encoded and decoded in accordance with the processes of the invention. 25 In addition to the foregoing varieties of geometric polygonal cells, arrangements of such polygonal cells,' and geometries of the optically readable labels formed by such arrangements of polygonal cells, the optically readable labels of the invention may optionally contain an acquisition target comprising 30 a series of concentric rings to aid in the locating .of the optically readable labels on the articles upon which they are affixed, particularly in dynamic label reading systems.
In a preferred embodiment of the invention, the data array comprises a generally square-shaped array of about one 35 square inch, having contiguously-arranged hexagons forming rows 2342-89-283 260 and columns .and a centrally-located acquisition target having a geometric center which defines the geometric center of the data .amy. The acquisition target may be any of a number of geometric shapes having optical properties capable of generating an 5 easily recognizable video signal when scanned with an optical sensor across a linear scan line passing through the geometric center of the acquisition target. In a preferred embodiment, the acquisition target is a plurality of concentric rings of contrasting reflectivities, which will yield a periodic video signal when 10 scanned linearly. By using analog filter means as part of the method of locating and decoding the data array, the signal generated by the optical sensor is compared directly with a predetermined frequency, thereby allowing rapid and precise matching of the frequencies and consequent determination of the location 15 of the dat& array affixed to a substrate. The analog electrical signal output from the optical sensor representing the information-encoded label is then digitized and decoded. Utilizing an analog bandpass filtering step permits label acquisition to occur without the need for decoding the information-encoded label. By locating 20 the center of the acquisition target a reference point on the data array may be determined. If the' center of the acquisition target is located at the center of the label, a simultaneous determination of the center of the acquisition target and the data array may be accomplished. A central location of the acquisition 25 target on the label is preferred, but not required, in the practice of the subject invention.
The optically-readable data array of the present invention is capable of encoding 100 or up to several hundred or more error protected alphanumeric characters in an area of about one 30 square inch when hexagons are encoded utilizing three reflective properties, such as the colors black, white and gray. For a sensor with a given optical resolution, the system of the invention permits a much denser information packing capability than is possible with bar code systems. For example, if a high resolution 3S optical sensor is used with the system of this invention, hundreds 2342-89-283 of alphanumeric characters may be encoded in a square inch. Alternatively, 100 characters per square inch may easily be detected with a relatively low resolution sensor with the system of this invention.
Optically-readable labels of the present invention may be produced with varying data densities by'utilizing as few as two or more contrasting optical properties. Greater data densities and the inclusion of an acquisition target in the system of this invention require a scanning apparatus of increasing complexity and the addition of more elaborate decoding algorithms to read the encoded message, when compared with a bar code reading system.
In this invention, data encoding may be accomplished by encoding a plurality of bits from a binary bit stream into a cluster of contiguous hexagons, each hexagon having one of at least two optical properties, although the encoding could alternatively be done on a hexagon-by-hexagon basis. The digital bit stream may be generated by a computer, based upon data entered manually or otherwise converted into a binary bit stream, or may be provided as a prerecorded digital bit stream. The data to be encoded is bit-mapped in a predetermined sequence and within predetermined geographical areas of the data array to Increase the number of transitions between hexagons having different optical properties.
In the preferred embodiment; of the present invention, the messages to be encoded are divided into high and low priority messages, which are separately mapped in different geographic areas of the data array. The high priority message may optionally be duplicated in the low priority message area to reduce the possibility of losing the high priority message due to scanning errors caused by smudges, tears, folds and other types of damage to the data array. The high priority message is encoded in a central area of the data array, near the acquisition target contained in the preferred embodiment, in order to protect the message from damage which is more likely to occur to the peripheral 2342-89-283 4^ D {J J J areas of the data array. Error correction capabilities are desirably incorporated in the data array, utilizing the large information-carrying capacity of the present invention, to ensure a very high degree of data integrity upon-decoding the message. 5 In practicing the invention, a pixel grid of sufficient density to print the label with hexagons of different optical properties is utilized, although alternative printing processes may be used without departing from the spirit of the invention. The pixel grid is bit-mapped so that, when the label is printed, 10 the optical properties of each hexagon are predetermined, so that they may later be decoded to recover the data designated by the I encoding of the individual hexagons. This type of printing process is well known in the art and standard printers and bit mapping techniques may be used to print hexagons having the optical 15 propertied required by this invention.
The present invention provides a new and improved process for retrieving the data encoded in the bit-mapped array of polygons, preferably hexagons, forming.the data array. Encoded labels may be passed through a predetermined illuminated area and 20 optically scanned by means of an electronically operated optical sensor or a hand-held scanner may be passed over the labels. The optical sensor produces an output which is an analog electrical signal corresponding to the intensity of the individual reflective property of an area of a label, as recorded by the individual 25 pixels of the optical sensor. By means of an analog filter, the analog signal of the optical sensor Is first compared to a predetermined frequency value corresponding to that of a predetermined acquisition target if it is present on the data array. Once a good match is found, the label is acquired and the center of the 30 acquisition target is determined, thereby also determining a reference point on the data array. The analog signal Is simultaneously digitized on a continuous basis by means of an analog-to-digital converter and stored in an 'image buffer. The stored digitized data representing the entire label is available for further pro-35 cessing in the decoding process. 2342-89-283 By stored program logic circuits, the digital data is transformed into a map of the interfaces of hexagons having different optical properties. In a preferred embodiment of the invention, this is done by computing^the standard deviation of the intensities of the reflective properties.recorded by the optical sensor at each pixel and a predetermined group of pixels surrounding that first pixel. High standard deviations therefore correspond to transition areas at the interfaces of contrasting hexagons.
Further data transformations, involving filtering programs to determine orientation, direction and spacing of the hexagons, are performed on the digital data. The general steps of this process are: (1) Filtering the non-linear transformed version of the digitised image. (2) Determining the orientation of the label, preferably by locating the three axes of the image (as illustrated in Fig. 2) and determining which axis is parallel to two sides of the label. (3) Finding the center of each hexagon and determining the gray level at each center. (4) Transforming the gray levels to a bit stream. (5) Optionally, applying error correction to that bit stream; and (6) Optionally, converting the bit stream to a predetermined set of characters.
It is to be noted that, although the process of this invention is described as applied to hexagons having two or more optical properties, the process, in particular, the steps for adjusting the optical image for label warp, tear and the like, may be applied to other types of labels and other polygonal cells.
Other objects and further scope of applicability of the present invention will beco'me apparent from the Detailed Description of the Invention. It is to be understood,, however, that the detailed description of preferred embodiments of the invention is 12- 26 0 given by way of illustration only and is not to be construed as a limitation on the scope of variations and modifications falling within the spirit of the invention, as made apparent to those skilled in the art.
The invention will new be described by way of example with reference to the accompanying drawings wherein: FIG. 1 is a plan view of an acquisition target of concentric rings in accordance with the present invention.
FIC. 2 is a fragmented plan view of an optically-readable label having contiguously-arranged hexagons for encoding data in accordance with the present invention.
FIG. 3 is a plan view of a complete optically-readable label having contiguously-arranged hexagons of three optical properties for encoding binary data and including an acquisition target, in accordance with this invention.
FIC. 4 is a plan view of a three cell by three cell cluster of contiguous hexagons, which may serve as the basic encoding unit of the preferred embodiment of this invention.
FIC. 5 is a cluster map showing a graphic representation of a data array comprising 33 rows and 30 columns, forming a grid of 11 rows and 10 columns of three cell x three cell cluster coding units of hexagons.
FIG. 6 is a schematic view of a camera adjusting system in accordance with the invention for adjusting the position of the optical light sensor in accordance with the height of package being sensed.
FIG. 7 is a detailed outline of the decoding process of this Invention.
• FIG. 8 is a flow chart showing the acquisition target location process. 2342-89-283 L 0 U FIG. 9' ia a flow chart showing the encoding and decoding program structure and data flow.
FIG. 10 is a flow chart showing the sequence of image processing steps.
FIC-. 11 is a plan view of a cluster of contiguous regular hexagons arranged with the geometric centers of adjacent hexagons lying at the vertices of a regular hexagonal array.
FIG. 12 is a plan view of a cluster of contiguous irregular hexagons arranged with the geometric centers, of adjacent hexagons lying at the vertices of an irregular hexagonal array.
FIG. 13 is a plan view of a cluster of partially contiguous polygons substantially in the form of hexagons arranged with the geometric centers of adjacent polygons lying at the vertices of a hexagonal array.
FIG. 14 Is a plan view of a cluster of contiguous polygons substantially in the form of hexagons arranged with the geometric centers of adjacent polygons lying at the vertices of a hexagonal array.
FIG. 15 is a pla-> view of an optically readable label having contiguous polygons substantially in the form of hexagons arranged with the geometric centers of adjacent polygons lying at the vertices of a hexagonal array and including an acquisition target In accordance with this invention.
FIG. 16 ia a plan view of a cluster of contiguous.equilateral squares arranged with the geometric centers of adjacent squares lying at the vertices of a hexagonal array. 23-12-S9-293 L 0 0 FIC. 17 is a plan view of a cluster of noncontiguous rectangles defining interstitial spaces among said rectangles with the geometric centers of adjacent rectangles lying at the vertices of a hexagonal array.
FIC. 18 is a plan view of a cluster of noncontiguous pentagons defining interstitial spaces among said pentagons with the geometric centers of adjacent pentagons lying at the vertices of a hexagonal array.
FIC?. 19 is a plan view of a cluster of contiguous rectangles arranged in staggered rows and columns with the geometric centers of adjacent rectangles lying at the vertices of a hexagonal array.
FIG. 20 is plan view of a cluster of partially contiguous octagons defining interstitial spaces among said octagons with the geometric centers of adjacent octagons lying at the vertices % of a rectangular array. 2342-89-283 0 THS frftBSL The ability to encode information by virtue of the contrasting colors of contiguous hexagons or "cells" arranged in a honeycomb pattern in a predetermined sequence and array permits the information stored on the label to be recovered by an electro-optical sensor. Polygonal cells, other than hexagons, that are arranged with the geometric centers of adjacent polygons lying at the vertices of a hexagonal or other predetermined array, may likewise be used to encode information on an optically readable label. Such polygonal cells, when arrayed with their respective centers at predetermined locations on a two-dimensional geometric array and when encoded in a predetermined sequence, through assigning different optical properties to a plurality of such polygonal cells, may be "read" by an electro-optical sensor and subsequently decoded in accordance with the process of the invention described below.
The polygonal cells of the invention are information encoding units formed by a closed broken line, which cells are arrayed in a predetermined two-dimensional pattern on an optically readable label. Label configurations employing a wide variety of polygonal shapes, and arrays of varying geometries, such as hexagonal, rectangular or square arrays, are usable in I the practice of the invention. "Adjacent" polygonal cells may be totally contiguous, partially contiguous or noncontiguous on the optically readable label of the Invention.
"Contiguous polygons" are polygons arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array and with the borders of such polygons touching \he borders of immediately adjacent polygons, leaving no interstitial spaces. "Partially contiguous polygons" are polygons arranged with th* geometric centers of adjacent polygons lying at the vertices of a 2342-89-283 2 6 0 ; predetermined two-dimensional array and which polygons are separated somewhere along their' respective borders from other surrounding polygons^ thereby causing a multiplicity of interstitial spaces to be interspersed among said polygons on the optically readable label. "Noncontiguous polygons" are individual polygons arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, and having no contact between the borders of an individual polygon and polygons surrounding said polygon. Additionally, the polygonai cells and the predetermined two-dimensional grids or arrays upon which the centers of adjacent polygons are located may be irregular, having unequally-spaced axes, or regular', having equally-spaced axes,, in configuration. Such twp-dimensional array axes may be independent of the axes of symmetry, if any, of the polygonal cells.
As used in the label of this invention, hexagons present certain important advantages for encoding information on a label. Those advantages are: (1) For a given optical resolution, hexagons can be more densely packed than other polygons. For example, at a given resolution, the corners of squares are more difficult to resolve, so that otherwise unnecessary optical resolution is required to "read" squares. Circles would be optimal for optical resolution, but the space between adjacent circles would be wasted and would » complicate the processing and printing of the label image, because of the need to assign an optical property to the spaces. Hexagons permit optimum packing of information, compared with circles or other pol^9 * Including, octagons, squares, triangles and the like. Squares ,d triangles are problems because of the sharp corners they have. Circles and octagons are problems because of the.wasted space between adjacent circles or octagons. (2) A grid of contiguous hexagons has three axes. By using a label of a square or rectangular shape the major axis of the hexagon can be located by Its predetermined relation to a side of the label. This location of the major axi3 of a hexagon d. (j o 2342-89-283 grid facilitates the reading of the data encoded in the hexagon by its relation to that major axis.
As used herein, "label" includes a discrete unit, with a suitable adhesive backing, to be attached to a package or product, and the exterior surface of a container or other object on which optically-readable information is imprinted in accordance with this invention.
As used herein, "optically-readable data array" or "data array" means a pattern of contiguous hexagons or other polygonal cells having two or more optical properties to encode, in retrievable form, a body of data by virtue of the respective optical properties of and spatial relationship of the hexagons or other polygonal cells to each other. The hexagons or polygons imprinted to contain this recoverable information are referred to herein as "information-encoded" hexagons or polygons, because of the manner in which the label encodes information.
The pattern of contiguous hexagons with the maximum number of hexagon-to-hexagon interfaces for optimal reading and maximum information storage density is referred to as a "honeycomb pattern." The contrasting reflective properties utilized to print the individual hexagons or cells of the data array can be varied greatly within the spirit of this invention. As used herein, "printing" means depositing materials having predetermined optical properties on a substrate, or changing the optical properties, as when "thermal" printing is used. "Printing" also includes the omission to deposit a material having a predetermined optical property on a portion of the substrate, where the substrate itself has a distinct optical property. For example, in printing hexagonal cells in black and white, If the substrate is white, then only black cells must actually be printed. Thus, as used herein, the white hexagonal cells are also within the definition of the terra "print" or "printed." ' As used herein, "optical properties" means light absorption, reflection and/or refraction properties of cells 18 2342-89-283 26 0 printed in different media-. Where cells are printed in black (high density black ink), gray (half tones of black) and white (no printing on a white substrate), as i3 the case in the preferred embodiment of the invention, the invention is said to have three optical properties.
As used herein, and with reference to Fig. 1, "plurality of concentric rings" or "concentric rings" 10 means two or more concentric rings 12, one of which is the interior area of a circular zone 15 defined by the smallest radius "r" of the rings.
Fig. 2 illustrates a portion of an electro-optically scannable label in accordance with the principles of this invention. As seen in Fig. 2, the label comprises a multiplicity of adjacent printed hexagonally-shaped cells, formed in a honeycomb pattern. Each of the individual hexagons is designated by numeral 20, and comprises 6 equal sides 22. The interior angles "a" of the hexagon are also equal, each of 120 degrees. In the illustrated embodiment, the hexagon has a long vertical axis y-y and a horizontal axis x-x. The x-x dimension of the hexagon 20 is somewhat smaller than the y-y dimension of the hexagon 20 due to the geometry of a regular hexagon.
In a preferred embodiment of the invention, as shown in Fig. 3, utilizing a label 30 having dimensions of approximately 1" by 1", there will be approximately 888 hexagons or cells 20 (taking Into account the fact that, in the preferred embodiment, the center of the label is occupied by an acquisition target 35 comprised of a plurality of concentric rings). These contiguous hexagons 20 naturally form horizontal rows "R", defined by imaginary lines 31, and vertical columns "C", defined by imaginary lines 33. In this example a one inch by one inch label has a total of 33 horizontal rows "R" and 30 vertical columns "C" of hexagons 20. Each individual hexagon has a "diameter" of about 0.8 mm. There are more rows "R" than columns "Cn in a square perimeter bounding a honeycomb pattern of hexagons, due to the geometric packing of the contiguous hexagons. -19 23 '12-09-283 260 1 Utilizing the hexagons illustrated in Fig. 2, it will be seen that the hexagons are aligned in staggered and overlapping vertical columns, with alternate vertically spaced hexagons having co-linear y-y axes. The y-y axes of spaced hexagons 20 are in alignment with an exterior Vertical side 22 of an intermediate, displaced hexagon. The y-y axes of hexagons 20 are parallel to the two vertical borders 32 and 34 of the label, as depicted ir» Fig. 3. Horizontal rows "R" are measured through the x-x axes at the mid-point of the hexagon 20.
As more fully described below, the hexagons 20 are formed by a printing process which will print the hexagons 20 in two or more optical properties, for example, contrasting colors. Those colors may be white 25, black 26 and also, optionally but preferably, gray 27 as illustrated in Fig. 3, although other contrasting colors may be utilized. It is possible to use only two contrasting colors, such as white 2S, and black 26 as seen in Fig. 2. In the preferred embodiment of the invention, three contrasting colors are utilized, white 25, arid black 26, and gray 27, illustrated in Fig. 3. The particular shades of white, black, and gray are ' selected to achieve optimum contrast for ease of identification by an electro-optical sensor. The gray level is selected so that its optical properties fall approximately equally between the optical properties of the white and black being used in creating the label.
The label 30 of Fig. 3 may be formed by using a discrete label, having, in a preferred embodiment, a one square inch area, or, if an acceptable color background Is utilized (preferably white), the label may be printed directly on a package surface, without requiring a discrete label. Because of the Importance of having a controlled optical property background for one of the contrasting colors, it la preferable to use a discrete label, because the color of the label background is more easily controlled.
The alignment of fthe hexagons printed on the label in relation to the sides of the label is important for subsequently 2342-89-283 Q £ f\ * —y 260 1 determining the major axis of the label as described below. The label is printed so that the y-y axes of the hexagons forming the honeycomb will be parallel to the vertical sides of the label, 32 and 34, as shown in Fig. 3. , In "reading" the hexagonal array, in order.to decode the information contained in the Individual .hexagons, it is important to have a sharp color contrast between adjacent hexagons. For reasons described below, the fewer optical properties utilized to encode the hexagons, the simpler may be the scanning 10 equipment and software necessary to decode the hexagons. However, fewer optical properties also decrease the data density of the label. In a compromise between the amount of decoded information capable of being stored on the label and the cost.of scanning multi-optical property labels, it has been found desirable 15 to print the encoded hexagons with three optical properties, namely the colors black, gray and white. If the substrate or label has a good white background, then white hexagons can be created by the absence of ink, and only black and gray hexagons actually need to be printed.
In the preferred embodiment of the invention, the gray hexagonal cells are created by printing the cells with black ink, but only every fifth pixel of the pixel grid of a dot matrix printer is so printed in the illustrative example described herein. This is done by the use of a half-toning algorithm, in a 25 manner which is well known in the art. This allows a printer to print a predetermined proportion of the pixels to define a given gray hexagon, whereas a black hexagon requires printing every pixel defining that hexagon. The specific half-toning algorithm used tc print labels of the preferred embodiment is contained in 30 the source code listings entitled "LABEL" in the Microfiche Appendix, page 75(a29), lines 39 to 48.
The black hexagonal cells can be formed by printing with a standard black ink. ' As described below, the scanning analysis software of the decoding process makes gross determina-35 tions among black, gray and white reflectivities, so that precise 21- 2342-89-283 2 color definition is not necessary. On the other hand, if colors other than black, gray and white are used, or if various shades of gray are used, to create four or five color data.arrays, the contrast of ink shades must be much more carefully controlled to ensure measurable optical property differences among the various colors. It will be appreciated that the use of black ink is the simplest and easiest approach to creating a three optical property honeycomb array of hexagonal cells, and is the preferred embodiment of the invention..
Because of the square shape of the label in the preferred embodiment and the nature of the hexagonal cells, the edges of the honeycomb will contain incomplete hexagons 56; as seen in Fig. 3 these incomplete hexagons are not used to convey any useful information.
•In the preferred embodiment of the invention, the label also contains an acquisition target. The acquisition target 35, seen in Fig. 3, comprises a plurality of concentric rings of contrasting colors (shown as black and white). The black rings are respectively designated 42, 46 and 48, and the white rings are respectively designated 44, 50 and 52. The target is preferably located in the geometric center of the label, to make it less susceptible to being damaged or destroyed, in whole or in part, if the periphery of the label is torn, soiled or damaged. Also, the size of the image buffer (described below), needed to store the data from the label before the label target is Identified, is minimized when the acquisition target is in the label center.
The number of concentric rings used in the acquisition target may be varied, but the six concentric rings 42, 44, 46, 48, 50 and 52 and their resulting Interfaces as they vary from white to black to white, etc., have been found to be convenient and desirable.
A pattern correlating technique is used to match a computed pattern of what the concentric rings are expected to be with the pattern being read. When the match occurs the acquisition target has been located as more fully described below. The 2342-89-283 specific filter created and utilized in connection with the preferred embodiment of the invention may be found in the Microfiche Appendix, page 75(a41)i lines 51 to 52page 75(a42), lines 1 to 8 and page 75(a40), lines 19 to 41 under *-he file name "FIND.C." The acquisition target may be d£ any overall diameter smaller than the data array, to provide an area which may be 25%, and is preferably about 7%, of- the area of the data array. Preferably the acquisition target is sized as small as possible since the area it occupies on the label cannot carry encoded information. In the preferred embodiment the diameters of the imprinted rings are selected so that the outside boundary of the external ring 52 ia about 7.45 millimeters. Thus, in Fig. 3 the area of the acquisition target 35 occupies about 7% of the surface area of the one square inch label 30. In this way, a satisfactory acquisition target 35 may be imprinted on a one inch square label 30 without unduly interfering with the amount of information which can be encoded in the hexagonal array that surrounds the acquisition target. As is the case with the incomplete hexagons at the outer periphery of the label 55, the fractional hexagons contiguous with the outer boundary of the acquisition target 56 are not utilized for the purpose of encoding information. The width of each ring is desirably about the same as the side-to-side (x-x axis in Fig. 1) dimension of the hexagons, to facilitate resolution. Six rings are convenient. This is a reasonable number to facilitate location of the rings in a minimum label area with a minimum of possible falsa readings from "spurious" marks on the label and other "spurious" marks not on the label, such as marks elsewhere on a conveyor belt.
The acquisition target may take shapes other than concentric rings. For example, squares, spirals or hexagons may be used in order to create transitions of contrasting concentric figures, so long as linear sections through the acquisition target will create regular, predetermined and identifiable color transitions, susceptible'of being sensed by an electro-optical sensor and measured by a suitable filter. It is to be noted that, 2342-69-283 260 * j although a spiral is not a collection of concentric circles, depending on the size and radius of the'spiral, a close approximation of concentric circles can be achieved. A target of concentric rings is preferred, because the_ signal generated by a scan through their center has a frequency which is the same when sections are taken in any direction through the center of the concentric rings. This makes identification of the center simpler, as more fully described below, and 'allows identification of the location of the acquisition target with a one-dimension search of the analog or digital output of the scanner, although the process of the invention may alternatively or subsequently utilize a two-dimensional digital search for increased accuracy when a digital signal is being analyzed.
As used herein, "Concentric Rings" is intended to embrace complete rings, partial rings in the form of semi-circles, sectors of concentric rings occupying between 180 degrees and 360 degrees and concentric spirals which approximate concentric rings.
Since each hexagon may be encoded in three different optical properties, in the preferred embodiment, 1.585 "bits" of information may be encoded in each hexagon (log 3).
Obviously, if fewer.or more optical properties than three are utilized, the number of bits encoded in each hexagon will vary commensurately. The encoding algorithm is structured to achieve close to maximum data density and to Increase the number of cell-to-cell optical property transitions, in order to facilitate the two-dimensional clock recovery process described below.
Figure 4 illustrates a 3 cell x 3 cell cluster of nine hexagonal cells 60, the basic encoding unit utilized in the preferred embodiment of the invention.. This is a desirable encoding approach, but is not essential. Other encoding units are feasible, within the purview of the invention. As more fully described below, the 3 cell x 3 cell clusters of hexagons 60 are mapped to encode 13 bits of information if the cluster contains a full complement of 9 hexagons, or less than 13 bits if the cluster is incomplete by having unusable hexagons. In a one inch square 2342-89-283 26 0 1 label with a data array comprising about 888 hexagons and an acquisition target occupying about 7 percent of the label area, about 1292 bits of Information may be encoded.
In encoding each cluster, external, bottom hexagons 62 and 64 in each cluster 60, as seen in Fig. 4, are limited in their respective, optical properties, so that they are determined always to be different from intermediate and contiguous hexagon 66.
Thus, only one bit per hexagon can be encoded in hexagons 62 and 64. In this way it is possible to encode 13 bits of information in cluster 60 by encoding 11 bits onto the remaining seven hexagons. Since mapping 7 hexagons provides more possible combinations than are utilized (1.e.. 3T=2187 combinations vs. 2l,=2048 combinations), some combinations are rejected as, for example, all black, all gray, all white or substantially all black, gray or white combinations. The reasons for requiring contrasting colors of hexagons 62 and 64, compared to hexagon 66 ere to guarantee transitions necessary for the clock recovery step and optional normalization process step described below and to assist in determining horizontal alignment of the data array, as described below. In cases where encoding clusters have 7 or 8 hexagons, 7 usable hexagons are encoded with 11 bits and the eighth hexagon, if available, is encoded with 1 bit. For all other partial clusters 3 bits are encoded on every pair of hexagons and 1 bit onto each remaining single hexagon as more fully described below.
It will therefore be seen that the label constitutes a particularly efficient, easy-to-read (by means of appropriate scanning equipment and analytical software) label for encoding a very high density of information into a relatively Inexpensive, easy-to-print label. As noted, the preferred e.nbodiment utilizes a 33 row x 30 column packing of hexagons into a one square-inch label, with an acquisition target representing approximately 7% of the total surface area of the label. In practice, 13 bits of * Information are obtained from a cluster of 9 hexagons, so that 1.44 bits of data are derived per cell. This is less than the 2342-89-283 260 theoretical 1.585 bits per hexagon because of the other constraints of the encoding algorithm, since all 37 patterns are not used, and soma of the least optically desirable cell-to-cell transitions are eliminated.
For reasons described below, in the preferred embodiment of the invention, it ia desirable to incorporate a certain amount of error protection into the encoding of the label, so that the actual amount of recoverable information in the label is reduced in favor of * Mgh degree of data integrity in the decoding process.
As may be readily appreciated by one skilled in the / art, the foregoing discussion of label embodiments employing hexagonal cells is directly applicable to optically readable labels utilizing other polygonal cells. The disclosed methods of "printing" optical properties of hexagons apply equally to printing the optical properties of other polygonal cells, whether in black, white, gray (through half-toning) or other colors. Similar constraints and advaintages as to data density enure to labels printed with polygonal cells other than hexagons when the optical properties black and white, and optionally gray,, are utilized to print the polygonal cells. Ao with hexagon-containing labels, labels printed with other polygonal encoding cells may be "read" with scanning equipment o£ less complexity when only two optical properties are utilized to encode information In the polygonal cells. In particular the colors black and white, because of the maximum contrast that is obtained with these colors.
Information encoding procedures and the algorithm described for hexagon-containing labels are directly applicable to labels printed with different polygonal cells. Similar to hexagon-containing labels, incomplete polygonal cells which may appear at t'border of the optically readable label' or that result from partial obliteration by the acquisition target, comprising a series or concentric rings are not used to encode information.
A "honeycomb pattern" comprises an- array of contiguously-arranged hexagons 310, the geometric centers 311 of 2J-12-U9-203 which likewise lie at the vertices 311A of a "hexagonal grid" or "hexagonal array" 312, as shown in Fig. 11.. Regular hexagons, i.e. hexagons having six equal sides and six equal interior angles, form hexagonal arrays that are likewise regular in configuration, having three equally-spaced axes (Al, A2 and A3) that are spaced 60 degrees apart.
If the hexagons 320 of the label are irregular, but symmetrical, as for instance, if the hexagons are stretched along two parallel sides 321, 322, the geometric centers 325 of adjacent hexagons will describe an irregular hexagonal array 327, as shown in Fig. 12. Such an irregular hexagonal array will still have three axes (Al, A2 and A3), however, the three axes will not be equally spaced i.e. the three axes will not all be 60 degrees apart.
Although the hexagonal array of Fig. 12 is not regular in nature, it is nevertheless a two-dimensional geometric grid or array having axes of predetermined spacing. Thus, the locations and spacings of the geometric centers of the hexagons located at the vertices of the intersecting axes of the hexagonal array are also predetermined! The geometry of- the hexagonal array is then utilized in the decoding process described below. Specifically, the filtration step, performed on the transformed digital data corresponding to the image sensed by the optical sensor, is adjusted to reflect the predetermined label geometry, so that the digital representation of the sensed label can be used to precisely reconstruct the original grid. The reconstruction process further supplies the missing points from the hexagonal grid. The missing grid points occur because optical property transitions did not t*ke place between polygons of like optical properties.
With Irregular hexagonal grids of the type disclosed In Fig. 12 It will be 'desirable to adjust the major axis determination step, step (3)(e) of Fig. 7 of the decoding process done after the Fourier transformation step of the process to. -27 26 0 identify the major axis of the optically readable label. The major axi3 of the label will have the geometric centers of polygons lying along this axis at different spacings than on the other two axes.
Label configurations of the invention approximating the preferred embodiment containing hexagonal cells as described above are possible using certain polygonal cells. Figure 13 illustrates a label configuration utilizing polygonal cells 330 which substantially resemble hexagons, but which are 20-sided 10 polygons, rather than hexagons. Similarly constructed polygons with more or less than 20 sides could also be printed. Polygons 330 are partially contiguous unlike the .imaginary contiguous hexagonal cells 331 in which they are depicted.
The interstitial Bpaces 332 of the Fig. 13 label em-15 bodiment may or may not be printed with a different optical property than the encoded polygons. Interstitial spaces do not carry encoded information, therefore, their presence leads to a lower data density for a given optical resolution and performance level. Further, if the interstitial spaces dispersed among polygons are 20 of a different optical property than the adjacent polygons, more transitions between the optica], properties of the polygons and the interstitial spaces could be sensed by the optical sensor and : -thus a higher clock signal energy would appear in the transform domain within the decoding process described in detail below. 25 Because the polygons of the Fig. 13 label are arranged on a hexagonal grid having three equally-spaced axes, the geometric centers 333 of the polygonal cells 330 lie at the vertices of hexagonal array 335. .The spacing, location and spatial orientation of the centers of the polygons are predetermined and 30 can be detected in the transform domain of the decoding process. 2342-89-283 260 The Fig. 13 label utilizes polygons substantially in the form of hexagons. Because they so closely approximate a hexagon, the optical sensor at a moderate resolution could "read" them as hexagons. The geometric centers 333 of the polygons 330 do lie, however, at the vertices of the three equally-spaced axes (Al, A2 and A3) of the hexagonal array 335.
Fig. 14 illustrates a similarly shaped (to polygon 330 in Fig. 13) polygonal figure 340 that has been arranged to be totally contiguous. These polygons 340 can be approximated by an imaginary hexagon 341, as in Fig. 13, but no interstitial spaces (332 of Fig. 13) may be found between the actual polygons. Such a contiguous arrangement Is desirable to simplify the decoding process, but is not mandatory, in the practice of the invention. Polygons 340 are shown with their respective geometric centers 342 lying at the vertices of a hexagonal array 345. Again, as for the polygons 330 In Fig. 13, polygons 340 are substantially in the shape of hexagons, and at a moderate optical resolution .would appear to be hexagons.
Fig. 15 is a blowup of a label as it would appear if printed with a dot matrix printer printing 200 pixels per inch. Polygons 360 of Fig. 15 illustrate the shape of the geometric figure that will actually be printed In place of a hexagon with such a dot matrix printer, because of the pixel density of ttie printer. Printers with greater pixel densities should yield closer approximations of a hexagon than the polygons 360 shown on Fig. 15. Thus, polygons 340 of Fig. 14 and 360 of Fig. 15 are likely resulting shapes, due to the inherent limitations of certain printers, of the printing process for labels containing hexagonal cells or result from deliberate efforts to print such polygons 2342-89-283 substantially in the form of hexagons in the first instance. The shape of such polygons substantially in the shape of hexagons allow them to function. In a practical sense, as equivalents of contiguous hexagonal encoding dells.
As in the case of Fig. 3, the optically readable label of Fig. 15 also contains an acquisition target 370 comprising a series of concentric rings 371 through 376. Like the hexagons on the label of Fig. 3, the polygons 360 substantially in the form of hexagons in Fig. 15 are arranged in columns "C" and rows "R, " as bounded by imaginary lines 361 and 362 and 363 and 364, respectively. Also, as in the case of the hexagons of Fig. 3, the polygons of Fig 15 have their respective geometric centers lying at the vertices of a hexagonal array as defined by equally-spaced axes Al, A2 and A3. Thus, labels of the configuration shown in Fig. 15 are readily encoded and decoded In accordance with the processes disclosed hereinbelow.
If an alternative label geometry is employed such as utilizing a square or rectangular array, or the like, adjustments must be made in the two-dimensional clock recovery process described below. The different geometry of the predetermined array requires changes to be made in the filters utilized in the filtering step of the two-dimensional clock recovery process. The filters operate on the transformed digital data corresponding to the optical properties of the polygons read by the sensor in the image domain. Such minor adjustments to the filtration scheme could easily be made by a person of ordinary skill in the art. In situations where the predetermined two-dimensional array has unequally-spaced axes, or is irregular in configuration, it may be desirable to identify the major axis of the label prior to performing the Fourier transformation of the digital data representing the optically sensed image. This is because the geometric centers of the polygons are not equally spaced' along the axes.
Noncontiguously-airranged polygons can also be utilized to create an optically readable label in accordance with the 2342-09-283 present invention. Fig. 16 illustrates a hexagonal array of squares 420, which are noncontiguously arranged with their . respective geometric centers 422 lying at the vertices 'of a hexagonal array formed by the three equally-spaced axes Al, A2 and A3. It is apparent that the configuration is a hexagonally-based configuration from the grid of imaginary hexagons 421 which can be overlaid upon the polygons 420, thereby forming interstitial spaces 425.
Similar arrays to the square 420 shown in Fig. 16 may be constructed using rectangles. Fig. 17 illustrates a multiplicity of rectangles 430 arrayed with the geometric centers of adjacent rectangles lying at the vertices of a hexagonal array formed by intersecting axes Al, A2 and A3. Again, visualization of the hexagonal arrangement is aided by the imaginary hexagons 431 in Fig. 17 overlaid upon the noncontiguous rectangles 430, thereby creating interstitial spaces 435 between rectangles 430. Fig. 18 likewise illustrates a noncontiguously-arranged label comprising pentagons 440 having the geometric centers 442 of adjacent pentagons 440 lying along the three equally-spaced axes Al, A2 and A3. The geometry of the noncontiguous pentagons is more easily visualized by overlaying the pentagons 440 with imaginary hexagons 441, thus forming interstitial spaces 445 between pentagons 440.
Alternative hexagonal arrays may be constructed where the axes of the array Al, A2 and A3 are equally spaced, but do not correspond to the axes of symmetry of the polygonal figures themselves. Instead, the geometric centers of adjacent polygons lie at the vertices of the intersecting axes, of the array. Such an arrangement is illustrated in Fig. 19, comprising a series of contiguous rectangles '450, having the geometric centers 451 of adjacent rectangles lying along axes Al, A2 and A3.
Higher order polygons may be similarly arrayed on a predetermined two-dimensional grid. Fig. 20 shows a series of partially contiguously-arranged octagons 460 defining a multiplicity of interstitial spaces 461 among said octagons 460. The centers 462 of adjacent octagons 460 are located at the vertices 2342-39-283 <Co 0 of intersecting axes Al and A2, thus forming an array of octagons 460, which may be used in the practice of the invention. Interstitial spaces 461 may be printed with an optical property different than is used for octagons 460. However, this is not mandatory in the practice of the invention, since it is the location, orientation and intensity of the optical property at the center of the octagons 460, lying at a predetermined position on the hexagonal array formed by axes Al and A2, that is most important in the decoding process.
It will be appreciated that although a preferred embodiment of the label has been disclosed and described, many variations of the label are possible without departing from the spirit or scope of this invention. For example, the label need not be one-inch square. One square inch was selected as a reasonable size of label, to achieve an acceptable data density of 100 alphanumeric characters of information with a high degree of error 2342-89-283 protection applied thereto, without creating an excessively large size label. It is desirable to have a one square inch label, to reduce the paper and other costs associated with the- printing, shipping and handling of such labels. Conventional bar code labels of similar size would have a radically decreased data density. Using 4, 5 or more optical properties or colors to define the hexagons will allow substantially more information to be packed into a given space of hexagons of pre-determined size, but with a resulting increase in the complexity of the software and sensitivity of the scanning system required in order to be able to recover that information. Thus, for practical purposes, a three optical property, black, gray and 'white, encoding system of optical properties is highly desirable. Also, the sizes of the hexagons and acquisition target may be varied widely within the spirit and'scope of this. Invention.
Although "clustering" of hexagons in 3 cell x 3 cell clusters has been described, other pattern's of clusters may be used or clustering may be omitted entirely and the encoding algorithm may be directed specifically to an individual hexagon pattern.. Also, the relative amounts of encoded information devoted to the message as opposed to error correction may also be varied within wide limits within the spirit and scope of this invention.
LABEL ENCODING Described below is the encoding' process of this invention, as applied to the preferred label embodiment. It will be understood that the preferred embodiment is being disclosed and that numerous combinations, variations and permutations are feasible within the purview of this invention.
The process may begin with a predetermined series of data desired to be encoded on a label. In a preferred embodiment, the label is a shipping label, and the data is broken into two fields, identified as a "high priority message" and a "low priority message." It will be understood, however, that the invention is not restricted to two different messages or levels of 33- 2342-89-283 priority. Many messages and levels of priority may be created within the quantitative limits of a label of given size and number of cells.
For example, where the label is intended as a shipping label, the "high priority message" may constitute nine characters, representing the zip code of the recipient of the intended package, parcel or letter. Mine digits is referred to because, although many individuals and companies have five digit zip codes, nine digit zip codes are being used with increasing frequency. Therefore, in handling packages for delivery,' the most Important piece of information is the zip code. This determines the general destination of the package and allows various scanning and package control systems to be used to direct the package to the proper destination on trucks, aircraft, in a conveyor system and the like.
The low priority message may, for example, include the name and shipping address, including zip code, of a recipient of the intended package, as well as billing information.
The reason for creating a high priority message and a low priority message is to protect the high priority message with extra error correction, to allow the high priority message to be placed (encoded) in a more central area of the label, where it is -less likely to be damaged or destroyed, and to permit the high priority message to be repeated and distributed in the low priority message so that, even if the high priority message is selectively destroyed, there is a high possibility that the high priority message can be retrieved from the low priority message. By locating the high priority message in a central area, it may only be necessary to decode the high priority message for some purposes, so that only a portion of the label needs to be processed, thus speeding up processing time. This will occur, for example, when a parcel is on a conveyor and only the zip code needs to be determined to control which of several conveyor paths the parcel should take in the handling process. 2342-89-283 Because it i3 of a lower priority, the low priority message is not-presented twice on the label. However, as described below, both the high priority and the low priority messages may incorporate various error protection codes and correction capabilities, in order to maximize the likelihood that both messages may accurately be retrieved.
I The use of error protecting characters as part of the encoded information can, in the preferred embodiment of this invention, in combination with an appropriate stored program and computer, cause the system to correct an error during the decoding process, in the manner described below. The use of error protecting codes is well known in the art and is'within the purview of the skilled person, in the art.
In the practice of the invention an operator creating a label may manually input the data to a suitable computer terminal which is designed, in the manner described below, to activate a printer to print a label with the high priority message and the low priority message suitably encoded in the hexagons of the label. It is not essential to the invention that a high priority message and a low priority message be created, but it is desirable in order to maximize the likelihood that the most important data to be encoded will be retrieved. In the preferred embodiment the label ia also printed with a centrally-located acquisition target comprising a plurality of concentric rings of two alternating contrasting colors, 'the colors preferably being two of the colors utilized to print the individual hexagons, and most preferably black and white to ensure maximum contrast.
The operator manually inputting this data will cause a suitably programmed computer to encode each character of the input message and use suitable field designators, in order to create, in the operated computer, a binary bit stream, representing the characters of the message and suitably encoded by field to designate the high priority and low priority messages and the relative position of each. This operation is carried out by the program '' "TEXTIN.C" which may be found in the Microfiche Appendix, page 75(al) 2342-89-283 26 0 lines a to 54; page 75(a2), lines 1 to 54; and page 75<a3), lines 1 to 36; and is designated 110 on Fig. 9. A computer with the required features may be a Compaq Deskpro 386 (with a 16-MHz clock and an Intel 80387 math coprocessor chip).
Alternatively, the process may begin with the information to be encoded already contained in a binary bit stream, because, for example, it was received from a storage medium or otherwise created. Therefore, the message to be encoded can exist in a form which is manually (with electronic assistance) converted to a binary bit stream or which begins as a binary bit stream.
Once the binary bit stream has been created or an error-protected bit stream has been produced by the steps discussed more fully below, the bit stream must be mapped in accordance with a predetermined mapping pattern for-the encoding of the hexagon honeycomb of this invention. Fig. 5 is a "cluster map" which shows the individual hexagonal cells of 3 cell x 3 cell clusters aligned in a grid or honeycomb containing 33 rows and 30 columns of hexagons. Each row is numbered, and each column is numbered. The row numbers range from 1 to 33, and the columns range from 1 to 30. It can be seen that certain of the hexagons designated along the upper surface and right-hand surface of the region map, and within the geometric center of the'grid are designated by X' a. This Indicates that these hexagons do not contain bit-mapped information. This is because the exterior X's represent partial hexagons at the edge of the label, thus causing each of these rows to each have one fewer hexagon. The interior hexagons designated by X's represent spaces either occupied by the acquisition target or incomplete hexagons around the perimeter of the acquisition target, so that these interior hexagons indicated by X's are not bit-mapped.. All of the hexagons which are not identified with X's are capable of recording information. In accordance with the preferred embodiment, each of these spaces will be occupied by a black (B), white (W) or gray (G) hexagon. Aa noted above, although various clustering and mapping techniques can be utilized, the application of this invention may use clusters of 9 2342-89-283 26 0 1 7 3 hexagons in 3 rows of 3 hexagons each to define specific bits of information, and, as also described above, 13 bits of information are desirably encoded in each such 9-hexagon cluster.
In a data array comprising 33 rows and 30 columns of 5 contiguous hexagons, a grid of 11 rows by 10 columns of hexagon clusters each containing a 3 cell x 3 cell- arrangement of contiguous hexagons, is formed and may be visualized in connection with Fig. 5. It will be appreciated however that every row of 3 cell by 3 cell clusters within the 11 cluster x 10 cluster grid 10 will contain a cluster of either 7 or 8 hexagons because of the geometric packing of hexagons, and the number will alternate from row to row. Thus, 6 clusters containing 8 hexagons and 5 clusters containing 7 hexagons result from this arrangement. Also, thr- centrally located acquisition target creates additional in-:i5 coreplete clusters. Fig. 5 thus provides a" graphic representation of usable clusters of hexagons available for encoding with bits of information in a 33 row by 30 column data array of contiguous hexagons.
With reference to Fig. 4, clusters with nine usable 20 hexagons are encoded utilizing the following algorithm: Take eleven bits of information and map them into the set of seven hexagons identified as a, b, c, d, e, f and h.
Hexagons g and i are used'to represent 1 bit each in such a way as to guarantee that each of them is different from hexagon h.
Thus, thirteen bits of Information are encoded in a complete 3 cell x 3 cell cluster of nine contiguous hexagons.
For partial clusters of 7 or 8 usable hexagons: Take eleven bits of information and map them 30 into the set of the first seven usable hexa gons.
The eighth hexagon, If available, is used to represent one bit.
For all other partial cells: Map three bits of information into as many pairs of hexagons as possible. 2342-89-283 2 60 1 7 3 Any remaining single hexagons are used to represent one bit.
Since mapping seven hexagons provides more combinations than eleven bit3 (i.e., 3T = 2187 vs. 211 = 2048), some combinations S of the hexagons need to be rejected. The rejected combinations are chosen to be those that provide the fewest number of transitions. To implement this, look-up tables were created to map the clusters in accordance with Fig. 5. The creation and use of these look-up tables is within the capabilities of a skilled 10 programmer. With reference to Fig. 9, the program for creating the look-up tables "BINHEX.LUT'1 132 and "HEXBIN.LOT" 134 may be found in the Microfiche Appendix, page 75 (a4), lines 3 to 52; page 75 (a5) lines 1 to 53; and page 75(a6), lines 1 to 34, and is identified as "MK HEX LUT" 130.
Use of this bit allocation scheme allows 1292 bits of information to be encoded in a 33 row x 30 column data array of contiguous hexagons.
The sequence in which the high priority information and low priority information is located throughout the cluster map is 20 predetermined, depending upont (a) The size of the high priority message; (b) The size of the low priority message; and (c) The optimum location for the high priority message in a protected place.
Utilizing the cluster map as illustrated in Fig. 5 as a template, a stored mapping program "MKMAPS.C" 140 operating on the digital data contained in a storage medium makes a predetermination of how to distribute the Information — both the high priority message and the low priority message -- throughout the 30 cluster map, as more fully described below. The mapping program is Identified in the appended source code listings as "MKMAPS.C" 140 and may be found in the Microfiche Appendix, page 75(al9), lines 3 to 53; page 7b(a20), lines 1 to 53; page. 75(a21), lines 1 to 53; and page 75(a22), lines 1 to 42.• • 38- 2342-89-283 26 0 1 In order to minimize the likelihood of error, and be able to correct errors, the preferred embodiment of the invention desirably includes extensive error protection and correction capabilities. For example, in a preferred embodiment having 1,292 5 bits of information able to be encoded in a one square inch array of hexagons having 33 rows x 30 columns of.hexagons, and an acquisition target occupying about 7% of the label area, it is desirable to utilize 36 high priority message information bits to encode a 9-digit zip code plus one additional alphanumeric character, which 10 may represent a shipping code. In this example, it would also be desi, -able to use 1.20 check bits for the high priority message.
This is determined by the amount of error correction capability « desired. Similarly,, in the illustrative embodiment, 560 bits of low priority message are included; this includes 40 bits of high 15 priority message which is incorporated in the low priority message. In the example, 576 low priority message check bits will be added in order to maintain the security and facilitate recovery of the low priority message. This example illustrates the much more lavish use of check bits in order to preserve and per-20 mit recovery of the high priority message as opposed to the low priority message. It is to be understood that the foregoing information is by way of example only and that the high priority message could be longer or shorter, the low priority message longer or shorter, and the number of check bits greater or fewer, 25 depending upon the particular application of the invention.
A "systematic code" takes a specific message sequence and adds a distinct error check sequence to the message sequence. A "non-systematic" code takes a specific message sequence and incorporates the error check sequence' with the message sequence 30 so that the message is no longer distinct, but Is, o£ course, recoverable. It is within the purview of this invention to use either systematic or non-systematic coding for error protection. The disclosure below is of a systematic code. 2342-89-283 CO 0 As defined herein, the step of "interposing error detection symbols" includes systematic and/or non-sy3tematic coding systems.
Various systematic linear cyclic error protection codes are knovm in the art, for example, BClf codes, Reed-5olomon codes and Hamming codes. In a preferred embodiment, Reed-Solomon codes are separately incorporated to protect the integrity of the high and low priority messages. Reed-Solomon codes are very efficient and most useful when multi-bit characters are being error-checked. Reed-Solomon codes are well known and it is to be understood that this is simply a preferred embodiment, although many other error correcting codes could be utilized in the invention. Reed-Solomon and other coding systems are discussed in, for example. Theory and Practice of Error Control Codes. Richard E. Blahut, Addison Wesley, 1983, at pages 174 and 175.
By way of example, some relevant information about the Reed-Solomon code is set forth below. Specific characteristics of a Reed-Solomon code can be specified by the following parameters: m = number of bits in each symbol n = number of symbols in the block a 2m-l k = number of message symbols (number of message bits = km) t = correction capability in number of symbol-j = (n - k)/2 A nine-digit zip code and single alphanumeric characr ter for further Identification purposes requires 36 bits without error protection in the example described below. A Reed-Solomon code with the following parameters was chosen for the high priority message. m = 6 (6 bit symbols) n = 26 - 1 = 63 t = 10 Therefore, k = n - 2t =» 43 Since only six 6-bit symbols are required to represent a 36-bit message, the remaining 37 symbols (43-6) are padding symbols, which are Implied between the encoder and the decoder. 2342-69-283 26 0 i 7 and need not be stored on the label. Thus, the. total number of bits required on the label for the high-priority message ia (63 -37) x 6 or 156 bits.
This error coding scheme will be able to correct a maxi- mum of up to 60 (10 x 6) bit errors, which amounts to 38.5% of the bits used. Due to the large number of-implied padding symbols, the large error detection capability of this Reed-Solomon" encoding makes it extremely unlikely that the high: priority message will be read erroneously.
The low priority message was encoded with a Reed-Solomon error protection code having different parameters, namely: m = 8 18 bit symbols) n = 2a - 1 = 255 t = 36 k = n - 2t = 183 Since there are 1292 bits available for encoding on the label according to this illustration, a total of 1136. bits (1292 - 156 high priority message bits and check bits) are available for encoding and check bits for the low priority message.' Thus, the remaining 904 bits (255 x 8 - 1136) have to be implied padding bits. This allows 560 .bits (183 x 8 - 904) for the information content of the low priority message and 576 check bits.
To further ensure recovery of the high priority message it is also Included in the low priority message. The Reed-Solomon error protection code applied to the low priority message permits encoding of an additional 86 6-bit alphanumeric characters and has a maximum error correction capability of about 25.4%.
Utilizing the foregoing Reed-Solomon error protection encoding, the total number of 1292 bits of information available on the illustrative label are distributed as follows: . 30 36 high priority information bits 120 high priority check bits-560 low priority information bits (including 40 bits of high priority message incorporated In the low priority message) 576 low priority check bits The bit stream of data, including the appropriate check bits for preserving the information, are assigned to individual 2342-89-283 26 0 1 hexagons on the cluster map of Fig. S. It will be appreciated that a wide variety of distribution patterns can be utilized, recognizing that the important criteria to be determined are: (1) safe location of'the high priority message proximate the acquisition target (if present on the data array); and (2) creating a pattern which is.reasonably easy to reassemble when reading occurs.
The specific error coding program employed in the illustrative example is contained in the Microfiche Appendix under the program "ERRCODE. C" at page 75 (*15), lines 1 to 52 and page 75(al6) lines 1 to 50.
Encoding for Reed-Solomon codes requires multiplication of the message code vector with a generator matrix. The matrix multiplication is done using Galois Field arithmetic. Addition of any two elements of the field is obtained by performing an exclusive "or" operation between the two elements. Multiplication is performed via a "log" operation iri the Galois Field. The log and antilog are obtained by using look-up tables generated from prime polynomials, specifically for the high priority message: 1 + x*; and for the low priority message: 1 + x* + x1 + x* + x*. With reference to Fig. 9, an auxiliary program "GF.C" 126 generates the look-up tables necessary for the Galois Field arithmetic. Auxiliary program "GF.C" may be found within the Microfiche Appendix at page 75(a8), lines 1 to 53 and oage 75(a9), lines 1 to 32. The look-up tables are computed and stored in the file "GF.LUT" 127 for use during encoding and decoding. The generator polynomial g(x) for the Reed-Solomon code is determined by the following equation: g(x) = (x + a)(x + a1) (x + a^1*) where a is the primitive element of the Galois Field.
The generator Matrix for the Reed-Solomon code is formed by performing a long division for each of the rows of the generator matrix. The kth row of the generator matrix is given by the 2342-39-233 remainder obtained from performing a long division of xn"k-i by g(x).
The computation of the generator polynomials g(x) as well as the generator matrices for both the high priority and low priority messages is implemented according to the auxiliary program "MKRSLUT.C" 125, which may be foand in the Microfiche Appendix, page 75(al0), lines 1 to 52; page 75(all), lines 1 to 53,- page 75<al2) lines 1 to 54; page 75(al3), lines 1 to 52; and page 75(al4), lines 1 to 4 The look-up tables for the generator matrices are generated and stored in the file "RS.LUT" 128.
In a preferred embodiment oL che invention, labels containing hexagons are printed with standard printing equipment that is readily available and inexpensive. A printer having a 300 x 300 dot matrix per square inch capability will yield satisfactory results for printing three-color (black, gray, white) labels having 888 hexagons plus a centrally-located acquisition target. A printer with these capabilities is the Hewlett Packard Laser Jet Series II with 0.5 megabytes of memory and a 300 dot per inch graphics resolution. A 300 x 300 pixel grid having a density of 90,000 pixels' per square inch produces about 90 pixels per hexagon in the preferred embodiment. Each pixel is assigned' a value of 0 or 1, representing a black or white pixel. This printer is utilized to print a two-color data array of black or white hexagons. It may also be us-d to print a three-color data array of black, white and gray hexagons if a half-toning algorithm is utilized to produce gray hexagons, as previously described.
Referring to Fig. 9, by means' cf a stored program "MKMAPS.C," 140 a regions look-up table "REGIONS.LOT" 141 of 34 rows x 30 columns was created, vhich is analogous to Fig. 5, but which was adapted to designate selection of black or white for the acquisition target rings. Individual hexagons are coded for black, white or gray or as unusable. A separate look-up table "HEX MAP.LUT" 142 was created by a stored subroutine of the program "MKMAPS.C" which specifies allegiance of each of the jOO x 300 pixels on the pixel grid to specific regions in the 43 2342-89-283 26o "REGIONS.LUT" 141, i.e.. about 90 pixels per hexagon. Pixels belonging to the finder rings are coded for either black or white. Acquisition target rings are printed by first generating a hexagonal pattern on each region row then generating the rings.
Regions partially or completely covered by the finder rings are rendered unusable in the "REGIONS.LUT" 141,. The foregoing program "MKMAPS.C" and subroutines may be found in the appended source code in the Microfiche Appendix, pages 75(al9) throu^i 75(a22).
The error protection encoded bit stream is mapped in accordance with a predetermined sequence into the 11 x 10 cluster array of hexagons. Still referring to Fig. 9, the sequence is specified by an order look-up table "ORDER.LUT" 1S1 generated by an auxiliary stored program entitled "ORDER.C", 150 which may be found in the Microfiche Appendix, page 75(a26), lines 1 to 47 and page 75 (all), lines 1 to 3 . A stored program "PRLABEL.C" 160 and found within the Microfiche Appendix at page 75(al7), lines 1 to 54 and page 75(al8), lines lto 39, was utilised to assign value's of 0, 1, or 2 to the regions available for printing on the label, while leaving the regions with a value of 3 unchanged. Gray levels for each of the hexagons in a 3 cell by 3 cell cluster are assigned in conjunction with the stored program entitled "CELL CODE.C" 170 found in the Microfiche Appendix, page 75(a23), lines 1 to 53; page 75(a24), lines 1 to 53; and paqe 75(a25), lines 1 to 43.
A preference for storing the high priority message in an area proximate the acquisition target where it Will be less susceptible to label degradation is built into this auxiliary order program. Program "LABEL.C" 180 is therefore employed to generate a bit stream suitable for input to the laser printer.
Program "LABEL.C" 180 may be found in the Microfiche Appendix, page 75(a28), lfr.es 1 to 53; paqe 75(a29), lines 1-52; and page 75{a30), lines 1-36.
It can be seen that the use of black, gray and white permits a simple label printing procedure, because only black ink is necessary, when a standard half-toning algorithm is used, in a 44- 2312-89-28*3 ^ o 0 manner which ia well known in the art. If other color combinations are used (which is feasible), the necessity for printing in other colors obviously creates substantial complexities when compared with the three-color black-gray-white approach or with a two-color black-white approach.
Thus, when each pixel of the printer has been assigned a black or white value, the labels may be printed to create an encoded format, as illustrated in Fig. 3, in which some hexagons are white some are gray and some are black, and in which an acquisition target region, preferably of black and white concentric rings is formed at the geometric center of the label.
LftBEL INTERPRETATION QR PECOPIW Having described how data is encoded in the label and printed, it is necessary to describe the subsequent label inter- ■ pretation or decoding process. It will be appreciated that it is desirable, to perform the label interpretation function at very high speeds, on the order of a fraction of. a second, in order to increase the efficiency at which the package manipulation (or other manipulation or label reading) process ^akes place.
There are two. basic approaches that can be taken for capturing the image in the label reading process. The label can be read at relatively slow speeds, using a hand-held static fixed-focus scanner1 Alternatively, an electro-optical sensor, having a servo-controlled focusing mechanism to permit dynamic scanning of rapidly moving packages of variable sizes and heights is highly desirable to achieve high speed operation. The decoding process and equipment described below was demonstrated in connection with a fixed-focus scanner. The process having the general capabilities described herein with respect to a static fixed-focus scanner is adaptable to a dynamic scanning system with cer*-:.modifications to the optical system as noted below. When manipulating packages at high speeds, it is desirable to have a high speed scanning mechanism which can read labels travelling at a linear speed of about 100 inches per second or more and passing below a 45- 2J42-o9-2a3 fixed scanner location. The image processing function thus comprises the following steps. Fig. 7 provides an outline of the steps of the decoding process. 1. Illumination of the tabel • When a package, parcel or letter.is traveling on a highspeed conveyor, the area to be illuminated Is quite large, because the sizes of the packages to be accommodated on the conveyor could be quite large and variable. For example, a 42 inch 10 wide conveyor and packages of only several inches in width up to three feet In width (and similar heights) are not uncommon in package handling systems. Therefore, the one square inch label may be located anywhere across the width of the conveyor. Packages are also likely to be located at skewed angles with respect 15 tc the axis, of movement of the conveyor belt. The parcels, packages, letters or the like will have different heights, so that the labels to be scanned may be located, for example, one inch or less above the conveyor, on the one hand, or up to 36 inches or more above the conveyor, on the other hand, with respect to the 20 maximum height packages that the described system can accommodate.
In order to properly illuminate the labels in accordance with this invention, especially considering the wide range of package widths, heights and the angle of presentation of the labels, it is desirable to use a high-intensity light source, 25 which will reflect well based on the two or moce optical properties selected for the label. The light might be infrared, ultraviolet: or visible light, and the light spectrum of usable visible light may vary. The technique for sensing the light preferably involves sousing light reflected from the black, white and gray 30 . hexagons of the label.
The illumination source must produce enough reflected light at the light sensor (for example a CCD device, as described below) to permit the light sensor to reliably distinguish among black, gray and white or whatever optical properties of the hexa-35 gons are being sensed. In a dynamic scanning system an array of *6 LED's could be used to produce an illumination level of about 10 raW/cm1 in the label illumination area at the level of the label. The LED's may be in an area array, without using a focusing len3, or a linear array, with a cylindrical focusing lens. A laser light source, passed through a suitable optical system to provide a line source of illumination could also be used iri the practice of this invention.
The selection of the light source and the properties of the light source for the application in question are within the purview of the skilled artisan. It is to be recalled that, since the label to be located is only one square inch in maximum dimension, located at heights of up to 36 inches on a 42 inch wide belt travelling at speeds up to, for example, 100 linear inches per second, it is very important to be able to illuminate the labels properly in order to identify and locate the labels quite promptly.
In the case of the static fixed-focus sensor utilized In the illustrative example, an illumination level of about 2 milliwatts/cm2 proved suitable for the practice of the invention. This was accomplished by means of a fluorescent light source. • 2. Optical Sensing of the Reflected Label Image The second step in the recognition portic o c-.'i the decoding process is to optically sense the illuminated area with an electronically operated sensor. The camera/light sensor used in the illustrative example for a static fixed-focus scanning system comprised an industrial quality color CCD television camera, such as model number WV-CD 130, available from Panasonic Industrial Company, One Panasonic Way, Secaucus, New Jersey 07094, fitted with a 50 mm fl.3 C-mount TV lens Including a 5 mm extension tube, available from D.O. Industries, Inc". (Japan), 317 East Chestnut Street, East Rochester, New York 14445 and identified under the brand name NAVITR0N™. The camera was coupled to an image capture board designated model number DT-2803-60, available from Data Translation Inc., 100 Locke Drive, Marlboro, Massachusetts 01752. 260 Optical sensing may involve imaging the entire label, utilizing an area sensor such as the above-described camera and image capture board or, in the alternative, may be accomplished with a linear array sensor incorporating a charge coupled device ("CCD") chip, wherein the second dimension of the label scanning is performed by the movement of the package (and label). A suitable CCD chip for this purpose is the Xhomson-CSF THX 31510 CDZ, 4096 element high speed linear CCD image sensor, available from Thomson-CSF, Division Tubes Electroniques, 38 rue Vautheir B.P. 305 92102 Boulogne-Billancourt Cedex, France.
For dynamic systems involving the movement of label-bearing packages on a conveyor system, it is desirable to have a long optical path between the labels being sensed and the light sensor. The primary reason for creating a long optical path is to reduce the change in apparent size or magnification of the label as sensed by a remote light sensor. ■ For example. If the optical path is, say, four feet, the image size for labels one inch above the conveyor will be very different from that for labels three feet above the conveyor. If a long optical path is used of, say, twenty feet, the image sizes of the same labels are almost the same. This allows the area being sensed, regardless of height, to fill all or substantially all of the area of the light sensor, to achieve consistently high image resolution. If an area sensor rather than a line sensor is used, the same principle would also apply. This may be accomplished by means of a long optical path as depicted in Fig. 6.
In order to bs able to focus on labels of different height packages, a height sensor is needed. An ultrasonic sensor may be used or a set of light beams may be broken by the package as a sensor. Either of these systems is usable and may then activate a suitable adjustable focusing mechanism with an open or closed loop mechanism to sense and adjust the position of the optical sensing elements /e.g.. lenses and sensor) in relation to each other on a continuous basis, as seen in Fig. 6.
Fig. 6 is a schematic view of a camera focusing and adjusting system operable in accordance with the invention for " -48- 260 1 7 adjusting the position of the camera light sensor in accordance with the height of the package being sensed. Fig. 6 demonstrates a view of a suitable lens 196, coil drive, height sensor and feedback loop in accordance with the invention-. In Fig. 6, the 5 height sensor 206 may be an ultrasonic height sensor' or a light beam which is broken by each package travelling on the conveyor, for example. The height sensor outpi^t is fed to microprocessor 204 which in turn actuates coil driver 202 to move coil 200 on which CCD 198 or other suitable light sensor is mounted. A shaft 10 position sensor 208 senses the position of coil 200 and its output to microprocessor 204 completes a feedback loop for sensing and adjusting the position of coil 200.
The sensor must be able to sense the reflected light coming from the illuminated label, and must also produce an analog 15 signal corresponding to the intensity of the reflective properties of the label as recorded by the individual pixels of the electro-optical sensor.
A suitable light source, as described above, may be mounted to a mounting surface above a conveyor to bathe an area 20 extending across the entire width of the conveyor with a light of predetermined quality and intensity. The reflected light from the label may be folded by a series of reflectors and then is sensed by an electro-optical sensor.
The purpose of the folded optical path is to create a 25 compact and therefore more rigid system.
The analog video signal output of the.sensor is then filtered. The analog electrical signal is utilized in conjunction with an analog bandpass filter to detect the presence of an acquisition target on the data array. The analog signal is then 30 converted to a digital signal using a conventional analog-to-digital converter Incorporated in the image' capture board described below or by other means known in the art. In place of an analog bandpass filter, it is possible to substitute digital filtering circuitry to determine the presence of the acquisition 35 target by comparing the digital data representative thereof to the digitized signal output of the analog-to-digital converter, as more fully described below.
An example of an area sensor having a CCD chip with a plurality of detectors and which was used in accordance with the invention is the previously described Panasonic WV-CD 130 color CCD television camera. The analog signal output of the sensor was communicated to the previously described Data Translation'DT 2803-60 image capture board, including a 6 bit monochrome video A/D conversion for digitization and later operations. By means of a suitable stored subroutine the sequenced digital output of the image capture board was saved in a memory device as an exact replica of the image recorded by the optical sensor. 3. Processing the Reflected Image The most important part of the invention is to process the optically sensed image in order to be able to recreate and orient with accuracy the original label configuration and the color (optical properties) of each hexagon. This is done by using the following steps, after which the known pattern by which the label was originally encoded and bit-mapped may be used to decode the information contained in the label. (a) Locating the Target Center.• Prior to utilizing the above-described CCD television camera and image capture board, as outlined in Fig. 10, an initialization program "DTINIT.C? 250 was run to put the image capture board into a known ready state and to load the output color look-up tables, followed by the program "DTLIVE.C** 255 to put the image capture board in "live mode." The program "DTGRAB.C" then causes the image capture board to digitize the scene into a 240 row by 256 column image memory, with samples stored as 6 bit values right Justified in bytas. The foregoing programs may be found within the Microfiche Appendix respectively at page 75(a31), lines 1 to 53; page 75(a32), line^ 1 to 39; page 75(a33), lines 1 to 22; and page 75(a34), lines 1 to 19. Two auxiliary programs 2 £ o ^ : j 41 w i o J 2 £ 1/ | "DTSAVE.C" and "DTLOAD.C" allow screen images to be- transferred to and from a storage medium. Source code listings for the foregoing programs may be found within the Microfiche Appendix, respectively, at page 75(a35), lines 12 to 33; and page 75(a36), lines 5 13 to 33.
In first acquiring the label image, a conventional analog band pass filter can be used to identify two or more optical properties of the acquisition target Concentric Rings.
These two optical properties are preferably the colors black and 10 white because the greatest contrast will create the strongest signal energy. In order to find a fixed pattern of transition from black to white to black, etc., it is desirable that a linear scan across the acquisition target and passing through the center of the target yield a uniform frequency response regardless of 15 label orientation. Thus, the target rings are optimally comprised of contrasting Concentric Rings. The sensor output was then bifurcated and taken through two detection paths. One path detects all of the energy in the output and the other measures the energy at the ring frequency. When the two outputs are com-20 pared, the energy in the ring detector most closely approximates the energy in the all energy detector when a scan through the acquisition target center is being sensed. The acquisition target center is located when this closest approximation occurs.
Source code listings relating to the creation of a digital band-25 pass filter and filtering process may be found in the Microfiche Appendix under the File Name "FIND.C," pages 75(a39) thrcu^i 75(a43). However, in the dynamic preferred embodiment of the invention, the first filtering step would preferably use an analog bandpass filter or else a sampled analog bandpass filter, although a 30- digital filter is usable.
It is to be noted that the acquisition target locating step denoted "FIND.C" 280 in Fig. 10 is indicated as optional in Fig. 7, because a hand-held scanner can be used in the process of the invention, in which event the operator could properly place 35 the scanner to assure correct alignment of the sensor. This is. 2J-12-39-283 1 of course, much slower than the use of an automated sensor and the use of the automated sensor is preferred in a high speed operation. If an automated sensor (not hand held) is used, locating the target is a required step of the process.
As an alternative to an analog filter described above, a digital bandpass filter may be constructed using the Parks-McClellan algorithm supplied with the software package "Digital Filter Designs Software for the IBM PC" (Taylor and Stouraitis, Marcel Dekker, Inc., New York, N.Y., 1987).
A one-dimensional digital band pass filter has been utilized in connection with the present invention to filter a normalized digital bit stream, as described below, through the following filtration sub-routines. The band being filtered is the expected ring frequency. The one-dimensional digital, bandpass filter was designed for a sampling rate of 400 pixels per inch and a length of 125 pixels (or 0.3125 "inches), and designed to be based upon the size of the printed acquisition target rings, as illustrated £n Fig. 3. The frequency was 300/16 line pairs per inch, yielding a normalized frequency, (where 400 line pairs per inch = 1) of 300/16 x 400 or 0.046875. A filter with a passband extending 5% below this frequency and 15% above was chosen because label distortions typically result in image shrinkage and therefore an Increased frequency. Stop bands from 1SX below the frequency down to 0 and from 253 above the ring frequency to 0.5 (Nyquist limit) were constructed. The filter coefficients were stored in the file "IMPULSE.LUT" 275, per Fig. ■ 10, for later operations, deleting the first 62 coefficients, because the filter is symmetrical. A flow chart is illustrated -in Fig. 8. Further reference may be made to the source code listings in the Microfiche Appendix, under the file name "FIND.C", 280 starting at page 75(a39).
A filter of 25 pixels in length was constructed by sampling the band pass filter at output intervals corresponding to the measured horizontal magnification. For example, if tl^e horizontal magnification of the image is 80 pixels per inch, every 52- 26 0 1 fifth sample of the filter would be-u3ed (400/80 — 5 pixels). For non-integer steps, linear interpolation of adjacent filter samples is used.
A second 25 by 25 pixel two-dimensional filter was also 5 . utilized. Sample values for this two-dimensional filter were based on the Euclidean distance of each point from the center of the filter, which were scaled for appropriate horizontal and vertical magnifications. Linear interpolation is then used for non-integer sampling intervals.
The output of the above-mentioned one-dimensional fil ter was squared and smoothed with a first order recursive lowpass filter, providing an exponential window of past, history. When the smoothing filter output exceeded a predetermined threshold, an optional two-dimensional filtering step was employed to verify 15 the existence of the target and to accurately determine its location, as described below. The first part of the two-dimensional filtering used a reduced filter size of 10 pixels by 10 pixels to save computation. This filter scans a rectangular area around the location detected by the one dimensional filter. If the maxi- . 20 mum two-dimensional correlation exceeds a predetermined threshold, then the final stage of two dimensional filtering, with the full 25 pixel by 25 pixel filter, was applied to a small square window around the maximum. If the best result of this filter exceeded a predetermined threshold, the center was detected. If any of the 25 thresholds were not exceeded, the program partially "discharged" the smoothing filter and reverted to one dimensional scanning. If one dimensional scanning completed without detecting the presence of the acquisition target, the program exited with an error return. For any further elaboration of the filtering process era-30 ployed in the illustrative example, reference should be made to the source code listings in the Microfiche Appendix, pages 39 through 42.
-S3- 26 ij (b) Normalization of.Sensed Image Reflected light intensities recorded'by the optical sensor employed may vary due to variations in illumination, print density, paper reflectivity, camera sensitivity'and other reasons Involving degradation to the label, for example, folding, warping, etc. As an optional (but desirable) step, the reflected light sensed by the sensor and communicated to the memory may be normalized by conventional procedures. Using techniques known in the art, a stored normalization program "NORM-C" 270, depicted on Fig. 10, was used to analyze the Intensity levels of reflected light from the label, as recorded by blocks of pixels in the scanner, to find the minimum and maximum reflected light intensities recorded for the data array. The sequenced digital output of the above-described scanner and image capture board combination was loaded from memory to the computer to be further operated upon by said stored normalization program.
Utilizing an equation y = mx + b, where the minimum intensity substituted for x will yield a v^lue of y = 0 and a maximum intensity substituted for x will' yield a value of y = 63, the recorded intensities of reflected light for each pixel were adjusted so that the blackest, black and the whitest white present in the stored image were established as the standard, and the other shades of black, white and gray were adjusted to those standards. The normalization step thus makes the sensed image easier to process. Normalization was carried out using the stored program "NORM.C" found in the Microfiche Appendix at page 75(a37), lines 10 to 52 and page 75(a38), lines 1 to 11. It will be appreciated that other, more sophisticated normalization procedures known in the art may be applleit. (c) Repealing the.Imagq.
For subsequent computations, the stored replicated label image is rescaled to create an image with equal horizontal and 75 26 0 vertical magnification. Again, this is an optional step, but it facilitates the fast and accurate recovery of the encoded information. The rescaling operation was performed to give.the image a uniform horizontal and vertical sampling resolution of, for example, 150 pixels"per inch, as used in the illustrative static fixed focus embodiment of the invention.
The rescaling operation occurs by computing the fractional row and column addresses of samples at 1/150 inch, based upon the known horizontal and vertical magnification. Each point on the new uniform rescaled image is then extracted from an appropriate set of points on the image replicated in the storage medium. Bilinear interpolation is used to approximate the value of points at fractional addresses. The rescaling places the center of the label at a known position in memory. The rescaled image is stored for later use in the searching step. All subsequent process steps then assume that a rescaled label image is centered on a known position on the grid, but it should be noted that this does not indicate the orientation of the label, which may still be skewed with respect to the sensor. The rescaling operation is carried out under the control of a stored subroutine found in the source code listings within the Microfiche Appendix '' at page 75(a42), lines 14 to 52 and page-75 (a43), lines 1 to 14. (d) Two-Dlmensional Clock Recovery The. next sequence of steps of the process are referred to collectively as "two-dimensional clock recovery." The steps are performed by a suitable stored program and subroutines en-titled "CLOCK.C" 290, depicted on Fig. 10, and found within the Microfiche Appendix at pages 75(a44), through 75(*51). This operation is performed in two dimensions on the rescaled image to determine precisely the position of each hexagon on the original data array. The purpose of clock recovery is to determine the sampling locations and to correct for the effects of warping, curling or tilting of the label, since the label may not be perfectly flat.
This is an important part of the process and its application is Q not limited to hexagonal encoded labels. It may be applied to other processes for decoding an encoded label comprising a regular, two-dimensional grid, such as squares, triangles, etc.
' One-dimensional clock recovery is a general concept which is well understood in the signal processing field. Two dimensional clock recovery is an extension, of that process and will be understood, upon reflection, by the skilled technician. It will be understood that the "clock recovery" terra is somewhat confusing to the non-expert, since it does not relate to timing. (i) Edge Enhancement and Non-Linear Operation The first step in accomplishing clock recovery may be performed by various non-linear mapping operations known in the art to create signal components at a specified clock frequency that are missing from the digitized image output from the optical sensor and image capture board. The purpose of non^linear mapping is to take the (preferably) normalized and rescaled image which exists at this point in the process and to form it into a two-dimensional non-linear map which enhances the transitions between adjacent contrasting hexagons. In the preferred embodiment of the present invention, this is done by standard deviation mapping. This step can also be performed by filtering with an image differencing kernel, several means for which are known in the art, such as LaPlace or Sobel kernels, and then an absolute value is determined or squaring of the results is performed. These procedures may be found in the text Digital Image Processing, Rafael G. Gonzalez and Paul Wintz,' Addison Wesley, 1977. • In standard deviation mapping, the image with.undifferentiated cell-to-cell edges is stored in memory. A standard deviation map is then created to locate the edges of adjacent contrasting hexagons by determining the standard deviations of 3x3 groups of pixels (this is different from the 3 cell x 3 cell clusters), to determine the standard deviations of the pixel intensities. The standard deviation computations are performed to determine the regions of pixels having a fixed color (the -56 *0 o 1 i " / lowest standard deviations), representing the interior of a hexagon or the interface between two. like-colored hexagons, as opposed to the groups of pixels having higher standard deviations, which represent transitions from a hexagon of one eelor to an 5 adjacent hexagon of a contrasting color. Because adjacent hexagons frequently have the same color, the standard deviation map will not completely outline every hexagon. Missing borders or edges between hexagons will result from the fact that the standard deviation mapping process cannot distinguish interfaces 10 between hexagons of the same color. Further aspects of the clock recovery process are intended to regenerate these missing transitions.
The decoding process of the instant invention may be utilized for any of the previously described label embodiments, IS as illustrated in the accompanying figures. Encoding units of various geometries may easily be accommodated and such optically encoded polygonal cells may be arrayed with the geometric centers of adjacent polygonal cells lying at the vertices of a known, predetermined two-dimensional array.
When the optically readable labels of the instant in vention are "read" with optical sensors of the types described herein, the particular geometry or shape of. the individual encoding units or polygonal cells is not determined by the optical sensor. Instead, the sensor simply samples the optically read-25 able label at a known number of samples per inch and records the intensity of the reflected light corresponding to the optical property of the particular sample area that has been Imaged.
These values are then stored in a storage medium for later processing. In other words, the electro-optical sensor records 30 the average light intensity sample area-by-sample area across the entire label surface, regardless of whether or not anything is printed on the label. This is what is meant by storing the image with undifferentiated cell-to-cell edges in memory.. For this reason the decoding process is readily adaptable to reading 35 optically readable labels of widely varying configurations, so -57 2342-89-283 long as the centers of the polygonal encoding units lie at a predetermined spacing and direction on a two-dimensional array.
In practice it has been found_that alterations of the hexagonal encoding cell-based system, as in the case of label embodiments employing polygons substantially in the shape of hexagons as illustrated in Fig. IS, result in negligible reduction of the system's performance. Utilizing polygonal shapes with poorer packing characteristics, or arrays of partially contiguous or noncontiguous polygons rather than contiguous packing, will then result in a poorer, but nevertheless, usable system performance for many applications. At some point, however, due to the optically unresolvable high frequency components of lower order polygonal encoding cells, inefficient cell packing and predetermined two-dimensional arrays resulting in large interstitial spaces between polygons, the system performance will fall to an unaccept' ably low information storage and retrieval capacity.
The acceptability of the system depends on the quality of the signal recovered by the electro-optical sensor. By altering the Bensing system, as for example by Increasing the number of samples per unit area across the label surface, one could improve the signal recorded by the sensor and improve the information storage and retrieval characteristics of such partially contiguous and noncontiguous label configurations.
Such adjustments, in order to make such less desirable label configurations usable, would be within the abilities of one of ordinary skill in the art of electro-optics.
The process, therefore,, allows a wide variability in terms of the label article, optical signal acquisition means and signal processing. Polygonal cells, of either regular or irregular form may be used as encoding units on the optically readable labels of the invention. Further, so long as the spacing and direction of the centers of the polygons are knowr in relation to adjacent polygonal cells, the polygonal encoding cells may lie on a predetermined array, other than a hexagonal array, and the polygons may be arranged contiguously, partially contiguously or even noneontiguously on the optically readable label".
As explained in greater detail below, the nonlinear mapping techniques,' specifically the standard deviation mapping techniques disclosed herein in relation to the preferred embodiment, facilitate reconstruction of the missing transitions or edges between polygonal cells of like optical properties. Moreover, the same feature may overcome the lack of transitions between polygons and interstitial spaces between polygons of like optical properties. This is the situation when label configurations containing partially contiguous or noncontiguous polygons are utilized. This feature is accomplished through the following Fast Fourier Transformation, filtering and inverse Fast Fourier Transformation steps.
An optional technique utilized in the preferred embodiment of the present invention reduces the computations needed to generate the standard deviation oap. Normally, to compute the sum of the nine pixels In each*3 x 3 pixel block, eight addition operations would be needed. This may be cut in half by replacing each pixel of the image with the sum of itself and the pixels immediately to its left and right. This requires two additions per pixel. Then, the same operation is performed on the new image, except the sum is computed for pixels immediately above and below. This requires two more additions for a total o£ four. It can be shown that, at the end o£ these steps, each pixel has been replaced by the sum of itself and its eight immediate neighbors.
Standard deviation mapping is the desired technique for creating this map of hexagons corresponding to the original data array but with missing transitions between original hexagons of the same color. The specific standard deviation mapping techniques utilized in conjunction with the illustrative embodiment may be found within the source code listings in the Microfiche Appendix at page 75(a45), lines 14 to 53 and page 75(a46), lines 1 to 4. (ii) Windowing The next subroutine, called windowing', is optional. Windowing was used in the practice.of the invention to reduce the intensity of borders which are not associated with hexagon outlines. These borders occur at two locations] the target rings and the uncontrolled image Surrounding the label. A weighting function is utilized to reduce the intensity of these areas. The details of how to use windowing as a precursor to a Fast Fourier Transfotm is within the purview of the skilled artisan. The windowing procedure utilized may be found within the' source code listings contained in the Microfiche Appendix at page 75(a46), lines 6 to 22. (ill) Two-Dimenalonal Fast Fourier Transformation A two-dimensional Fast Fourier Transformation of the digital values corresponding to the (optionally) windowed standard deviation map is then performed under the control of a commercially-available stored program. In operation, a computer performs a Fast Fourier Transform of the image generated by the prior step to yield a two-dimensional representation of the spac- . ir.g, direction and intensity of the Interfaces of contrasting 2342-89-283 hexagons identified in the standard deviation mapping step.
Simply stated, the Fast Fourier Transform is a .measure of the spacing, direction and intensity of the edges between hexagons, where knovm. Thus, the regular spacing and directionality of the hexagon boundaries will cause certain points in the transform domain to have a high energy level. The brightest point will be at 0,0 in- the Transform plane corresponding to the DC component in the image. The six points surrounding the central point represent the spacing, direction and intensity of the edges between hexagons.
It will be recognized by one skilled in the art that, as for hexagons, a two-dimensional representation of the spacing, direction and intensity of the interfaces of contrasting polygons Identified in the preceding standard deviation mapping step can also be computed by performing a Fast Fourier Transform of the digital data corresponding to the non-linearly mapped sensed label image. Thus, the spacing and directionality of' the polygon borders will cause certain points in the transform domain to have high energy. The number of points of higher energy surrounding the center point at the 0,0 coordinate of the transform plane will depend on the geometry of the particular polygonal encoding cell used to make the optically readable label. As for hexagons, however, such points surrounding the central point will represent the spacing, direction and intensity of the edges between polygons or the edges between polygons and interstitial spaces if .the label configuration is either partially contiguous or noncontiguous in nature.
Since the image is real (not complex) valued, the Transform domain is point symmetric about the origin. Thus, only a half plane of the transform domain must be computed, thereby saving nearly a factor of two in computation time. Elimination of these computations also reduces the amount of effort required in the subsequent image filtering and Inverse Fast Fourier Transformation steps. The Fast .Fourier Transform program utilized in connection with the illustrative embodiment of a static fixed 2 0 u focus system was the commercially-available subroutine R2DFFT from the 87 FET-2 package from Microway, Inc. of Kingston, Massachusetts. (iv) Filtering the, Image A filtering process ia now required to reconstruct the complete outline of all of the hexagons in the image domain, utilizing the transformed digital data. This is done by eliminating any transform domain points that do not correspond to the desired spacing and direction of hexagon boundaries identified in the standard deviation mapping step. Six prominent points in the transform domain arise because of the hexagonal honeycomb structure of the label. Only three points in the transform domain are actually identified, because the image is point symmetric about the origin, and the second three points may be inferred from the first three. In the preferred embodiment, filtering is performed in three steps to eliminate transitions from the- standard deviation mapping step, which are too far apart, too close together, and/or in the wrong direction.
First, high pass filtering is performed by zeroing all paints within a predetermined circle around the origin of the Transform domain, but at a distance extending outward from the origin, short of the six prominent points arrayed in the shape of a hexagon, in the graphic transform domain. These points correspond to spacings greater than the hexagon spacings and thus carry information pertaining to the missing transitions in the label image. To recreate missing transitions in the label image. It is necessary to eliminate the information about the missirg transitions in the Fourier Transform domain.
Next, all points outside a certain radius -beyond the six prominent points in the Transform domain are zeroed. These correspond to spurious transitions that are spaced too close together. This operation combines with the first one to form a ring of remaining points. Creating this ring is equivalent.to performing spatial bandpass filtering. The inner and outer radii 62- 2342-89-283 of the annulus are determined by the expected spacing of the hexagon outlines. Since the hexagon "diameter"' is expected to be 5 pixels in the example being described, and for a transform length of 256 pixels, the hexagonal vertices' in the Transform domain should be 256/5 =51.2 pixels away from the center. Accordingly, a ring with an inner radius of 45 pixels and an outer radius of 80 pixels corresponds to hexagon diameters of 3.2 to 5.69 pixels was used. A filter with a preference for passing higher frequencies was used because label deformations, such as warping and tilting, cause image shrinkage.
After performing the spatial bandpass filtering described above, an annulus with six prominent points exists, each point having equal angular spacing with respect to the center (0,0 point) of the transform domain. To complete the task of rejecting undesired information in the Transform domain, a directional filtering step is employed. Any point at too great an angular distance from the prominent regions in the Transform domain is zeroed. This has the effect, in the image domain, of removing any edges that do not occur in one of the three directions dictated by the hexagonal honeycomb tiling pattern.
To perform directional filtering it is necessary to find the most prominent point remaining after spatial bandpass filtering. This point Is assumed to be one of the six prominent points of the transform domain resembling the vertices of a hexagon. Five other prominent points at the same radius from the center and with angular spacing of multiples of 60 degrees are also evident in the transform domain. Therefore, all other points with an angular distance of greater than 10 degrees from any of these points ara eliminated. Six wedges of the ring remain. By this directional filtering step, any information of incorrect spacing or direction in the Image domain is eliminated. Elimination of this incorrectly spaced Information enables the restoration of a complete outline of each hexagon in the Image domain. -63 2342-89-283 26 The foregoing filtering steps are performed under the control of stored subroutines contained in the source code listings within the Microfiche Appendix at page 75(a46), lines 26 to 53; page 75(a47), lines 1 to 52; page 75(a48), lines 1 to 52; and page 75(a49) lilies 1 to 46.
The foregoing discussion of the filtration scheme employed for the preferred label embodiment comprising contiguously-arranged hexagons requires modification when different predetermined two-dimensional arrays are utilized for the optically readable label.- It will, nevertheless, be appreciated by one skilled in the art that only slight modifications to the filtration scheme are required to accommodate the different label configurations that have been previously described herein, and which, are illustrated in the accompanying drawings.
Once the individual polygonal encoding cells are decided upon, It is predetermined that their respective boundaries will have certain angular spacings, and a given' number of sides of given length. • Next, it is necessary to determine the relationship of adjacent polygons, as for instance, whether they will be contiguous, partially contiguous or noncontiguous. Also, the geometric array upon which the geometric centers of the polygons will be arranged needs to be established. Since the foregoing label geometry is predetermined a person of ordinary skill in the art can construct the appropriate filtration scheme to filter the energy points in the transform domain, so that only the brightest points corresponding to the appropriate spacing and direction of polygons boundaries is operated upon by -the inverse Fast Fourier Transform subroutine.
Concerning the actual filters constructed. It will be appreciated that it is necessary to construct an appropriately dimensioned spatial bandpass filter based upon the predetermined spacing of the polygonal encoding cells. Then, it is desirable to construct a directional filter to filter out energy points 2342-09 -283 ^ & u i y " / other than the mo3t prominent points corresponding to the axes of the prede'termihed two-dimensional array of the polygonal encoding cells. This eliminates any information concerning the incorrect spacing or direction of the polygonal encoding cells in the image 5 domain and the interstitial spaces if present. By eliminating sucn incorrect information a complete array of the centers of the polygonal encoding cells can be reconstructed in the image domain by means of inverse Fast Fourier Transformation in accordance with the process step described below. lO (v) Invert Fast; Fourier Transformation t To actually return to the image domain, thereby restoring the outline image of the contiguous hexagons of the data array, it is desirable to perform a two-dimensional Inverse Fast Fourier 15 Transform (2D-IFFT) on the filtered transform d>.nain data. The inverse transform is implemented by a standard two-dimensional Inverse Fourier Transform subroutine (R2DIFT) available in the 87FFT-2 package from Hicroway, Inc. of Kingston, Massachusetts. Upon completion of the inverse Transform step, the outline of 20 every hexagon is restored in the image domain. In the new image, the centers of the hexagons have high magnitude. The actual magnitude of the spots at the hexagon centers is dependent on how many edges were In its neighborhood. More edges create greater energy at allowed frequencies and hence high magnitude spots. 25 Fewer edges give rise to lower magnitude spots-. The magnitude of the spots is a good measure of the confidence level in the clock restoration at any given point. (e) Major Axia Potarminatlan The hexagonal image has now been recreated but Its orientation needs to be determined.
The hexagonal honeycomb pattern of the invention has three "axes" spaced 60 degrees apart. The direction of these axes is established by the brightest points in the transform 35 domain after spatial bandpass filtering. It is now possible to ascertain which of these three axes is the major axis. This step i3 optional. If this step is not performed, the label would have to be decoded three times, using each of the three axes, with only one axis yielding a meaningful message. The major axis i3 arbitrarily chosen as the axis which runs parallel to two sides S of the label as described hereinabove and depicted in Fig. 2.
If the boundaries of the square label are determined based on the knowledge of the major axis, then most of the energy in the restored hexagonal outline pattern will be inside this square's boundaries.
To determine the major axis, each of the three axes is assumed to be the major axis. The consequent square label out-line is determined for each trial axis, and the total clock restoration pattern energy interior to that square is determined from the digital energy data output from the inverse transform subrou-15 tine. The-correct trial is the one with the most energy. The angle of this major axis is then stored for the Initialization step and other searching operations. At this juncture, it is not yet known whether the recorded angle is in the correct direction or 180 degrees away from the correct direction. The source code 20 listings in the appended Microfiche Appendix pertaining to the determination of the major axis may be found at page 75(a49), lines 48 to 54; page 75(a50), lines 1 to 53; and page 75(a51), lines 1 to 5. It will be appreciated that all three label areas do not need to be determined in toto. since the energy in the areas common to all 25 three squares does not need to be determined. (f) Searching - A stored program entitled "SEARCH.C" 300, depicted on Fig. 10, combines the Transformed and regenerated hexagon center 30 information with the stored intensity levels of the original image so as to determine the gray level value of each hexagon. The search is performed in such a way as to minimize the chances of "getting lost" while searching. The end result is to obtain a matrix of the gray level value for each hexagon of the data array. 35 The source code listings for "SEARCH.C" may be found within the 2342-^-233 Microfiche Appendix at page 75(a52) through 75(a60). Four important information arrays are constructed during the first part of the SEARCH.C program. The array CVAL (clock value) stores a measure of the quality of the recovered clock signal for each hexagon, while the array GVAL stores the grey level value (0-63) at the center of each hexagon. The remaining arrays IVAL and JVAL store the row and col'umn locations of the center or each hexagon. (i) Initialization Steps From the major axis angle determined in step (e) and the known spacing of the hexagons (5 pixels) in the example, the expected horizontal and vertical displacements from the center of one hexagon to the centers of. the surrounding aix hexagons are computed.
Following these computations, the SEARCH.C program operates on the clock recovery signal, retrieved from memory and the rescaled label image, also retrieved from memory. The fundamental purpose of the initialization subroutine found in the Microfiche Appendix at page 75(a52), lines 13 to 54; page 75(a53), lines 1 to 48; pace 75(a52), lines 47 to 57; and page 75(a57), lines 1 to 35 is to merge and condense the information from these two sources and to ' generate a data matrix providing the grey scale value for each hexagon.
The initialization step of the search is bounded by a square around the label's center of about 1/3 of an inch on a side. Within this area, a good starting point is the point of highest magnitude in.the recovered clock signal array ia found.
Then, the location of this starting point relative to the center of the label ia determined. This starting point is a point where the clock signal Is strong and distinct, and also a point relatively near the center of the label. A strong, distinct signal is desired to ensure that searching begins with a valid hexagon center, and it Is desired that the point be near the center of the label so that its absolute location can be determined without serious Influence from warping or tilting. The measure of the ""-a9-283 26 0 1 7 quality of a point in the clock recovery pattern i3 the point's magnitude minus the magnitude of its eight surrounding points. The rectangular coordinates of the starting point are converted to polar form, the polar coordinates are adjusted relative to the previously determined major axis angle, and this result is converted back to rectangular form. These coordinates are scaled according to the expected row spacing (4.5 pixels) and column spacing (5 pixels) to arrive at the insertion position on the hexagon matrix. The clock quality, grey levels and locations corresponding to the starting hexagon are then inserted in the respective arrays CVAL, GVAL, IVAL and JVAL. (ii) Main Search Loop The main search loop proceeds to locate the centers of the remaining hexagons. The loop terminates when the expected number of hexagons has been located. The order of the search for hexagon centers is extremely Important. The Increased reliability of the decoding process in the face of label degradations comes from the particular search technique employed, as described below.
Each iteration of the search loop begins by recalling the location of the highest magnitude clock recovery spot whose neighbors have not been searched for their strongest values.
From this known point, the search will be extended one hexagon In each of six directions. The effect is to build up the search pattern along a path from better to worse recovered clock quality. Thus, if there is a weak area of recovered clock, m.cr. at the label center" or an obliterated area, the search algorithm skirts around it rather than going through It. By outflanking these weak areas and saving them for last, the probability of getting lost on the grid ia greatly reduced. Since getting lost is just as bad as reading a gray level incorrectly, this characteristic of the search algorithm Is extremely powerful.
A subroutine found in the Microfiche Appendix at page 75(a53), lines 50 to 54; page 75(a54), lines 1 to 53; and page 75(a55), lines 1' to 55, is responsible for searching the neighbors of the best 68- quality clock value found in the main loop. The subroutine loops six times, once for each hexagonal neighbor of the hexagon then under consideration. First, the position of a neighbor is computed. If this neighbor is outside the label boundary, the loop iteration terminates.- If not, the neighbor is checked to see if it has already been searched from another direction. The loop iteration will terminate if the neighbor has been searched, since the algorithm makes earlier searches more reliable than later ones. If the neighbor gets beyond this test, the expected position of the neighbor* a center in the clock recovery pattern is computed. At this point, & gradient search for the highest magnitude clock signal is performed. The eight pixels surrounding the recovered position are searched to see if a higher clock value is found. If it is, then the best neighboring point has its eight neighbors checked to see if an even better value is found. This gradient search provides a degree of adaptation which is imperative if warped and tilted labels are to be read. The subroutine then goes on to the next neighbor or returns when all neighbors have been checked.
As mentioned above under step (d), as a result of the data transformation processes, the reconstructed grid now carries information regarding the geometric centers of the polygonal encoding cells. This grid has more energy in areas where more contrasting interfaces originally existed. The centers will lie on the predetermined two-dimensional array having a predetermined number of equally- or unequally-spaced axes, as the case may be. The Information concerning the spatial relationship of the axes of the predetermined two-dimensional array may desirably be used in the major axis orientation step.
It will be appreciated, however, that the algorithm could be appropriately modified to have the decoding process determine the actual geometry of the two-dimensional array and from that determination proceed to determine the filtration scheme, the so-called major axip of the label fl.e the axis of the two-dimensional array that is parallel to two sides of a 2342-89-283 26 0 square optically readable label as discussed herein) and provide the necessary coordinates for the searching subroutine: Whether the geometry of the label is determined by such an optional step as described above or simply entered into the decoding process through appropriate modifications to the two-dimensional clock recovery process, the variety of label configurations disclosed and discussed herein can be easily accommodated by one of ordinary skill in the art. It will be appreciated that the number of axes upon which the centers of the individual, adjacent polygonal encoding cells are arrayed and their respective angular orientation, can be substituted in the major axis determination step for the three axes of the hexagonal array of the preferred embodiment. Therefore the major axis of the predetermined two-dimensional array can be determined without performing the trial and error analysis described above in step (e).
As for the hexagonal array of. the preferred embodiment, the information from the major axis determination step and the known spacing of polygons may be used to compute the expected horizontal and vertical displacements from the center of one polygon to the centers of surrounding polygons. Following these computations and after making the necessary adjustments to the search subroutine, the' search. Including the initialization step and main search loop step can proceed for the particular label configuration that is being employed. It-will be appreciated that such minor adjustments to the search routine SEARCH.C 300 in the appended source code listings are within the abilities of a person of ordinary skill in the art.
After the subroutine completes, the current center location is marked so that it is not searched again. The effect is to delete this position as a candidate for having its neighbors searched. For each loop iteration, from 0 to 6 new candidates are added and one candidate is delated. An efficient implementation cculd use a data structure which keeps candidates in magnitude order as insert and delete operations are performed. One such structure is called a priority queue (Reference: The Design 70- 2342-89-2G3 and Analysis of Computer Algorithms. Aho, Hopcroft and Ullman, (Addison Wesley, 1974)).. It is known that a linear search algorithm requires order n* operations whereas an efficiently implemented priority queue using a balanced tree or heap structure requires order n log n operations. An order n search algorithm based on bucket sorting ■ could also be used, if recovered clock values are scaled and reduced to a small range of integers. (g) Histogram Generation and Thresholding After the main search loop terminates, the locations of the centers of all hexagons have been determined and the gray values of the centers of all hexagons, which have been stored, are completely filled in. _ The next step is to threshold the digitized grey level values in the range 0 - 63 to the discrete levels of,- for example, black, grey, and white (for a black, white and grey label). This is done by building a histogram of the label image intensity values from the hexagon centers. Slicing levels can be determined by looking for dips in the histogram. The specific subroutine utilized to construct the histogram and determine the slicing levels may be found in the appended source code listings in the Microfiche Appendix at page 75(a55), 16 to 52 and page 75(a56), lines 1 to 15. (h) Coarse Grid Correction and Final Orientation After thresholding to discrete levels, two distortions may still be present. First, the array may be off center. This can happen if the initial search step does not correctly determine the location of the best quality clock signal relative to the label renter. The second possibility is that the entire label has effectively been read upside down since the major axis angle has an ambiguity of 180 degrees.
A stored subroutine found at page 75(a58), lines. 1 to 54 and page 75(a59), lines 1 to 24 within the Microfiche Arpendix performs the function of determining whether the label is off center. If the label has been positioned correctly, the coordinates of the 2342-89-283 V center row should pass through the center of the label. To determine if a vertical positioning error has been made, rows above the hypothesized center row are checked to see which would form a line passing-closest to the label center. If a row above or below is closer than the hypothesized center row, then the appropriate shift up or down is made. If the left justification of short rows has been performed incorrectly, this is adjusted by shifting short rows one position to the right.
Horizontal positioning errors and upside down reading are checked using information embedded in the label known as coarse grid information. The information is distributed in 3 cell x 3 cell clusters of hexagons as described hereinabove.
Since the label may be, for example, on a 33 row by 30 column grid, these clusters form a 11 by 10 grid. The bottom center hexagon of. each complete 3 cell x 3 cell cluster has a special property which is provided during encoding. There is a guaranteed transition on either side of this hexagon,' as' previously described in connection with Fig. 4. For example, if the bottom center hexagon is black, the bottom left and bottom right hexagons must be either gray or white. A stored subroutine found at page 75(a59), lines 27 to 52 and page 75(a60), lines 1 to 33 of the Microfiche Appendix takes advantage of this transition property to remove the final two possible distortions. First an array is » created where each element of the array indicates whether a transition took place between two horizontally adjacent hexagons. Then the array is checked for each of 9 hypothetical slides of the coarse grid arranged as a 3 x 3 pattern around the expected slide of 0. One of these slides will show a better match between actual and expected transitions, and this slide position is retained. Next, the same hypothesis Is checked under the assumption that the label was read upside down. This will happen if the major axis angle actually pointed right to left in relation to how the label was printed rather than left to right.
If the label was simply inverted, i.e.. interchanged higher rows with lower rows and higher columns with lower columns, then the results of slidings should be inverted as well.
However, one important transformation must be performed to correctly invert the label. During reading the short (length 29) rows are left justified; thus, when the label is inverted these labels must be right justified. The adjustment is made, and it is this procedure which will make the results of the slide hypotheses other than a simple inversion. In fact, the best result from the slide tests will be better than any previous test if the label was actually read upside down.
Having determined whether or not the label was read upside down, and whether there was any slide in the absolute positioning, the label matrix can now be decoded. With correct determination of the image and slide, the image processing functions are complete and the data decoding processes are started. 4. Decoding A stored program "RD.LABEL.C" 182 on Fig. 9 found within within the Microfiche Appendix at page 75(a61), lines 1 to 52, and page 75(a62), lines 1 to 2B reads the file generated by the search program and generates a bit stream file with, in the preferred embodiment, 1292 bits. It uses a stored subroutine Cell Dec.C 183 on Fig. 9 and contained in-the Microfiche Appendix at pages 75(a63) through 75(a66) to mask out unusable hexagcns, and to apply decoding which is the Inverse of the coding program.
The first step in the decoding process is to generate a bit stream from the hexagon information,' using a hexagon-to-bit mapping process which ia the reverse of the bit-to-hexagon mapping process used in the encoding operation.
The bit (information) stream is then bifurcated by the program into a high priority message bit stream and a low priority message bit stream or as many bit streams as are used in encoding the label.
It is then necessary to apply error correction to each bit stream using the error 'coding techniques which were used in the label encoding process. For example, if Reed-Solomon coding is used, error correction on the bit stream generated by the search program generates an output which is in the same format as previously described for the encoding input file. Error correction may be performed in the following sequence (Reference: Theory. and Practice of Error Control Codes, described above.) 1. Compute syndromes 2. Compute Error Locator Polynomial using Berlekamp-Massey Algorithm 3. Compute error locations,using Chien search 4. Compute error magnitudes using Forney's Algorithm . ' The last step is executed' only if a correctable number of errors has been detected from steps 2 and 3. The number of errors detected are also computed. If an uncorrectable number of errors is detected or an error is located in the implied padding (des-15 cribed above), a flag is set. The specific error coding procedure utilized in the illustrative example may be found in the Microfiche Appendix at page 75(a67) through 75(a75) , and is designated as ERRDEC.C 184 on Fig. 9. . guSPMt By tracking the package (by identifying its location on the conveyor) the high priority message, indicating the zip code of the package destination, can be used to activate suitable routing arms or conveyors to route the package to the proper truck, 25 airplane or package carrier to take the package to its destination.
Although the invention may be as used in a conveyor/ diverter system, it will be apparent that it can be used in a wide variety of information gathering, package handling and production operations in which it is desired to read a label on a 30 package, letter, part:, machine or the like and caus« a system to perform a package handling or manufacturing operation, for example, on the object bearing the label. The invention allows these opera' ns to occur with high speed, high accuracy, dealing with a substantial amount of label information and even protect-35 ing much of that information from being lost due to label tears and the like. 2 J42-o'J-2U j ■«-» v.; With reference to Fig. 9, to alternatively display the decoded message on a computer terminal, the-program TEXTOUX.C 185 may be employed. Program TEXTOUT.C may be found within the Microfiche Appendix at pages 75(a76) through 75(a78). . •75- (followed by page 75(al)) Z6Q MICROFICHE APPENDIX TABLES TABLE 1 I* Filename: TEXTIN.C • Author Donald G. Chandler, PA Technology • Date: October 16, 1987 * Purpose: Get user input for label * Modifications after November 15 release: V #include <conio.h> •include <stdi<J.h> •include <ctype.h> •include <math.h> •Include <fcntl.h> •include <sys\types.h> •include <sys\stath> •include <io.h> •define LPSYMS 70 •define HPCOPY 5 •define LPCHARS (((LPSYMS-HPCOPY)*S)/6) main() ( int file; int i; int charcnt; char r, unsigned int cos; double dcos; double zip, Ipzlp; static unsigned char IpinfoflLPCHARS * 31 static unsigned char hpinfo{6); static unsigned char IppackfLPSYMS); italic unsigned char erTcnts[2] - (0,0); f* get tip code •/ getzip: printf(*\nEnter the ZIP CODE information (up to 9 digits, no hyphen): "); *eanf(*%lP,<£zip); if ((zip > 999999999.) I (zip < 0.)) ( printf(*\nlnvalid Zipcode. Try again"); 75 (al) (followed by page 75 (a2)) #, 2 3 4 J 6 7 G9 0 1 n 4 6 7 8 9 0 ] 2 3 4 6 7 S p 0 ] 2 •i 6 7 8 9 0 •? '4 '6 7 '9 0 7 2 J 4 "J jC? toy goto getzip; } /* get class of service */ getcos: printf("\nEnter the Class of Service (0 - 9, A - Z): "); cos - getch(); cos - toupper^coa); if ((cos < 'A') | (cos > *Z*)) if ((cos < '0') | (cos > *9*)) ( printf("\nln valid Class of Service. Try again*); goto getcos; ) printf("%c\n",cos); if (cos <- *9') cos 4- 'Z' + 1 - '0'; cos — *A'; zip ■ cos * 1000000000. + zip; /* pack into six bytes with six bits each */ Ipzip - zip; for (i ~ 0; i < 6; i++) hpinfo{i] » $4.0 • modf(zip / 64.0,&zip); printf(*\nEnter the lower priority information\n"); for (i - 0; i < LPCHARS + 3; i++) Ipinfo{i] - ' charcnt - 0; while (charcnt < LPCHARS) { c - getchO; switch(c) { case 0: f* special keyboard character, ignore •/ getch(); break; case 8: /* back space •/ if (charcnt > 0) if (Ipinfo[charcnt - 1] !- 0x5e) ( putchar(c); putcharC '); putchar(c); Ipinfo{—chxrcnt] - ' } break; case 13: /* enter •/ lpinfo[charcnt4+] - 0x5e; putchar(13); putchar(10); break; case 27: /* escape, done */ goto endlow; default: f* accept u in range */ 75 (a2) (followed by page 75(a3)) 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 70 21 22 23 24 ■>.6 17 IS 29 ?0 ?; ?2 ?3 U 55 ?7 18 19 <0 11 <2 '3 <4 <5 <6 ■7 '3 ■9 0 1 2 3 4 C Q V / / ? c •• toupper(c); if (c > 0x5f) break; if(c« 0x5e) break; if (c < 0x20) break; Ipinfo{charcnt++] » e; putchar(c); break; ) ) endlow; /• pack 6 bit ehan into 8 bit symbols (bytes) */ charcnt - 0; for (1 - 0; i < (LPCHARS + 3) / 4; 1++) ( Ippack[3 * i] - ((Ipinfo[charcnt] « 2) A Oxfc) | ((Ipinfo(charcnt + 1] » 4) & 0x3); lppack[3 * i + 1] - ((lpinifo{charcnt + 1] « 4) A OxfO) | ((lpinfofcharcnt + 2] » 2) A OxOf); Ippack(3 * I + 2] « ((lpinfo{charcnt + 2] « 6) A OxcO) | (Ipinfo{charcnt + 3] A 0x3f); charcnt +- 4; ) /* append High Priority Message to symbob •/ for (i - LPSYMS - HPCOPY; i < LPSYMS; i++) lppack[ij ■» 256.0 * modf(lpzip / 256.0,JUpzip); /• write out results •/ filewrite; file - open("textin.out"tO_WRONLY10__CREAT10_TRUNC| 0__BINARY,S__IWRITE); write(file,hpinfo,6); write(file,lppack,LPSYMS); write(file,errcnts,2); close(file); ) 75(a3) (followed by page 75 (a4)) 26 C TAB L E 2 /•MkHexLUT Govind Shah 10/20/87 V #include <fcntl.b> #include <sys\types.h> # include <sys\stath> #include <ioJb» #include <stdioJ»> #include <3tdlib.h> #include <time.h> ^include <conio.h> #define True 1 #define False 0 #definc kNoBins 32 static int LUTBToH[2048J; static int LUTHToB{2187J; /* 2 Hex to 3 bit LUTs generated manually . Ref. Lab Book Page 32*/ static int LUTBH32(S] - {0,1,2,3,5,6,7,8}; static int LUTHB23[9] - {0,1.2,3,3,4,5,6,7}; static int SortVaIue{21S7]; static char RejectFlag{2187]; static int Bin{kNoBins]; static int Binl[kNoBins]; static int GrayCount,Gray4Count,RejectCount; static int BitValue[7J; static int •pLUT/pSort.ifile.ofile; static int Diff(int,int); Static void Histognun(void); MAIN() < int iJ,Index,HexValue; /•Generate the table for histogram and sorting •/ pSort - SortValue; for (Index - 0;Index<2I87;Index++) ( RejectFlagpndex] - False; /•uncompress and find the individual hex levels •/ HexValue Index; GrayCount ■ 0; for (i-0;i<7;i++) { 75(a4) . . (followed by page 75(a5)) 1 2 3 4 f 8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 ►; ► 26 0 " ~ * BitV«]uefi] - (HexYiIue % 3X if (BitValue[i] — I) GrayCount++; HexValue - HexVaIue/3; ) printfC\n%04.4d ".Index); for (i—6;i>-0;i—) printfC%01.1d\BitV«lae[il); /•Compote the »ort Index •/ •pSort - Diff(0,i>+DiffCI^>+Diff(3.4>+I>iffC4,5)+ Diff(0^>+Diff(1,4)+Diff(4,6)+Diff(2,5); if (*pSort < 4) RejectFlag{Index] - True; if (*pSort — 4) { printf(*\n%Ql.ld "/pSort); for (i-6;i>-0;!~) printfC%01.! d*.BitValue{i]); Bin 1 [GrayConnt}++; if (Gr*yCount >4 ) RejectFIagflndex] - True; if (GrayCount — 4) if (Gr*y4Count < 10) {Gny4Count++;RejectFlag[Index] - True;} ) if (RejectFlagflndex^—True) {printf(**");RejectCount++;) Bin{*pSort4+jH-; ) printf(*\nNumber of rejected codes: %d",RejectCount); /•generate histogram for the sort indices •/ Histogram(); printf("\n\ngray level distribution^"); for (i-0;i<kNoBins;i4+) Bin[i] - Binlfl]; HistogramO; I* Create the Bin To Hex and Hex to Bin LUTs •/ j-0; for (i-0;i<21S7;i++) { if (RejectFlag[iJ — Tnie) j++; else LUTBToHli-j] - J; LUTHToB{i] - i-j; ) for (i-0;i<204S;i++) printf(*\n%4.4d BToH:%4.4d HToB:%4.4d\i,LUTBToHli],LUTHToB{iJ/; for (i-204g;i<21S7;i++) printfC\n%4.4d HToB:%4.4<r,ifLUTHToB[i]); ofile-o, nCBinHexJut",0_WR0NLY]0 CREATp_TRUNQO_BINARY,S_IWRrTE); write (oille,LUTBToH,siieof(LUTBToHj); write (o(ile,LUTBH32^izeof(LUTBH32)); closefcfile); ofile - 0penCHexBin.lnt",O_WRONLYlO_CREAT10_TRUNqO_BINARY.S_rWRrrE); write (ofiIe,LUTHToB,sizeof(LUTHToB)); write (orile.LUTHB23^i2eof(LUTHB23)); 75 (a5) (followed by page 75(a6)) 2 3 o i 7 > close(ofile); static lot Diff(BItNol,BitNo2) int BitNol3itNo2; t int i; i - BitValuefBitNo 1 ] - BitValue(BitNo2J; return i*i; ) static void HistognmO ( int ij.Max.Count.RunningGonnt; float Scale^ealedCount; /•Find the scaling factor */ Max - 0; for (i-0;i<kNoBLns;i++) if (Bin[i] > Max) Max - Bintf]; RunningCoant - 0; Scale - 1.0; if (Max > 50) Scale - 50.0/Max; for G-0;i<kNoBinsy++) ( RunaingCouat +- Binfi); printfC\n9M)4.4d %04.4d %0Z2d* ",Bin(i],RunningCount,i); ScaledCount - Scale*Bin[i] + 0.5; Count - Scaled Count; for (j-0-J<Counttf-H-) printfC%cV**); ) ) AZ 75(a6) (followed by page 75(a7)) • 1 2 3 4 •I 8 9 IJ 12 f3 14 IS 16 17 f 8 !9 >0 11 >2 13 \4 IS >6 >7 !« »2 13 14 16 17 • 18 19 '1 <2 '3 14 '5 '6 <7 '•5 •9 0 1 2 3 4 26 0 */ unsigned char GFMulIndEIe(char,char,ehar); /•field.Index.elementV niuigned char GFMul(char,char,ehar); /*field,elementl ,element2*/ unsigned char GFTnverse(cliar,char); /•field.elementV unsigned char GFDiv(chmr,char,char); /•field.Dividend.Divisor*/ /* # of inTo. symbols for Reed-Solomon Cbde; including padding */ #define kkO 43 ^define kkl 183 f* Correction capability of the code */■ #dellne ktO 10 #define ktl 36 #de(1ne ktmax 36 f*max of tO and tl •/ /* Block length of the code */ #define knO 63 #deflne knl 255 /* Actual number of information symbols */ ♦define klnfoSymbolsO 6 #define klnfoSymbobl 70 f* Total number of symbols on the label */ •define kLabelSymsO 26 #de(lne kLabelSymsl 142 75<a7) (followed by page 75(a8)) 26 0 1 TAB L E 3 - r GF.C Covind Shah Govuid yfo"*' 9/18/87 Program to generate Galois Field Tables for 2A6 and 2A8 Entries Range Entries Range L_IndexToElement 128 1-63 512 1'255 L_EIementToIndex 63 0-62 256 0-254 Polynomial l+x+x*6 l«A2+xA3+xA4+xA8 Note: The number of entries required is the Index to element LUT is only 63/255; however the tables with 64/512 entries are helpful for multiplying two elements.
The ElementTolndex LUTs return 63/255 if the input element is 0 (disallowed) •/ •include <stdio.h> # include <stdlib.h> #include <time.h> #include <conio.h> #include <io.h> #include <sys\types.h> #include <sys\stath> #include <fcatl.h> static unsigned char L_IndToEle[2I512J,L_EleToInd[2J256J; unsigned char IToE0[5]2],EToI0[256],rroEl[512],EToll[256]; InitGF() / ( . int iFile; iFile - open("Gf.LUT",0__RIX)NLy | 0__BINARY); read(iFiie,L_IndToEle,jizeof(L_IndToEle)); read(iFiie,L_EleToInd^i2eof(L_EleToInd)); read(iFiIe,IToEO,sizeof(lToEO)); read(iriie,EToIO^izeof(EToIO)); read(iFile,IToEl,sizeof(TToEl)); read(iFile,EToIl ,sixeof(EToIl)); close(iFiIe); ) r— ———— — unsigned char GFMulIndEle(Field,Index,Element) unsigned char Field,Index.Element; ( if (Element — 0) return(O); return (L_IndToElefFieldIIndex + L_EIeToInd[FieldIEIeme&t]]); ) r •/ 75(a8) (followed by page 75(a9)) J & ,ft A \j \j ] ^ E unsigned char Field.Elel.Ele2; { if ((Elel 0) | (Ele2 ■—0)) retura(O); return (L_IndToEIe(Field)^JEIeToInd[FieldIElelJ + L_EleToInd[FieIdIEle2]]); ) r unsigned char GFInverre(Field,Element) unsigned char Field.Element; { if (Field — 0) return (L_lndToEle{0I63-LJEleToIndI0lElemeDt]]); else return (L_IndToEIe[lI255-L_EleToInd[IIElenjentn); ) r unsigned char GFDiv(Fie!d,Dividend,Divlsor) unsigned char Field.Dividend.Divisor; ( if ((Dividend — 0) | (Divisor —0)) return(O); if (Field — 0) Divisor - 63-LJEleTolndtOIDivisorJ; else Divisor - 2i55-L_EleToInd[lIDivisort return a_IndToEIe(FieldIL_EIeTolDd(FieldIDividend] + Divisor]); ) *2 75(a9) (followed by page 75(alO) 26 0 r MJtRSLUT.c Govind Shah /28/87 Program to generate: Galois Field Tables for 2A6 and 2AS RS Coding generator matrices L_IndexToElement L_EIementToIndex Polynomial Entries Range 128 1-63 64 0-62 l+x+xA6 Entries Range S12 1-255 256 0-254 l+xA2+xA3+xA4+xA8 Note: Tbe number of entries required in the Index to element LUT is only 63/255; however the tables with 128/512 entries are helpful for multiplying two elements.
The ElementToIndex LUTs return 63/255 if the input element is 0 (disallowed) •/ •include <stdio.h> •include <stdlib.h> •include <timeJi> •include <conio.h> •include <io.h> •include <sys\types.h> •include <sys\stat.h> •inciude <fcntLh> •include <\ups\code\gf.h> unsigned char IToEqS12),EToI0l256],IToEl[512],EToIip56]; unsigned char GMat0[kInfoSymbols6I2*kt0],GM8tl[kInfoSymbolsiX2*ktl]; maiaO ( static unsigned int iJ,oFilr;,Poi>\NoElements,OverFlowMask,PrimePoly; static iwsigned char L_IndTo£let2]i512]tL_E3eToIndl2I256J; static char Field; static int n,kJ^eedsdRowstt; static unsigned char GPoly[2*ktmax + H static unsigned char QIndex,QCoeff; unsigned char Dividend[knl]; static int Degree,Row; /•Generate the Galois Field Look Up Tables */ /• Galois Field (2**m) *f 75(alO) (Followed by page 75(all)) 1 2 3 4 6 7 8 9 0 J 2 3 4 S 6 7 8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 7 3 ? •) i I J f S S 7 1 7 > I I 26 f 3 for (FleId-0;Field<2;Field++) { if (Field — 0) ( NoEIements » 63; OverFIowMask - 0x40; PrimePoly - 0x43; /*l+x+xA6*/ ) else ( NoEIements ■ 255; OverFIowMask - 0x0100; PrimePoly - 0x01ID;/*l+xA2+xA3+xA4+xA8*/ J /* Generate Index To Element LUT •/ Poly - 1; for (i-0;i<-2#NoEIements+ly-H-) ( L_IndToEle[Fie!dIi] - Poly; /•Multiply by Alpha, shifting by 1 •/ PoIy«-l; if ((Poly & OverFIowMask) !■ 0) I* Incorporate the prime polynomial*/ Poly PrimePoly; ) /• Generate Element To Index LUT •/ L JEleToIndlFieldlOJ - NoEIements; for (i»l;i<-NoEIements;i++) { L_EJeToInd[FieldIi] - 0; for (j-Oj<NoEJements;j++) ( if (L_IndToEle(F5eIdIj] — i) ( if (L_EleToIndpF1eldIi] I- 0) printf(*\n* L_EIeToIndIFieIdIi] - J; } ) 1 ) /* Copy into IToEOJToEI JEToI0,EToIl •/ for (i~0;i<256;i++) ( EToI0(i] - L_EleToInd{0Ii]; EToIl[iJ - L_EIeToInd[ 1 lij; ) 75 (all) (follcwed by page 75(al2)) for (i-0y<512;i4+) ( IToEOp] - L_IndToEIe{OIiJ; IToEIIi] - L_IndToEle[ 1 JiJ; ) oFile - 0pen("GfXUT\0_WR0NLY 10__CREAT | OJTRUNC10_BINARY.S_IWRrrE); write{oFile,L lndToEle^i2eof(L_lndToHle)); write(oFtte,L__EleToInd,sizeof(L_EleToInd)); wri te(oF3 e ,TToEO ,s izeof(TToEO)); write(oFile,ETolO,sizeof(£ToIO)); •write(oFiJe,rToE 1 vsizeof(IToE 1)); write(oFile,EToIl ,sizeof(EToIl)); close(oFiIe): printf(*\Q GF(63) GF(256)"); printf(*\n IndToEIe EleToInd IndToEIe EleToInd*); printf(*\n ' ; ■); for (i-0;i<512;i++) C printf(*\n %3d %3XH \i,i); if (i < 32) printf(*%3d %3XH %3d %3XH*,L_IndToEIe(0Ii], L_IndToE!elOIi],L_EleToInd(OIil.LJEleToIndlOIiD; else printfC "); printfC %3d %3XH \L_IndToEle{IIi], L IndToEIellli)); if (i<256) printfC%3d %3XH"JL_EIeToInd[ I Iil,L_EIeToInd[l Ii]); ) ...I.,.,...................*........,.*....*.,....................../ ———-—— ■ —— f* Generate the Generator Matrices •/ InitGFQ; f* Compute the Generator Polynomial (x-mX*"f**'2Xx+*A3)x+aA4) (x+*A2t) Ref: Page 13 of lab book •/ for (Field-0;Field <-l;FieId++) { if (Field *0) ( t-ktO; n - knO; k - kJcO; NeededRows - klnfoSymbolsO; ) else { t - ktl; n - knl; 75(al2) (follcwK-d by page 75(al3)) k ■ kkl; NeededRows - IcInfoSymbolsl; } GPolytOJ - I; for (i-l;i<-2*t;i++) GPoly[i] ■ 0; r priii tf("\n Generator Polynomial for R_S Code; GF(%d) l«%d",n+l,t); printfC\n Coeffs. of »A%d',2*t); V for (i«l;i<-2*t;l++) /•multiply by (x+aAi)*/ C for (J-U>OJ-) GPolyOl - (GPoIytj-1] A GFMuIIndEIe{Field,i,GPolyIj])); GPolylO] - GFMuUndEIe(FieId,i,GPolytO]); J /* printf(*\n "); for (j**0J<"2*ty++) printfC%2u *,GPoljljD; V r~ /•Compute the generator matrix •/ for (Row-0;Row<NeededRows;Row++) ( for (i-0;i<n;i++) Djvidendfi] ■ 0; DividentHn-k+Row] - 1; /'set xA(n-I-i) */ /•perform the long division and find remainder •/ Degree - n-k+Row; while (Degree >« 2*t) { Qlndex - Degree - 2*t; Degree of the quotient*/ QCoeff - DividendJDegree]; /* printf("\nDeg.%u Qindex%u QCoeff%u\n",Degree,QIndex,QCoefO; 7 for (i-0;i<-2*ty*++) ( (Dividend{QIndex +i] A- GFMiU(FieId,GPoly{i]tQCoeff)); ) /*New remainder computed •/ while ((Dividend^—Degree] — 0) *4 (Degree >- 2*0); }/* Degree reduced to less thaa that of polynomial */ /* printf(*\nRow no. %u\n\Row); for (i-0;i<2*t;i-w-) printf(*%2u \Dividend[i]); V I* Copy the remainder to the G-Matrix */ for (i-0;i<2*t;i++) if (Field — 0) GMatOfRowJi] - Dividend{i); else GMatl[RowIi] - Dividend(i]; }/• All rows done •/ printf("\n Generator Matrix Tor R S Code; GF(%d) t»9M computed",n+l,l); ) /"Both fields done •/ 75(al3) (followed by page 75(al4) J 2 3 4 o 7 8 o '0 'J '2 ■3 •4 •5 '5 7 ■8 9 0 7 ■2 •3 ■4 6 7 8 9 0 1 2 3 4 6 7 8 \9 * 0 I 2 3 S 7 ) 26 q r ? v V ' oFile - openCRSXUT\O__WR0NLY 10_CREAT| OJTRUNC10_BINARY ,S_rVrrRITE); write(oFile,GMat0.si2eof(GMit0)); "~ write(oFile.GMatl »sixeof(GMit 1 )Y, elose(oFile); ) AZ t 75(al4) (followed by page 75(al5)) 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 >0 11 12 >5 14 ?<5 ?7 '.8 19 11 12 13 14 16 17 18 19 i <0 >1 12 13 14 •5 '6 7 8 9 0 1 2 60'73 TABLE 4 /* EnCode.c Goviod Shah 9/23/87 Program to encode for error correction V #include <ioJ» #include <sys\types.h> #include <sys\5taLh> # include <fcntl.h> #inelude <stdio.h> #iocIude <stdlib.h> #include <time.h> #includ»; <conio.h> #include <\ups\code\gf.h> unsigned char GMatOtkInfoSymbobOI2*ktO],GMatl[kInfoSyniboIslI2*ktlJ; maln() { nnvgnod char RawDataO[kInfoSyinbobO+2*ktO],RaxvData 1 [klnfoSymbok 1 +2*kt 1 J; unsigned char •pCnrrSym; int iJ.iFile; FILE 'stream; InitGFO; InitRSO; iFile - opennrextIn.Outw.O_RDONLY J 0_BINARY); read(iFiIe, &RawDataOJ2*ktOJ,kInfoSyinbolsO); read(iFile, ARawDatal [2*ktl j.klnfoSymbob 1); close(iFile); ErrCode(0,Rawr>ata0); ErrCode( 1 .RawData 1); stream - fopen("ErTCode.Out\*w+b"); pCurrSym - &Ra wDataO(kLabelSynisO-] J; for (i-0;i<kLabclSytns0;i++) { for (j"0*j<6J++) ( fputc(*pCurrSym & 1 stream); •pCnrrSym »• 1; ) pCurrSym—; ) pCurr5ym - & RawData I [ kLabelSyms I -1 £ for (i-0;i<kLabelSymsJ;i++) { for (j-OJ<8J++) ( 75(al5) (followed by page 75(al6)) 1 2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 7 S J ■) I j i ( [ 260 ) fputc(*pCurxSym & 1 .stream); •pCurrSym »- I; > pCunSym—; J fclose(strcai&); ) ————————M——————■jmmw— InitRSO ( int iFile; iFile - open(*RSXUr.O_RDONLY | 0_BINARY); read(iFile.GMatO^ixeofCGMatO)); read(iFile,GMatl,skeof(GMatl)); close(iFjle); ErrCode<Field,RawData) unsigned char Field; unsigned char RawDataQ; ( int InputCount,i,t,TwoT,CkSymbolNo; unsigned char CkSymbol; if (Field — 0) { IoputCount - klnfoSymbolsO; t - ktO; ) else { ' InputCount - klofoSymbolsl; t-ktl; ) TwoT - 2*t; for (CkSymbolNo-0;CkSymbolNo<2*t;ClcSyii»bolNo++) { CkSymbol - 0; for (i-0;i<InputCount;i++) If (Field -- 0) CkSymbol A-GFMul(0,RawData[i+TwoT],GMat0[iICkSymbolNo]); else CkSymbolA- GFMuI(l ,RawData(i+TwoT],GMat ItflCkSymbolNo]); ) /•Check symbol computed*/ RawData[CkSymbolNo]m CkSymbol; )/* All the check symbols have been computed */ ) AZ 75(al6) (followed by page 75(al7)) 1 2 3 4 6 7 8 9 '0 •1 •2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 I 2 3 t J J 7 S ? 1 t » r ; i 27 7 j TABLE 5 /♦PrLabel.c Ccvind Shah 10/26/87 Reads input binary data from file ERRCODE.OUT Loads RegionsXUT created by MkMaps Selects cells of 3x3 hexes from the region map in the sequence specified by Order.LUT Performs binary to 3 level hex conversion using CellCode for each 3x3 cell Uses PrintLabel to generate bit map file for the label Also generates a file PRLABEL.OUT showing hex levels in B,W,G.
V #include <IoJi> #include <sys\typesJ» #include <sys\stath> #include <fcntl.h> #include <stdio.h> #include <stdlibJi> #include <time.h> #include <conio.h> #include <malh.h> #include <\ups\code\labelJi> int RegionMapIkRegionRowsIkRegionCols]; int BinData[kNoBits]; main(argc,argv) int argc; char *argvf); ( int i^AvailableRegions; Int Res,Row,Col,CellNo; int BitsConverted; sutic int LUTOrdertllOI2]; static int Histo{!4]; static int oFiIe,iFile; FILE 'stream; char Out Char, if (atoi(arg' *>) — 7 J) Res - 75; else hc3 - 300; InitCellCodeO; stream - fopen("ErrCode.Out\"rb"); for (i-0;i<kNoBits;i++) BioData(i] - fgetc(stream); fclose(jtream); iFile - open("order.lut*,0_RDC)NLY | 0_B1NARY,S_IREAD); 75(al7) (followed by page 75(al.8)) 1 2 3 4 6 7 8 9 '0 7 2 3 '4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 I 2 3 4 6 7 8 9 0 1 2 3 4 7 ? ? 9 r i 26 0 t read(iFile,LUTOrder,44C); c!ose(iFile); r V BitsConverted - 0; LoadHexMap(); AvailableRegioos - LoadRegionMap(ReglonMip); for (£ellNo-0;C«lINo<l 10;CcIlNo+-f-) { 1 - CeUCodiKBitsConvcrted.LUTOrdertCellNoIOl.LUTOrdeitCellNoI 1 ]); BitsConverted +- i; Histo(i}++; ) /•Copy region map to a data file */ printf("\n'); stream - fopenCprlabeLoutVV); for (Row-32;Row>"0;Row—) { for(CoI-0;CoI<30;Col-H-) { switch (RegionMappiowICol]} { case 0; OutChar - *W;break; case 1: OutChar - *G';break; case 2: OutChar - *B';break; default OutChar - 'X'; } fprintf(strexm,"%c*,OutChar); printf(*%c",OutChar); ) fprintf(stream,"\n"); printfHn"); ) PriatLabeI(Res,RegioaMap); printf(°\nCell size distributlon^n*); for (i-0;U14;i++) printfC%d:%d M,Histo[l]); printf("\nTotal bits encoded^bd",BitsConverted); 75(al8) (followed by page 75(al9)) 26 0 ) t TABLE 6 /•MkMaps.C.
Govind Shah 10/26/87 Generate HexMap.LUT and Regions .LUT.
HexMap-LUT assigns a RegionRow/RegionCol pair to each pixel in a 300x300 matrix. Pixels that do not belong to any regions are initialized to indicate a fixed white region (Regions.LUT[33IO]). It also maps the appropriate pixels for the finder rings to a black or white region.
Regions that include any pixel from the finder rings, as well as the line-end regions in the short rows, ire indicated as disallowed in the RegionMapXUT by storing a number higher than 2. */ #include <ioJ» ♦include <sys\typesJi» ♦include <sys\stath> ♦include <fcntlJi> ♦include <stdio.h> ♦include <3tdlib.h> ♦include <time.h> . ♦include <conio.h> ♦include <math.h> ♦include <\ups\code\label.h> ♦define H 12 ♦define W 10 FILE 'bitmap; static char huge map[300][304][2]; char Line[304I2]; int region; int i, j, k, I.RegionRow.RegionCol.RingColorCol; int x, y; int lsd; int ofile; int level; double thett, rl, rwidth; double c, s; int r; unsigned char byte; static int hexpat[HIW] - C 0,0,0,0.1,1,0.0,0,0, 0.0,1,1,1,1,1,1,0,0, 0.1.1,1.1.1,1,1,1.0, 1,1,1,1,1.1,1,1.1.1, I.I.I, 1,1,1,'. ,1,1,1, 1,1.1,1,1,1-'-.1,1,1, 75(al9) (followed by page 75(a20)) 7 2 3 v 6 7 8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 0 1 2 3 4 6 7 S 9 9 I 1 3 t S 7 ? ? > f | r i i 26 0/ 1,1.1.1.1.1.1.1.1.1. 1,1.1.1.1.1.1.1.1.1, 1.1.1,1.1.1.1,1,1,1, 0,1.1.1,1.1.1,1.1.0. 0.0.0.1,1.1,1.0,0.0. 0.0.0.0.1,1,0.0.0,0 * main(argc,argv) Int argc; char *argvfl; { static int RegionMapOcRegionRowsXkRegionCols]; char far *pi; int AvailableRegions; int NoRings; float RingWidth; NoRings - 6; RingWidth - 8.0; /* initialize the pixel map to point to white region RegionMap[kRegionRows-lIO] is flxed at 0 (white) RegionMaptkRegionRows-lIl] is fixed at 2 (black)*/ fprintf(stderr,"\nlnitializing map"); for (i - 0; i < 300; i++) for 0 - 0; j < 304; j++) (mapfigjlO] - kRegionRows-l; nuptflill] - 0; ) for (i—0; i<kRegionRows; i++) for (j-0; j<kRegionCols; j++) RegionMaptflj] - 3; ^initialize to unusable */ RegionMap[kRegionRows-lI0] - 0; RegionMapfkRegionRows-lJl] <■ 2; fprintf(stderr,*\nDoing hexagons'); RegionRow - C; /• do length 30 rows •/ for (i - 0; i < 300; i -h- 18) (RegionCol" 0; for (j « 0; j < 300; j +■ 10) ( for (k - 0; k < 12; k++) for (1 - 0; 1 < 10; 1+*) if (hexpat[kll] — 1) (map{i+klj+!10] - RegionRow; m*p(i+klj+ixn - RegionCol; ) RegionMapfRegionRowIRegionCol] ■> 0; RegionCoI++; ) RegionRow +- 2; 75(a20) (followed by page 75(a21)) J 2 3 4 6 7 8 9 •0 '1 •2 •3 ■4 S 6 7 8 9 0 J 2 3 4 6 7 8 9 0 1 2 3 4 6 7 S 9 0 I I 1 t 7 ? ) ) i i I I I 2 6 o 1 z / -t j RegionRow - 1; f* do length 29 rows */ for (i - 9; i < 295; i +- 18) {RegionCol • 0; for G - 5; j < 300 - 5; j 4- 10) { for (k - 0; k < 12; k++) for a - 0; 1 < 10; 1++) if (hexp*t[kll] — 1) {m*p(j+klj+110] - RegionRow; map(i+k£j+IIl] - RegionCol; ) RegionMap[RegionRowIRegionCol]« 0; RegionCoI-H-; ) RegionRow +- 2; ) fprintf(jtderr,*\nDoing finder circles'); for (theta - O4 theta < 3.14159 / 24 theta +- .015) /*.005 worked*/ { e - cos(theta); 1 - sin(theta); for (r » 0; r < NoRings; r++) { RingColorCol - (r & I); /• 0 for white, 1 for black */ if (r > 0) rwidth ■ RingWidth; else rwidth - RiflgWidth/24 for (rl - O4 rl < rwidth; rl +- .2) { x - J + (((r - J) • rwidth) + rl) • c; y ■ .5 + (((r - S) • rwidth) ♦ rl) • s; pi ■ &map[ 150+xI 150+y^O]; if (*pi <kRegionRows-l) RegionMap{*piI*(pi+2)] - 3; *pi++ - lcRegionRows-1; •pi - RingColorCol; pi - Amap{15O-xI15C ' vX0]; if (*pi <kRegi«>aRows -r,) RegionMap{*piX*(pi+l)] - 3; •pi++ - kRegionRows-1; •pi - RingColorCol; pi - Amip[150+xll50-yl0]; if (*pi <kRegionRows-l) RegionMap(*piI*(pi+l)] - 3; *pi++ » kRegionRows-1; *pl m RingColorCol; pi - &map( 150-xI 150-yl0j; if (*pi <kRegionRows-l) RcgionMapf*piJ*(pi+l)] - 3; •pi++ - kRegionRowj-1; •pi - RingColorCol; ) 75(a21) (followed by page 75(a22)) 260 ■ y7 ) J AvvlableRegions » 0; for (i-0;i<JcRegionRows-l;i++) for G-O; jckRegionColi; j++) if (RegionMaptflj] — 0) AvailableRegions++; printf C\oAvulabIe regions%d"tAv»ilableRegioas); /•Output map data to regmap.out */ ofile - 0pentTie*niapXUT,,O__WRONLY | 0_CREAT | 0_TRUNC | 0_BINARY^_IWRrrE); for (i - 0; i < 300; i++) C for 0'-OU<304J++) ( LinetllO] - map{iIjI0J; LineOll] - maptiliU); ) write<ofile,Llue,siz£of(Line)); } c!ose(onieX ofile - 0peprRegi0ns.LUr,O_WRONLY | 0_CREAT | 0_TRUNC | 0_BINARYfS_IWRJTE); write(onie,RegionMap^izeof(RegionMap)); close(ofile); /* Print the region map •/ for (i-kRegionRows-l;i»-0;i—) { printf("\n%2.2d ",i); for Cj-0J<kRegionColsU-H-) ( if (RegionMaptflj] < 3) printfC*J.Id*,0'% 10)); else printfC%c",'x'); ) ) printf(*\n *>, for (i"0;i<kRegionCols;l+-10) priQtf(*%l.ld M/10); ) 75(a22) (follcwed by page 75 (a23)) 1 2 3 4 6 7 8 9 J1 12 13 14 16 17 18 19 21 72 23 24 26 27 28 29 31 32 33 34 36 37 ?a 19 tl 12 13 (4 16 17 IS 19 ;o >1 >2 •i •4 '■5 2 6 G ' TABLE 7 i * /•CellCode.c Govind Shah 10/26/87 Converts binary bits from the BinData bitstream into 3 levels for the aviilable hexes ia the indicated 3x3 cell. Returns number of bits used.
Routine called with pointer to a 3x3 cell in RegionMap, and index to the binary bit stream; Binary to 3 level conversion is done using BinHexXUT generated by MkHexLUT.
Number of bits used is a function of the number of hexes available in the indicated cell (See Page 28 lab book). •/ ♦include <io.h> ♦include <sys\types.h> ♦include <sys\statJi> ♦include <fcntl.h> ♦include <stdio.h> ♦include <stdlibJ» ♦include <time.h> ♦include <conio.h> ♦include <math.h> ♦include <\ups\code\labelJi> int iFile; int LUTBinHex[2048],LUTBH32(ft]; extern int RegionMap{kRegionRowsIkRegionCols]; extern int BinDatafkNoBitsJ; laitCellCodeO ' ( iFile - 0pen(-BinHexXUT\0_RD0NLY10_BINARY); read (iFile,LUTBiflHex,jizeof(LUTBinHex)); read (iFi]e,LUTBH32,jizeof(LUTBH32)); close(iFile); ) int CellCode(Index,CeURow,CellCol) /•Returns number of bits converted to hexes; pBinDataP points to next bit*/ int Index,CellRow.CellCol; ( int RowOffset.ColOffset.lJ.AvailableHexes.FixedHexes.BitsCcinverted; int Celllndex.RawRow.RjiwCot.HexValue.BinValue; /•printfCXnlndex: %d CellRow: %d CellCoL %d",Index,CellRow.CellCol); •/ RowOffset - CellRow*,' • 75(a23) (followed by page 75(a24)) 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 37 38 39 40 41 42 43 44 45 46 47 (8 19 >0 >1 >2 ;3 •4 !5 26 Q 1 ? r > CoIOffsct - CeUCol?3; /•Find the number of allowed hexes •/ AvailableHexes - 0; for (i-0;l<3;i++) for(j-0J<3J++) If (RegionMap[RowOffsct + iJColOffset + j] <- 2) AvailableHexes-H-; /*printf(* available: %d", AvailableHexes); •/ BinValue - 0; if (AvailableHexes >- 7) for (i-0;i<l l;i++) BinVaiuc - ( (BinValue « 1) | BinData{Tndex-H-]); HexValue ■ LUTBinHex[BInYalue£ /•— —„«~_FULL CELL CASE */ if (AvailableHexes 9) ( for (i-0;i<6;i++) { RawRow - RowOffiet + (2-1/3); RawCol - ColOffset + (i%3); RegionMaptRawRowJRawCol] ■ HexValue % 3; HexValue - HexYalue/3; ) RegionMap(RowOffsetIColOffset+l] - HexValue; RegioaMap[RowOffsetIColOffset] - (HexValue + 1 + (BinData(Index++])) % 3; RegionMap{RowOffsetIColOffset+2] - (HexValue +1 + (BinData[Index-H-])) % 3; return(13); }/• Full cells completed •/ Celllndex - 0; FixedHexes » 0; BitsConverted - 0; if (AvailableHexes >- 7) ( while (FixedHexes < 7) ( RawRow - RowOffset + (2-CellIndex/3); RawCol » ColOffset + (Celllndex%3); if (RegioaMap[RawRowIRawColl <- 2) { RegionMap{RawRowIRawCol] - HexValue % 3; HexValue ~ HexValue/3; FixedHexes++; ) CelIIndex++; ) AvailableHexes — 7; BitsConverted -11; 1 /•Convert pairs of hexes into 3 bits using LUTBH32 •/ while (AvailableHexes > 1) ( 75 (a24) (followed by page 75(a25)) 1 2 3 4 6 7 8 9 11 12 13 f 4 16 \7 '.8 19 >0 >; 12 13 14 \S >6 >7 18 >9 U 12 <3 14 <5 '6 '<7 •■8 •9 •o 7 2 3 4 6 7 8 9 0 26 0 •; ■» BinValue « (BinData(Index4+] « 2) I (BinDataIIndex++] « ]) | (BinData[Index++]); HexValue - LUTBH32{BinValue]; /* printf("BinValue.-%d HexYalue:%d\BinY«Jue,HexValue); •/ FixedHexes - 0; while (FixedHexes < 2) ( RawRow - RowOffset + (2-CellIndex/3); RawCol - ColOffset + (Celllndex%3); if (RegionMap{RawRowIRawCol] <» 2) ( RegionMap[RawRowIRawCol] » HexValue % 3; HexValue - Hex Value/3; FixedHexes-H-; ) Celllndex++; ) AvailableHexes 2; BitsConverted 3; ) /•Covert the remaining hex, if at all •/ if (AvailableHexes — 1) ( FixedHexes ■ 0; while (FixedHexes < 1) ( RawRow - RowOffset + (2-CellIndex/3); RawCol - ColOffset + (CelUndex%3); if (RegionMapfRawRowJRawCoI] <« 2) ( RegionMap[RawRowIRawCol] - ((BinData(Index4+]) « 1); FixedHexes++; J Celllndex++; /• printf("\nRowOff:%d ColOff:%d dRow*.%d dCot%d", RowOffset-ColOf fset,dRow,dCol); V ) BitsConverted-t-t; ) return (BitsConverted); } AZ 75(a25) (followed by page 75(a26)) /* Filename: ORDER.C • Author: Donald G. Chandler, PA Technology • Date: October 24, 1987 • Purpose: Generates the ORDERXUT look up table • * Modifications after November 15 release: •/ ♦include <fcntl.h> ♦include <sys\types.h> ♦include <sys\stath> ♦include <io.h> main() ( static int ordeifllllO] -< 107, 88. 87. 86. 85. 84. 83. 82, 81. no. 89. 46. 45. 44. 43. 42. 41. 40, 39. 106, 90. 11. 22. . 21, 9. , 8. 19. 105, 91, 23. . 57. 56. 55. 54, 29, 7. 104, 92, 12. 58. 69. 68. 67. 66, 53, 18. 103. 93, 24. 59. 70. 71, 72. 65, 52. 6. 102, 94. . 60. 61. 62. 63. 64, 51. 17, 101. 95, 26. 27. 47. 48. 49. 50, 28, . 100, 96. 1. 13. 2. 14. 3. , 4. 16. 99. 97. 31. 32. 33. 34. . 36, 37. 38. 98. 108, 73. 74. 75. 76. 77, 78, 79, 80. 109 ); static int order!ut[110J2]; int i, j; int file; for (i - 0; i < 11; i-H-) for (j - 0; j < 10; j++) ( orderlut[order{ilj] - 1X0] - i; orderlut[order{ilj] - 111] - j; } file - open("order.lut",0_WRONLY | O CREAT | O TRUNC I 0_BINARY,S_IWRITE); ~ ~ vrite(fi]e,orderlut,440); close(file); ) AZ 75(a26) (follcwed by page 75(a27)) 26 0 1 /•Label.h •/ ♦define kRegionRows 34 /*extra row for regions fixed black and white •/ ♦define kRegionCols 30 ♦define kNoBits 1292 A2 75(a27) (folicwed by page 75(a28)) 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 12 13 >4 16 17 28 19 U 12 13 16 17 18 19 tO tl '2 13 t4 <6 '7 '8 ■9 0 7 2 3 J 'y f\ .r ^ & u y I / TABLE 8 /•Label Govind Shah 10/17/87 Routines to generate bitmap for a label from RegionMap.
Uses HexMap.LUT to find the region for each pixel in a 300x300 matrix. •/ ♦include <io.h> . ♦include <sys\types.h» ^include <sys\staLh> ♦include <fcntLh> ♦include <3tdioJi> ♦include <stdlib.h> ♦include <time.h> #include <conio.h> ♦include <math.h> #include <\ups\density2\labeIJi> FILE *bitmap; static char huge map[300I304X2J; [* 304 to allow integer number of bytes for each row •/ char Line[304I2]; int region; int i, j, k, 1,RegionRow,RegionCol,RingColorCoI; int x, y; int lsd; int ofile; int level; double theta, rl, rwidth; double c, s; int r; unsigned char byte; LoadHexMap() i fprintf(stderr,"\nloading hex nap"); ofile - openChexmapJut",0_RDONLY | D_BINARY); for (i ■ 0; i < 300; i++) { read(ofile,Line,sizeof(Line)); for O-0J<304J++) ( mapfililO] - LineUIOJ; n»rtiWl] - LinetilH ) ) close(ofile); 1 75(a28) (followed by page 75(a29)) 1 2 3 4 6 • 9 ■o •1 1 3 4 6 7 a 9 o i 2 3 4 6 7 & 9 0 4 7 S ? •: i r > S T ( ) ) I 26 0 * ? ? \ f int LoadRegionMap(RegionMap) int RegionMap[kRegionRowsIkRegicnColsJ; ( int AvailableRegions; fprintf(stderr,"\nloading region map'); ofile - open(*regions.lut",0_RDONLY | OJBINARY); i — read(ofile,RegionMap,kRegionRows',kRegionCols*2); close(ofile); fprintf(stderr,*\nRegioa map bytes rcad;%d",i); AvailableRegions - 0; for (i«0;i<kRegionRows-l;i++) for (j-0; j<kRegionColi; j-H-) if (RegionMaptflj] — 0) AvailableRegions-H-; fprintf (stderr,"\n Available regions:1^,AvailableRegions); return(AvailableRegions); ) PrintLabel(Res.RegionMap) int Res,RegionMap[kRegionRow$XkRegionCoIs]; { bitmap « fopen(*bitmap.out","wb"); fprmtf(stdeir,"\nPlotting graphics to bittnap"); linit(Res); lgraphics(); for (i - 299; i >-0; i~) { lline(38); for U - 0; j < 300; j +- 8) { byte » 0; for (k - 0; k < 8; k++) ( level - RegionMap[map{iIj + kI0Qmap[i][j + kjljj; if (level > 2) level - 0; switch (level) ( case 0: level - 0; break; case 1: if (((i + j + k) % 5) — 0) level - 1; else level - 0; break; /* half toning for gray hexes*/ case 2: level » 1; break; ) byte - byte * 2 + level; ) lplotbyte(byte); ) ) 75 (a29) (follcwed by pag« 75(a30)) o \7 8 9 0 1 2 3 4 6 7 8 9 0 >< 26 0 1 lendgraphicsO; leject(); ) Iflit(res) nt res; fprintf(bitmap,,%c*t%dR",27,res); graphics() fprintf(bitmap,*%c*rl A\27); ejectO fprintf(bitmap,*%cE',27); endgraphJcsO fprintf(bitmap,*%c*rB"r27); plotbyte(byte) unsigned char byte; putc(byte.bitmap); Une(bytecount) nt bytecount; fprintf(bitmap,"%c*b%dW\27,bytecount); "2 75(a30) (followed by page 75{a31)) Z 6 0 ' TABLE 9 /* Filename: . DTIN1T.C * Author. Donald G. Chandler, FA Technology * Date: August 1, 1987 * Purpose: Initializes the DT2803 Image capture board * * Modifications after November 15 release: •/ ♦include <stdio.h> ♦include <\ups\denslty2\dt2803.h> main() /• program DTINTT initializes the DT2803 by clearing it and then loading the DT2803 output color lookup table according to: 0 - 63 monochrome intensity values 0-63 64 - 127 red intensity values 0-63 128 - 191 green intensity values 0-63 192 - 255 blue intensity values 0-63 V < int i, j; unsigned char far *sp; /* check if DT2803 is present */ if ((inp(DTSTAT) <fc 0x70) !« 0x60) < fprintf(stderr,"\nThere is no DT2803 installed at base 0x2E0\n"); exit(l); ) else printf("\nDT2803 is present at Ox2EO"); clr2803(); ■t /• send the READ CONFIGURATION command ♦/ wcomzn(3); printf("\nn»e DT2803 device id is %x",rdata()); switch (rdataO) { case 0: printf("\nThe DT2803 device is aot configured for interrupts"); break; case 1: printf( \nThe DT2803 device is configured for interrupt IRQ2"); break; case 2: pristfC\nThe DT2803 device is configured for interrupt 1RQ3*); break; case 3: printf("\nThe DT2803 device is configured for interrupts IRQ2 and IRQ3-); break; default: fprintf(stderr,*\nDT2803 interrupt configuration not expected\na); exit(l); break; * 75(a31) (follcwed by page 75(a32)) 0 U 1 printf("\nThe DT2803 memory buffer begins at %x",rdata() * OxlOOO); /* set up color lookup table 0 •/ wcomm(0xl9); /* tend write output lookup table command */ wdau(0); f output lookup table 0 */ for (i ■ 0; i < 256; i++) ( wdata(i % 64); »witch(i / 64) I case 0: wdata(63); break; case 1: wdita(4S); break; case 2: wdata(12); break; case 3: wdata(3); break; default: fprlntf(stderr,"\nUnexpected case in dtinitVn"); exit(l); break; ) ) printf(*\nlssuing SET INTERNAL TIMING command"); wcomm(0xl2); printf("\nlssuing DISPLAY ON command'); wcomm(0x20); /• write a test pattern into the video memory and check it '/ sp - OxaOOOOOOO; for (i ■ 0; i « 240; i++) for (j - 0; j < 256; J++) ( •sp - j; if (*sp!- j) { fprintfCXoMemory error in DT2803 video memory location %x\n",i); e*it(l); ) *t>++; ) /• normal exit •/ printf("\nTesting and color lookup table 0 initialization complete\na); 75(a32) (follcwed by page 75(a33)) 1 2 3 4 6 7 8 9 11 1.2 13 <4 'J '6 '7 '8 '9 •0 '.] \2 •3 \4 !5 '.6 !7 '8 •9 •0 J •2 ■3 •4 7 8 9 0 1 |2 4 7 ? 7 1 f > i i i £6 0: TABLE 1 0 f* Filename: • Author • Date: • Purpose: DTUVE.C Donald G. Chandler, PA Technology August 1, 1987 Puts the DT2803 image capture board in live mode * Modifications after November IS release: « V ♦include <stdio.h> ♦include <\upj\denjity2\dt2803.h> main() /• program DTLIYE puts the image capture board in live or "pass-through" mode •/ { wcomm(Oxlc); /* select input look up table •/ wdata(O); /* number 0 (input in range 0 - 63) •/ wcomm(Oxl3); /* set to external video synch */ wcomm(Ox23); /• set pass-through mode */ ) AZ 75(a33) (followed by page 75(a34)) 2 6: <J TABLE 11 /* Filename: DTGRAB.C * Author Donald G. Chandler, PA Technology * Date: August 1, 1987 * * Modifications after November 15 release: V ♦include <stdio.h> ♦include <\ups\density2\dt2803J» mainO J* program DTGRAB grabs an image and puts it on the display */ ( wcomm(Oxlc); /* select Input look up table •/ wdata(O); f* number 0 (Input In range 0 - 63) •/ wcomm(0xl3); /* set to external video synch •/ wcomm(0x22); /• execute acquire frame command */ ) AZ 75(a34) (followed by page 75(a35)) I 2 3 4 6 7 8 9 11 12 13 14 16 17 IS 19 21 22 23 24 26 27 28 29 31 32 33 34 V6 37 38 39 tl n 13 14 I" 16 17 18 19 !0 u <2 y >4 •5 TABLE 12 2Q0 17 3 /• Filename: • Author.
• Date: • Purpose: • * Modifications after November 15 release: DTSAVE.C Donald G. Chandler, PA Technology August 10, 19S7 Saves the DT2803 image capture board image to a disk file V /••• compile with COMPACT model (MCCC) ♦include <stdio.h> ♦include <fcntl.h> ♦include <sys\types.h> ♦include <sys\stat.h> ♦include <io.h> ♦include <\ups\density2\dt2S03.b> /* DTSAVE saves an image file onto a disk * the image file format is just 61440 consecutive bytes, an exact * replica of the screen memory •/ main(argc,argv) int argc; char *argv[]; { int ofiJe; ofile - open(argv[l ],0_WR0NLY| 0_BINARY 10_CREAT^_IWRITE); /• open •/ write(o(lle,0xl0000L * MEMSEG.6M40); /* write direct from screen mem */ } AZ 75(a35) (followed by page 75 (a36)) 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 11 22 13 14 26 27 28 29 u 12 1 3 14 16 17 18 19 I] 12 13 (4 16 17 18 >9 <0 <] •2 <3 ■4 ■5 2 6 0 17 3 TABLE 13 !* Filename: DTLOAD.C -• Author Donald G. Chandler, PA Technology * Date: August 10, 1987 * Purpose: Loads the DT7803 image capture board from a disk file * Modifications after November 15 release: * •/ compile with COMPACT model (Batch file MCCQ ♦include <stdioJ» ♦include <fcntUt> ♦include <sys\types.h> ♦include <sys\stath> ♦include <io.h> ♦include <\ups\density2\dt2803J» f* DTLOAD loads an image file from a disk * the image file fonnat is just 61440 consecutive bytes, an exact * replica of the screen memory V main(argc,argv) int argc; char •aJgvf); ( int ifile; ifile - open(argv[ 1 ]tO_RDONLY | OJBINARY); /* open the file •/ read(ifile,OxlOOOOL * MEMSEG.61440); /* read it directly onto screen */ ) AZ 75(a36) (follcwed by page 75(a37)) 9. 11 12 13 14 16 17 18 19 !0 11 !2 >.3 14 ',5 16 17 18 19 10 #2 ^13 14 16 17 18 19 w1 WI2 •3 '4 '5 •6 •7 •8 9 0 1 2 3 4 2 6 0 17 ) I* Filename; NORM.C * Author: Donald G. Chandler, PA Technology * Date: August 10,1987 * Purpose: Normalizes the image on the DT2803 screen * * Modifications after November 15 release; ♦include <stdio.h> ♦include <conio.h> ♦include <\ups\density2\dt2803.h> main() { static unsigned char far in[240J2S6]; static unsigned char far out£240X256t char far *sp; int row, col; int i. j; int pixe!;. int max, rain; float m: j* copy in the screen data */ ' getscreen(in); {* loop on small centered blocks •/ for (row » 50; row < 230; row +- 10) ( /* do bar graph •/ - for (i - 0; I < 10; i++) for (j - 0; j < 5; j+f) ( sp - (0x10000 • MEMSEG) + ((239L - (row + i)) « 8) + j; •sp - 127; ) for (col - 16; col < 240; col 4- 16) ( max » 0; min - 100; f* find max and nin in larger surrounding block */ for (i - -10; i < 30; i++) for (j - -16; j < 32; j++) ( pixel - in[row + {{col + jfc if (pixel > max) max - pixel; if (pixel < min) min - pixel; 75(a37) (follcwed by page 75(a38)) 1 2 I J 6 7 8 9 K 13 14 16 17 18 \9 \0 11 12 >3 14 >6 17 !8 19 to IJ 12 13 14 ft 18 19 I] 12 13 <4 I '7 'S 9 0 J 2 3 4 S 2 6 0 1 7 3 ) /* normalize cealered block according to max and min values •/ m - 255. / (1 + (max - min)); for (i - 0; i < 10; in) for (J - 0; j < 16; j++) out(row + ijcol + j] - (m * (injrow + ilcol + j] - min)) / 4; ) } !* copy data back to >crcen •/ putscreen(out); ) 75(a38) % (follcwed by page 75(a39)) 2 6 TABLE 14 /* Filename: FIND.C Author Donald G. Chandler, PA Technology Date: October 24,19S7 Purpose: Finds the center of labels and rescales the image Modifications after November 15 release: / ♦include <stdio.h> ♦include <maih.h> ♦include <\ups\density2\geometryJi> ♦include <\ups\density2\dt2S03J» f* This program finds the center of s label.
The process has a multistage hierarchy.
The first stage scans through the lines looking for linear (1-D) correlation to exceed a threshold.
The second stage is invoked at any point where the first stage passes. This stage does a small 2-D correlation.
If this correlation passes, a larger 2-D correlation is done.
If this passes, the center has been found. ♦define PFLEN 63 ♦define PFMAG 400.0 ♦define FLEN ♦define SLEN 9 /* length of half of symmetric prototype filter */ /* pro to filter designed for 400 pixels / inch •/ t* 1-D and 2-D filter lengths •/ j* short 2-D filter length •/ unsigned char far in[VPIXIHPEXJ; f* input pixel array •/ unsigned char far out(YPDCIHPIX]; /* output pixel array */ static float odfilterfFLENl static float tdfilterfFLENIFLEN]; int imax - 0; int jmax - 0; float interp2d(); float fllter2dO; int filter] dQ; mainO { /* read in the prototype filter and design 1-D and 2-D filters •/ printf("\nDcsigning filters"); design(od filter,tdfilter); 75(a39) (followed by page 75(a40)) r , £ 0 U 1 I* read in the screen */ printff\nReading in the screes'); getscreen(in); if (filter! cKodfilter)) ( printff\nNo valid center found\n°); exit(l); ) m*rk(imax jmix,GREEN); printfCVnRejcaling"); rcsc&IeO; putscreen(out); float filur2d(tdfi]ter,ilen,jlen,icenterjcenter,iextent,jextent.color) float tdfiltertFLENIFLENJ; int ilen, jlen, icenter, jeenter, Iextent, jextent, color; ( int i, j. k, 1; float max, sum;' max - -I.elO; for (i - icenter - iextent; i <- icenter + iextent; i++) { mark(i Jeenter - jextcnt,color); mark(i Jeenter + jextent.color); for (j - jeenter - jextent; j <- jeenter + jextent; j++) { sum - 0; for (k - 0; k < ilen; k-H-) for (1« 0; 1 < jlen; 1++) sum +" tdfilterfkjl] • in[i + k - ilen / 2][j + I - jlen / 2J if (sum > max) ( max - sum; imax ■ i; jmax - j; ) ) > printf(*\nMax - %f",max); return(max); ) int filterld(odfilter) float ©dfilterflFLEN]; ( int i, j, k; 75(a40) (followed by page 75(a41)) J 2 3 4 S 6 ■I 9 •0 •1 •2 '3 4 <5 7 8 9 0 1 1 •3 ■4 S ■6 7 8 9 0 t 3 4 6 7 8 9 f, 2 3 4 6 7 8 9 0 I Z J t 2 6 0 173 float sum. smooth; smooth - O4 for (i - 32; i < VPDC - 32; I 31 ( m*rk(U2,GREEN); m*rk(i,HPIX - 32.GREEN); for G - 32; j < HPDC - 32; j++) ( sum » O4 for (k - 0; k < FLEN; k++) sum -H- odfiltertk] • in[ilj + k - FLEN / 2]; smooth - smooth • .95 + .OS * sum * sum; if (smooth > 6.0) ( if (filter2d(&tdfilteiftFLEN - SLEN) / 2I(FLEN -SLEN) / 2], SLEN,SLEN,iJ,5.20,BLUE) > 10.0) if (fllter2d(tdfilter,FLEN.FLEN,imax,jmax,2,2.RED) > 50.0) retura(O); smooth - 3.0; } ) } retura(l); design(odfilter,td filter) float odfilterfFLEN]; float tdfllter[FL£NlFLEN]; { FILE 'stream; static float pfilterfPFLENJ; float xpos, ypos, fpos, fncpos; Int ipos; int i, j; /* read in the prototype filter */ stream - fopenC\\ups\\filtera\\iinpulseJutW); for (i - 0; i < PFLEN; I++) fscsnf(stream/' %f *,&pflltei[i]); /* design the 1-D Alter based 00 horizontal magnification */ for (I - 0; i < FLEN; i++) ( fpos - fabs((i - FLEN / 2) * (PFMAG / HMAG)); Ipos - fpos; fracpos - fpos - Ipos; odfUterfi] - (1. - fracpos) * pfilterfipos] + fracpos * pflltei[ipos ♦ 1]; ) /* design the 2-D filter based on horizontal and vertical magnirication */ for (I - 0; i < FLEN; i++) { 75(a41) (followed by page 75(a42)) 1 2 3 t 6 7 a 9 o i 2 »! 6 7 8 9 0 1 2 3 4 6 7 8 9 0 J 2 3 j v )\ 9 0 1 2 ? i f V, 1 } ) ! j I I i 26o 1 73 ypos - (i - FLEN / 2) • (PFMAG / VMAG); for U - 0; j < FLEN; j++) ( xpos - (j - FLEN / 2) • (PFMAG / HMAG); fpos - hypo t(xpos,ypos); ipos - fpos; fracpos - fpos - ipos; if ((ipos + 1) > PFLEN) tdfilter(ilj] - 0^ else tdfllteifilj] ~ (!• - fracpos) * pfilterfipos] + fracpos • pfilterfipos + It ) ) ) rescale() { float al, a2, bl, b2; static int irow[220J; static int icol[220£ static float frow[220]; sutic float fcol[220]; int i, j; int pixel; bl - VMAG / 1504 al - imax - bl * IIO4 b2 - HMAG / 1504 a2 - jmax - b2 • 110.; for (i - 0; i < 220; i++) ( frowfi] - al; irowfi] « frow[iJ frow[i] -» irowfi]; fcol[i] - a2; icol[i] « fcol[i£ fcol[i] — icolfi]; al bl; *2 +■ b2; ) for (i - 0; i < 220; i+-f) for (j - 0; j « 220; j+f) ( pixel - interp2d(frow{i]tfcollj],irow[i],icol(j]); mark(i + 10 j IS,pixel); out(i + lOJj + 18] - pixel; ) } float interp2d(yf,xf,yi,xi) float xf, yf; int xi, yi; 75(a42) (followed by page 75(a43)) 1 2 3 4 6 V W8 o u 12 13 14 IS 16 17 18 19 21 22 23 24 26 27 18 '.9 K '3 ■4 6 7 8 9 K ) { j* bilinear interpolation in 2 dimensions for positive x, y */ I* fonnula courtesy Govind Shah •/ int iO, 11,12, i3; /* neighboring points */ J* get the four pixels of interest •/ - intyijxij; 11 - in[yi]xi + It 12 - in[yi + 11*1 + It 13 - inlyi + ljxit /* return interpoltted value V rttura((float) (iO + (il - iO) • xf + (i3-K»*yf + (iO - il + i2 - i3) • *f • yf)); ) "Z 26 0 ■ ? j 75(a43) (follcwed by page 75(a44)) a 3 4 6 7 8 9 V, 12 13 14 IS 16 17 18 19 21 22 23 24 26 27 28 29 31 ?2 J3 K 16 17 18 19 '] •2 K 6 7 8 9 0 V TABLE 15 /* Filename: CLOCK.C * Author Donald G. Chandler, PA Technology * Date: October 20,1987 * Purpose: regenerates the hexagon clock from incomplete hexagon edge * Information * Modifications after November 15 release: * V # include <stdioJ» * include <roath.b> #define MEMSEG OxaOOO •define PI 3.1415926535 float huge real[256I258£ float huge aux(256I258£ extern void far fortran r2dfft(); /* provided by Microway, Inc */ extern void far fortran r2diftQ; /• use library sms2fftiib */ static long far fftrowarg - 8; sutic long far fftcolarg - 8; static float far fftscalearg -1.0; sutic long far fftdimarg - 258; double filter2560: main(argc,argv) int srgc; char *argv[l; ( in! i. j; long r, c, d2; .double angle; /* Read in the image */ get256<real); /* Form the standard deviation map •/ sd256(real,aux); put2S6(real); /* Window the map •/ window256(rMl); put256(real); I* 2-D FFT the windowed standard deviation map •/ r2dfft(real,&fftrowarg,&fftcolarg.&fft5ca]earg,&f'idiinarg); [* Remove components of wrong frequency or direction */ angle - filter256(real); 75(a44) (followed by page 75(a45)) 26 0 I* Inverse 2-D FFT */ r2dift(real,&fftrowarg,&fftcoIarg,&fftscaIearg,&fftdimarg); /• Determine major axis •/ major{real,angle); /• convert valleys to peaks •/ for (i - 0; i < 256; i++) for 0 - 0; j < 256; j++) if (realTiXJ] >- 0) rcaltilj] - 0^ else reatyilj] ■ -««lplj]: put256(real); sd256(a,b) [* This routine computes the standard deviation map of a 256 x 256 array */ /* Amy a is the. input, and output, array b is used as a temp •/ /* This routine computes 3x3 window s.d.'s using the sepmbility trick •/ float huge *12561258); float huge b[256I258]; { int i, j; /* square a into b */ for (i ■ 0; i < 256; i++) for 0 - 0; j < 256; j++) Hilii - «Mjl * "T'lii I* do the row sums for a and b */ for (i ■ 0; i < 256; i++) for 0" - I; j < 255; j++) { a[ijj - 1] 4- tplj] + «fflj ♦ H b[ilj - IJ t- blilj] + blilj + IJ; ) /* do the column sums for a and b •/ for (i « 0; i < 254; i++) for (j - 1; j < 255; j++) { •U - nil f aIJI>] «■ «U + lilt bU - 1I>] bUIi] + b0 + lift ) I* square a into itself •/ for (i - 0; i < 254; i++) for Cj - 0; j < 254; j++) atili] •- aliljj; I* compute standard deviation */ for (i » 254; I 0; i—) for (j - 254; j >- 0; J—) a(i + 1U + 11 - sqrt((double) ((9. • bfllj] - alilj]) / 72.)); 75(a45) (follcwed by page 75 (a46)) i 7 8 9 11 i 16 17 18 19 71 22 23 24 26 27 28 29 11 12 13 14 16 • 19 to 11 12 13 14 <5 9 <8 '9 ■0 ■1 2 3 4 26 0 1 l /• zero out the .edges */ for (I — 0; i < 256; »4+) «liI0j - «liI255] - «I0Ii] - *[255Ji] - 0' } window256(real) float huge reaq256I258t ( int i, j; float r; /* perform radius based windowing •/ for (i « I; i < 255; i++) for (j - 1; j < 255; j++) { r - sqrt((doubIe) (I - 120) * (i - 120) + 0 - 128) • 0 - 128)); if (r > 127.) realliU] - 0; else if (r < 22.) realtflfl - 0.; else if (r < 30.) realtfljj ♦« (r - 22.) / 8; else realtflj] •- M + .46 * cos(r • 2 • PI / 255); ) get256(array) float huge array[256I258]; ( int row, col; unsigned char far *sp; I* copy pixels from screen to memory •/ sp - (unsigned char far*) (OxlOOOOL * MEMSEG); for (row » 0; row < 240; row+-+) for (col - 0; col < 256; col-H-) arraylrowlcolj - *sp++; for (row - 240; row < 256; row++) for (col - 0; col < 256; col++) amrfrowlcol] - 0^ } put256(array) float huge am yt2561258J; { int row, col; unsigned char far *sp; float max, scale; /• autoscale •/ max - l.e-10; for (row - 0; row < 256; row++) for (col - 0; col < 256; col-H-) 75(a46) (followed by page 75(a47)) 1 2 3 I 6 7 8 9 JO 11 i 14 16 17 18 19 21 22 23 24 26 17 28 29 31 32 33 34 55 36 • 39 to 11 12 13 14 i 18 19 ;o <1 >2 •3 *4 -S (• > 26 0 173 if (amrfrowlcol] > mix) wax - anaytrowlcolj; scale - 63.999 / max; I* copy to screen •/ sp - (unsigned char far*) (OxlOOOOL * MEMSEG); for (row - 0; row < 256; row++) for (col 0; col < 256; col++) •sp*+ » scale * kmyfrowlcol]; putznag256(complex) float huge complex[256I129l2]; { Int mrow, row. col; assigned char far *sp; float max, scale; float r2; J* autoscale •/ max — l.e-10; for (row - 0; row < 256; row++) for (col - 0; col < 129; coI++) if ((r2 - (complex[rowlcoll0] * complex[rowlcoll0] + complextrowjcolll] * complex{rowlcollI])) " > max) max - x2; scale - 63.999 / sqrt(max);' /* copy to screen •/ ap - (unsigned char far*) (OxlOOOOL* MEMSEG); for (mrow - 0; mrow < 256; mrow++) { row - (128 + mrow) % 256; for (col - 0; col < 129; col++) { sp - (unsigned char far*) ((MEMSEG • OxlOOOOL) + ((long) mrow « 8) + col); *sp - scale * sqrt(complex[rowIcolIO] * complex(rowlcol][0] + complex[rowlcolll] * complexjrc wlcoll 1 ]); ) ) doable filter256(compIex) float huge complex[256Il29I2); C int I, im, j. jl; double angle, slope; double lowO, highO; -double low], highl; double low2, high2; double max; double r2; int max. cmax; 75 (a47) (followed by page 75(a48)) . 7 8 9 JO IJ 12 « 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 f 41 12 « t5 • 18 19 r o r l :2 ■>3 •4 •5 2 o 0 1 pu tmag256(complex); /• remove the low frequency components •/ for (i - 0; i < 45; i++) { jl - £ + «qrt(45. • 4$. - i • I); for 0 - 0; j < jl; j++) complexfiUIO] - complexfilill] m complex[(256 - I) % 256UI0] - t»mples{(256 - i) % 256UI1] - O4 J putmag256(complex); I* remove the high frequency components */ for ( i - 0; i < 129; i++) ( if G < 80) jl - .5 + sqrt(80. • 80. - i • i); else jl - 0; for G - jl; j < 129; j++) complex[iljl0]" complex[iljXl]« comp!ex[(256 - i) % 256JjI0] - complex{(256 - I) 96 256£jll] - O4 ) putmag256(compIex); /* find bright point to determine minor axis orientation */ max - l.e-10; for (i m 0; i < 80; »++) for G ~ 0; j < 80; j++) ( r2 - complexpUIO] * complexHljlO] + -complexfiljll] * complexlijjllj; if (r2 > max) { max -12; max - i; cmax - j; ) ' ) /• printfC\n(rmax,cmax) - (%d,%d)\nnax,cmax);*/ angle • atan2((double) xmax,(doubIe) cmax); I* compute tipper and lower bound of dopes for directional filters */ lowO - tan(ang1e - PI / 18.); lowl - tan(angle - PI / 18. + PI / 3X low2 - tan(ang1e - PI / IS. + PI / IS); highO - tan(angle + PI / 18.); highl - tan(angle + PI / 18. + PI / 3.); hi*h2 - tan(angle + PI / 18. + PI / U); r p.intfC\nangle - %f; (JowO^IghO) - (%f,%f); (lowl^ighl) - (%f,%D; (Iow2,high2) - (%f.%0\ angle^ow0,high0jowljughljow2jiigh2); •/ j* perform directional filtering */ for (iai ■ -80; im < 80; im++) for (j m Gi S<i0i j-»-r) 75 (a48) (follcwed by page 75 (a49)) 1 2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 >? 2 3 4 6 7 8 <i 1 2 3 4 6 7 8 9 0 2 6 0 17 3 { i - (256 + im) % 256; if (j) slope - (double) (im) / (double) (j); else slope - 1x10; If (highO < lowO) I If (((slope < lowO) ScJt (slope > hlgbO)) &Jl ((slope < lowl) | (slope > highl)) && ((slope < low2) 1 (slope > high2))) complex[iIiI0] ** complex[iUIl] - O4 ) else if (highl < lowl) { if (((slope < lowO) | (slope > highO)) &&. ((slope < lowl) SlSl (slope > high!)) &.&. ' ((slope < low2) | (slope > high2))) compiez[>ljI0]'> complez[iUIl] - 0.; ) else if (high2 < low2) ( if (((slope < lowO) | (slope > tughO)) &.&. ((slope < lowl) | (slope > highl)) &&. ((slope < low2) (slope > high2))) complcz[iUlO] - complex[iUIl] - 0.; ) else if (((slope < lowO) | (slope > highO)) &&. ((slope < lowl) | (slope > highl)) && ((slope < k>w2) 1 (slope > high2))) complex[iXjI0] - compIe*[iUll] - 0.; ) putmag256(complex); return(angle); ) major(real,angle) float huge real[256I258]; double angle; ( int trial; int i. j. jl. j2; int ix, iy, int t; double tangle, cangle. maxangle; double x, y, dx, dy; double xoaxsum, sum; /* perform three trials to determine major axis orientation •/ wwtwm m for (trial - 0; trial < 3; trial++) ( tangle ■ angle + trial * PI / 34 I* draw in the lines */ for (i - 0; i < 4; i-H-) 75(a49) (follcwed by page 75{a50)) 2 6 0 17 { /* compute direction to ■ corner */ cangle - fugle + PI / 4. +1 * PI / 24 /• compute x and y coordinates of a corner */ x - 12*. + 106.066 * cos(eangle); y - 120. * 106.066 * sin(cangle); f* compute heading towards next comer •/ cangle — .75 • PI; /* compute x and y increment values */ dx - cos(cang1e) / 24 dy - sin(cangle) / 24 for (t — 0; t < 300; t++) { Ix - x + J; iy - y + J; m*rk(iy,ix,I27 + 64 • trial); if (reirijlylix] < 1^2) realtfyXix] 4- 2x2; x 4— dx; y 4-djr. ) ) /* nun the absolute values of points in bounded area of real •/ sum - O4 for (i - 12; I < 22*; i++) { f* scan for leftmost boundary •/ for 0 - 20; j < 236; j++) if (realtfli] > 1x2) (realtflj] -- 2x2; break;) f* scan for rightmost boundary */ for (jl -235;jl>-j;jl~) if (realfiDI] > l e2) (realpljl) — 2x2; break;) for 02- H j2<- jl;j2++) { if (rtalplj2] > 1x2) real[ili2) —2.e2; sum ■+— fabs((double) real[ilj2p; ) ) /• printf("\nTrial %d at angle %f has sum - %P,trial,tangle^um); •/ if (sum > maxsum) I maxsum — sum; maxangle " tangle; } ) printfC%lT\maxangle); ) int m*rk{row,col,value) /* Marks a point on the screen and returns the existing value •/ int row, col, value; { unsigned char far *»p; int pixel; 75 (a50) (follcwed by page 75(a51)) m 3 4 6 7 8 9 •0 'J 2 3 4 S 6 7 8 9 0 J 2 3 V 8 9 0 1 2 3 0 7 3 ? J I > i t i s I I.
) I 26 Sxel^K64 Ch" f"*) ((MEMSEG * OxlOOOOL) + ((long) row « g) + col); •ip - value; return(pixel); *Z 75(a51) (followed by page 75(a52)) s 9 IJ 12 \3 \4 16 17 18 19 >0 U 12 \3 14 >6 \7 >9 #• Wl 1 12 U 14 IJ '■6 * 7 •2 J * J 5 7 5 P 0 / 2 ? * y 26 0 i i * j > ' T A B L E 1 6 /* Filename: SEARCH.C * Author Donald G. Chandler, FA Technology * Date: October 27, 1987 * Purpose: Combines information from the clock regeneration and the * hexagon image * Modifications after November 15 release: V * SEARCH should be compiled with MCCC V # include <stdioJi> # include <stdlibJ» #include <fcntl.h> #include <sys\typesJ» #include <sys\suth> #include <lo.h> # include <mathJ» ♦include <\ups\density2\dt2803.h> #define PI 3.1415926535 int cv»ll35I32t int ivsl[35I32]; int jv»11351321 int gvTdt35;«(321; int iavJ35I32t int di.'iI351311; unsigned char" far ck[240J256]; unsigned char far grey{2401256£ static int rplus{6]; static int cplus£6J main(irgc,argv) int argc; char *«rgv(]; c int ntx; int i, j; int flag; int imtx, jmax; int ifile; double theta; f* compute the appropriate relative search directions and locations based on the major axis angle */ printf("\nEntcr the major axis angle: '); ?5(a52) (follcwed by page 75 (a53)) ) 1 2 3 4 i 7 8 9 '0 >1 •2 •3 '4 '5 ■6 •7 •8 '9 '0 •2 '■3 •4 'J !6 '.7 \8 V '■1 '■2 IJ 14 ••5 ■■ 6 >1 '■0 1 2 3 •4 6 7 3 9 0 1 2 3 4 z n i 7 scanff %lf ",&theta); theta - PI / 2. + theta; /* angle input is perpendicular to axis •/ directions(theta); /* get the clock amy */ getscreen(ck); , i* get the grey amy •/ ifile - open(argv[l],0_RDONLY | O BINARY); f* open the file •/ read(ifile,OxlOOOOL * MEMSEG.61440); /* read it directly onto screen */ getscreen(grey); /* initialize the search arrays cval, gval, ival, and jval •/ initsearch(theta); /* main search loop •/ loop: max - -1; flag - 1; /* search for largest clock value on grid •/ J* also check if entire grid is populated */ for (i - 0; i < 35; i++) for 0 - 0; j < 32; j++) ( if (cval[ilj] — 0) flag - 0; if (cval[iXj] > max) ( max - cval[i][j£ imax - i; jmax - j; ■» J ) if (flag) goto fullgrid; cval[imaxljmax]" -cval[imaxljmax]; f* printf(*\nOn grid (imax Jmax) - (%d,%d) located at (%d,%d)", imaxjmax,ival(iaiax£jmax]jva](imaxljmax]); •/ I* insert clock, grey, and (i J) values of eny neighbors not previously inserted */ insert(imaxjmax); /* loop •/ goto loop; fullgrid: histogrxmQ; printoutO; coamgridQ; insert(ij) int I, j; { static int iplus{6] - (0,-1,-1,0,1,1); 75(a53) (follcwed by page 75(a54)) 26 0173 static int oddjplus[6] - {1.0,-1,-1,-1,0}; static int evenjplus[6] - {1,1,0,-1,0,1}; int pas; int ip, jp; int r, c; int rl. cl; int mix; int nearch, csearch; /* searches a hexagons neighbors •/ /• if ((i + j) A 1) mark(ival[ilj]jvallilj],GREEN); else nark(tva]Iil)]jvalIiIj],RED); •/ ip - ivaltflj]; jp.- jvallilfl; nurk(ipjp,GREEN); /* check for conditions which terminate iteration •/ for (pos » 0; pos < 6; pos++) { ip - i + iplusfposj if (i & I) jp - j + oddjpluslpos]; else jp - j + evenjpIus[pos]; if (ip > 34) continue; if (ip < 0) continue; if (jp > 31) continue;' if 0p < 0) continue; if (cval[ip£jp] — 0) { f* compute expected position of neighbor */ r - rplusfpos] + ivayilj]; c - cplusjfpos] + jvalliljl r do first step of gradient search */ *1 " i; cl ■ c; max — 0; /* printf("\nStart search for pos - %d at (%d,%d) - %d",pos,r,c,ck[r][cD;V for (march » r - I; rsearch <■ r + 1; rsearch-H-) for (csearch - c - I; csearch <» c + I; csearch-H-) if (ckfrsearchlcsearch] > max) ( max - ckfrsearchlcsearch]; rl » rsearch; cl - csearch; ) f* do second step of gradient search V r - rl; c-cl; /* printf("\nB«t step 1 for pos - %d is (%d,%d) » %da,pos,r,c,ck[rIc]);*/ for (rsearch - rl - 1; nearch <» rl + 1; nmchn) for (csearch ■ cl - 1; csearch <- cl + 1; csearch-H-) if (ck(rsearchlcsearch] > max) { max - ckfrsearchlcsearch]; 75(a54) (followed by page 75(a55)) J 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 12 9 31 32 33 34 36 37 >J<S 39 40 41 12 13 14 16 17 18 19 iO >1 12 >3 >4 >5 \ 26 0 / 7 3 r " rsearch; c - csearch; ) f* printf("\nBest step 2 for pos - %d, grid(%d,%d) is (%d,%d) - %d\ p0s.jpjp.r,c,cltlrlc]); •/ I* update cval, gval, ival, and jval */ cva^ipljp] - 1 + g • ck[rlc] - {ckjr - lie - 1] ♦ ektr - lie] + ck[r - He + 1] + cktrlc - 1] + ck[rlc + 1] + ck(r + lie - 1] ♦ ckjr + lie] + ck[r + lie + 1]); Ivalfipljp] - r; jval(ipljp] - c; gvallipljp) - greylrlcj ) J ) histogramQ { int i, j; int min, low, high; static int bin[64]; I* create grey level histognun of gval entries *J for (i » 0; i < 35; i++) for 0 - 0; j < 32; j++) binlgvallilj]}*+; /• plot •/ for (i - 0; i < 64; i*+) { printf(*\n%2± ",i); for 0 ■ 0; j < bin(i] / 2; j++) printfC*"); ) /* determine slicing levels •/ min « 10000; for (i - 10; i < 32; i++) if (bin[i] < min) c min - bis[i]; low - i; ) min - 10000; for (i - 32; 1 < 54; i++) if (bin[i] < min) ( min — binTi]; high-I; ) /• slice •/ for (i - 0; i < 35; i++) 75(a55) (followed by page 75(a56)) 1 2 3 4 7 8 9 U 12 13 14 IS 16 17 18 19 11 12 13 14 IS 16 >7 18 >9 11 12 13 14 IS 16 17 18 19 11 >2 13 14 IS <6 17 IS 9 0 1 2 3 4 26 Q i 7 j -for (J - 0; j < 32; j*+) if (gv^[iXJ] <■ low) { mar k(iv*l(ijj]jvtllilj),GREEN); gv»][ilj] » 0; ) else if (gval(ilj] <- Ugh) { mark(ivilIiIj]jv*l{iIj],RED); gvaltflj] - J; ) else ( m*rk(m]tfIj]jv«]IiIj],BLUE); gvallilj] - 2; ) printout) ( int i. j; static char bgwstringf] » "BGW"; printff\n\ngrey values'); for (i - 0; i < 35; i++) { printfC\n%2<t",i); for (j - 0; j < 32; j++) printf("%c ".bgwstringlgvallilj]]); } f* printf("\n\ni values"); for (i - 0; i < 35; i++) ( printfC\n%2d:',i); for 0'- 0; j < 32; j+f) printfC %3d\ival(i)[j]); ) printfC\n\nj values'); for (i » 0; i < 35; i++) ( printfC\n%2d.-*,i); for 0* - 0; j < 32; j++) printfC %3d'JvalMjD; ) V initsearcb(theta) double tbeta; ( int i, j, k, 1; int sum; int max, imax. jmax; double flmax, fjznax, mux, tbetamax; 75(a56) (follcwed by page 75(a57)) J 2 3 4 6 7 8 9 IJ 12 13 14 16 17 18 19 21 22 23 24 26 27 28 129 31 32 33 34 36 37 138 39 40 41 42 43 U 45 16 17 18 19 SO f 1 >2 >3 \4 i 5 26 0 1 7 3 int isert, jsert; f* find location of largest point near center •/ max - 0; for (i - 96; i < 144; i++) for 0 - 104; j < 152; j++) C sum - 0; for (k - -1; k <- 1; k++) for (1 - -1; ! <- l; h+) if (k 11) sum — ck(l + k{j + It else sum +- 8 * ckfi + kjj + It if (sum > max) ( max ■> sum; imax — i; jmax - j; ) ) printf("\nOn screen (imax jmax) - (%d,%d)",imax jmax); /• compute approximate position on grid */ !* start by converting max location to polar relative to major axis */ flmax - imax - 120.; fjmax - jmax - 1284 rmax - sqrt(flmax * flmax + fjmax * fjmax); thetamax - theta - atan2(fimax,fjmax); isert ■ 17.5 + rmax • sin(thetamax) / 4.5; jsert - 16. + rmax * cos(thetamax) / 5.0; printf("\ntheta - %f, rmax - %f, tbetamax - %f,,tbeta,rmax,thetamax); printfC\ninserting into grid at (ij) ■ (%d,%d)\isertjsert); /* insert clock, grey, and (i J) values •/ cval[isertljsert] - max; gvatyisertljsert] - grey[imaxljmaxt ival[isertljsert] ™ imax; jval[isertljsert] - jmax; direction^ theta) double theta; f* determine expected relative positions of neighbor hexagons */ rplus[0] - 5.0 * tin(theta); cplus(0] - 5.0 * cos(theta); rplus{l] - 5.0 • ain(theta + PI / 3.); cplus[l] - 5.0 • cos(theta + PI / i.y, rpluip] - 5.0 • ain(theta + PI / 1.5); cplus(2] - 5.0 * cos(theta + PI / 1.5); rpltu(3] - -rplustO]; cplus(3] - -cplus(0t rplus[4] - -rplus(lt cplus{4] - -cplusfit rplus[5) - -rplus[2t cplus(5] - -cplus[2t 75(a57) (follcwed by page 75(a58)) 1 2 3 4 6 7 8 9 '0 '1 '2 '3 ■4 '5 ■6 7 8 9 0 1 2 3 4 6 7 8 >9 0 1 2 3 4 6 )?s 9 0 1 2 3 i S 7 S ? ) f > i i » *60 5 73 coarsegridO ( int i, j. k, 1; int max, imax, jmax; int mm; int invene; FILE 'stream; static char bgwfl - *BGW"; I* test for initial row determination off by one either way */ fixrowQ; /* generate left/right difference map for right side up read •/ for (i - 0; i < 35; 1++) for 0 - 0; j < 31; j++) if (gvadlilil !- gval{ilj + 1]) difflilj] - 1; else difflilj] - 0; max - -1; invene - 0; for (i - -1; i <- 1; i++) for 0 - -J; j <- 1; j*+) { sum - 0; for (k - 1; k <- 31; k -t- 3) for 0 - 1; 1 <- 28; 14-3) sum 4— diff[i + k{j + IJ + difffi + k£j + I + It if (sum > max) ( imax - 1; jmax - j; max - sum; ) printfC\nright side up (ij) - (%d,%d); sum - %d; max - %d;\ ij.sum.max); ) /* generate up side down grey value map •/ for (i - 0; i < 35; i4+) if (i A 1) for (j - 0; j < 32; j++) gvmlinv[34 - 1131 - j] - gvaltflj]; else for 0 - 0; j < 31; j++) gvalinv[34 - >130 - j] - gv*l[ilj]; I* generate left/right difference map for upside down read */ for (i - 0; i < 35; I++) for (j - 0; j < 31; j++) if (gvaUnvtilj] i- gvalinvtflj 4-1]) difflilj] - 1; else difflilj] - 0; for (i - -1; i <- 1; i+f) 75(a58) (followed by page 75(a59)) 1 2 3 4 Wc 7 8 9 •0 •1 ■2 •3 4 S 6 7 8 9 0 1 2 3 4 6 7 8 •;> i 2 3 4 6 7 m 0 1 2 3 4 7 ? V 9 1 ; j 1 i 26 0 173 (~~~- for G - -I; j <- 1; j++) ( turn - 0; for (k - 1; k <- 31; k +- 3) for (1 - 1; 1 <- 28; 1 +- 3) sum 4- diffli + klj + 1] + diffli + kfc + 1 + IJ; if (sum > max) { imuc - i; jmax - j; max - sum; inverse - 1; ) printfC\nupiide down (i j) - (%d,%d); sum - %d; max - %d;*, iJ,sum,majc); ) stream - fopen("rdlabcl.in","w"); for (i - 33 + imax; I »■ 1 + imax; i—) { for G - 1 + jmax; j < 31 + jmax; j++) if (inverse) fputc(bgw[gvalinv[ilj]]tstreaxn); else fputc(bgv^gvallilj]l,stream); fputcf\n°,streain); ) fixrowO ( int i, j. bestrow; double min; double sumx, sumy, sumxx, sumxy; double a, b, m, p, y; min - l.elO; for (i - 16; i <■* 18; i++) ( sumx - sumy - sumxy - sumxx - 0^ for G - 5; j <« 10; j++) ( sumx +- jvallijjt sumy +- hraltfljt sumxy +- iv*l[ilj] * jvalJiUt sumxx +- jvaltflj] * jvalfiUt sumx +- jval(iI31 - jt sumy +— ival[iI31 - jt sumxy +- iv*HiI31 - j] * jval[iI31 - jt sumxx 4- jval[iI31 - j] * jval[iI31 - jt ) p - 12. • sumxy - sumx * sumy; nj - 12. • sumxx - sumx * sumx; a - p / m; b » (m • sumy - p * sumx) / (12. * m); y - a • 128. + b; 75(a59) (followed by page 75(a60)) 1 2 3 4 6 7 8 9 JO IJ 12 13 14 16 17 18 19 71 22 23 24 26 27 28 29 31 32 33 34 36 37 38 39 40 11 t2 43 44 45 46 47 48 19 il >2 s3 \4 •5 6 0 'j ? > Tprintf(*\nRow - %d; y » if (fabs(y - 120.) < min) C bestrow — i; min - fabs(y - 120.); } ) switch (bestrow) t cue 16: for (i - 32; i >- 0; i—) if <i& 1) for 0* - 32; j >- I; j--) gvaltf + lli - 1] - else for (J - 0; j < 32; j++) gvaJ{i + ljj] - gvalfiljj; break; case 18: for (i - 2; i <- 34; i++) if (i A 1) for 0 - 32; j >- 1; J~) gval(i - lli - 1] - gvaqilj]; else for (j - 0; j < 32; j+t) gvaltf - 1XJ1 - gvaljiljj; break; case 17: break;-default printff\nFatal error in flxxow*); cxit(l); ) ) *Z 75(a60) (follcwed by page 75(a61)) 26 0 1 "f f TABLE 17 /•RdLabel.c Govind Shah 10/27/87 Reads RJDLABELJN generated by Image processing software, and generates a binary bit stream, output to ERRDECJN.
Selects a 3x3 cell, picked in the sequence specified by orderXUT, and uses CellDcc to convert 3 level hex data into biu. CellDcc in turn uses RegionsXUT to discard Information for disallowed hexes. •/ #include <io Ji> #inc!ude <sys\types.h> ♦include <sys\sutii> ♦Include <fcntLh> #include <stdioJ» ♦include <stdlib.h> ♦include <timeJ» ♦include <conio.b> ♦include <mathJ» ♦include <\ups\code\labeLh> int RegionMaplkRegionRowsIkRegionCols]; int BinData[kNoBits]; main(argc,argv) int argc; char *argvQ; ( int {.AvailableRegions; int Res,Row,CoI,CellNo; int BitsConverted; static int LUTOrderfl 10J2J; static int Histo{14]; static int oFile.iFile.NoErrors; static cbar Line[30]; FILE 'stream; char OutChar; InitCellDecO; iFile - openC*orderJut"tO_F JNLY | 0_BINARY,S_IREAD); re»d(iFUe,LUTOrder,440); c!ose(iFiIe); AvailableRegions - LoadRegionMap(RegionMap); /•Get region map from data file •/ stream « fopenfrdlabelunVi"); for (Row«32;Row>-0;Row—) ( fscanf(stream," %30s ".Line); 75(a61) (followed by page 75(a62)) • 1 2 3 4 * 7 8 9 ■0 1 2 3 4 S 6 7 8 9 0 1 2 3 4 S 6 7 8 •j •I i 2 3 4 7 3 ) 1 r > } i i 260 17S for(Col-0;Col<30;Col4+) { if (RegionM»p{RowICol] <»2) switch (Line[ColJ) { case "W: RegionMap{RowICoI] - 0;break; case 'G': RegioaMap{RowICol] - l;break; case 'B': RegionMappiowICol] » 2;break; defaulc RegionMap(RowICol] m 3; ) } ) /* generate binary bit stream */ BitsConverted ~ 0; for (CellNO"0;CeIlNo<l 10;CellNo++) { i - CellDec(BitsConverted,LUTOrder(CellNoIO],LUTOrderlCelINoI 1 Dj BitsConverted +• i; Histo[i]++; prsntf(*\nBits converted;%d %d",i,BitsCon verted); ) printf("\nBits decoded;%d",BitsConverted); printf(*\nDistributio»: "); for (i-0;i<14;i++) prbtf(*%d:%d \i,Histo{i]); stream « fopenCErrDecJn'/wb"); for (i-0;i<kNoBits;i++) fputc(BinData[i],stream); ) 75(a62) (follcwed by page 75(a63)) 1 2 3 A l. 6 7 a 9 to u 12 13 14 !5 16 17 18 19 U ?2 ?J 14 IS 26 17 >8 f9 riO u 12 13 14 ?J i 6 17 w19 <0 il 12 14 'S >6 '7 •8 •9 0 1 2 3 4 S 2 L " " " ? c u ■ / 0 T A BLE 18 /♦CellDecx Govind Shah 10/26/87 Converts 3 level data for available bexes in the indicated 3x3 cell into binary bits stored into BinData bitstream. Returns number of bits generated.
Routine called with pointer to a 3x3 cell in RegionMap, and index to the binary bit stream; 3 level to binary conversion is done using HexBin.LUT generated by MkHexLUT.
Number of bits used is a function of the number of hexes available in the indicated cell (See Page 28 lab book).
V ♦include <ioJi> ♦include <sys\types.h> ♦include <sys\staU» ♦include <fcntU» #include <stdio.h> ♦include <stdlibJi> ♦include <lime.h> ♦include <conio.h> ♦include <mathJ» ♦include <\ups\code\label.h> int iFile; int LUTHexBin[2187],LUTHB23[9]; extern int RegionMap{kRegionRowsIkRegionCols]; extern int BinData(lS00]; InitCellDecO t iFile - 0pen(-HexBinXUT*,0_RD0NLY10_BINARY); read (iFile,LUraexBin.sizeof(LUTHexBin)); read (iFile,LUTHB23^i2eof(LUTHB23)); close(iFile); ) int CellDec(Iadex,CfellRow,CellCol) /* Returns number of biu generated from hexes*/ int Index,CellRowaCellCol; ( int RowOffset,ColOffsetJj, AvailableHexes,HexValue,Bin Value; int Celllndex.Weight.FixedHexcs,Bits Convert ed.RawRow.RaNvCol; RowOffset ■ CellRow*3; ColOffset - CellCol*3; /*Find the number of allowed hexes */ 75(a63) (follcwed by page 75(a64)) 26 Q 1 AvailableHexes - 0; for (i-0;i<3;i++) for(j-0J<3U++) if (RegionMap[RowOffset + ilCoIOffset + j] <- 2) AvaiIabIeHexes++; 1* -FULL CELL CASE — — — if (AvailableHexes — 9) ( HexValue - RegionMap{RowOffsetlCoIOffset+It for (i«5;i>-0;i~) { RawRow - RowOffset + (2-i/3t RawCol - ColOffset + (i%3); HexValue - HexValue*3 + RegionMap[RawRow][RawCol]; ) BinValue - LUTHexBinlHexValuet /• priatf("\nHex Vaiue;%d Bin Value.-%d",HexValue,BinValue); •/ Index •>« 11; for (i-0;i<l l;i++) ( BicData{—Index] » BinValue 8l 1; BinValue »- 1; J Index +-11; BicData(Index-H-] - ((RegionMap{RowOffset][ColOffset] + 2 - RegionMap[Ro wOf fset][CoIOf fset+11) % 3) & i; BinData{Index++] - ((RegionMap{RowOffsetIColOffset+2J + 2 - RegionMap[RowOffset][ColOffset+] ]) % 3j & i; •• return(13); }/* Full cells completed •/ CelUndex » 0; FixedHexes - 0; BitsConverted « 0; Weight«. 1; if (AvailableHexes »— 7) ( HexValue ■ 0; while (FixedHexes < 7) ( RawRow » RowOffittC + (2-CellIndex/3); RawCol - ColOffset + (CelIIndex%3); if (RegionMapfltawRswIRawCol] <- 2) { HexValue +- Weight*RegfonMap{RawRowIRawCol]; FixedHexes-H-; Weight •- 3; 75(a64) (followed by page 75(a65)) 260 1 r- ) Celllndex++; 1 BinValue » LUTHexBinlHexValuet t* printf("\nHex Value.-%d Bin Value:%d',HexValue.BinVaIue); */ Index +-11; for (i-0;i<l l;i++) C BinData[—Index] - BinValue St. 1; BinValue »- 1; ) Index +- 11; AvailableHexes — 7; BitsConverted >11; ) /•Convert 3 bits into hex pairs using LUTHB32 */ while (AvailableHexes >1) ( HexValue - 0; FixedHexes - 0; Weight - 1; while (FixedHexes < 2) { RawRow - RowOffset + (2-CellIndex/3); RawCol - ColOffset + (Celllndex%3); if (RegionMap{RawRowIRawCol] <» 2) ( HexValue - HexValue + Weight*RegionMap[RawRow][RawCol]; FixedHexes++; Weight •- 3; ) Celllndex++; ) BinValue - LUTHB23[HexValue); BinDataflsdex-H-] - (BinValue » 2) & 1; BinData(Index++] ■ (BinValue » 1) &. 1; BinData[Index++] - BinValue Sl 0x1; AvailableHexes — 2; BitsConverted +- 3; ) /•Covert the remaining hex, if at all •/ if (AvailableHexes — 1) ( FixedHexes » 0; while (FixedHexes < 1) ( RawRow « RowOffset + (2-CellIndex/3); RawCol - ColOffset + (Cclllndex%3); if (RegionMap{RawRowXRawCol] <- 2) ( 75(a65) (followed by page 75(a66)) 1 2 3 4 6 7 8 9 ?0 11 12 13 14 16 17 18 19 U 22 2 3 74 2 6 17 18 '?0 11 >2 )3 14 16 17 115 19 >0 II 12 '3 '4 ■5 •■7 •■8 •9 0 1 2 3 4 *6 0 173 BinData[lndex++] « RegionMap[RawRow]( RawCol] » 1; FixcdHcxes-H-; ) CeIUndex-H-; ) BiuConvcrted++; ) return (BiuConverted); ) 75(a66) (follcwed by page 7S(a67)) 1 2 3 4 6 7 8 9 W \i 12 u \4 i 5 16 17 18 '9 >0 U >2 ■3 \4 IS !d !7 18 •\9 i 0 ■1 i2 iJ i* 15 id i7 •18 19 '0 1 12 >3 '4 >5 'd 17 'a '9 ■0 1 2 J 4 2 6o'7? * - <■ TABLE 19 /* ErrDec.c Govind Shah /28/87 Program to decode for error correction Reads bit stream generated by RdLabel from file ERRDEC.IN; Output error corrected bitstream into TEXTOUT.IN.
For error decoding algorithm, RefiPage 16 - 26 of Lab book. •/ ♦include <io.h> ♦include <sys\ryp«s.h> ♦include <sys\stat.h> ♦include <fcntLh> ♦include <stdio.h> ♦include <stdlib.h> ♦include <timeJi> ♦include <conio.h> ♦include <\ups\code\gf.h> extern unsigned char Horner(unsigned char,unsigned char •,int,int); main() C unsigned char RawDataO[kInfoSymbolsO+2*ktO],RawDatal[kInfoSyinbolsl+2*ktl]; unsigned char •pCurrSym,Temp; int i.j.oFile.iFile.EiTCnt; FILE •jtream; unsigned char NoErrorsO.NoErrorsl; InitGFO; stream » fop«n(*ErrDec.In","rb"); pCurrSym - &RawDataO[kLabelSyins(M]; for (i-0;i<kLabelSymsO;i++) ( •pCurrSym - fgetc(stream); for G">U<6U++) •pCurrSym h ( fgetc(stream) « j); pCurrSym—; } pCunSym - &RawDatal[kLabelSymsl-l]; for (i-0;i<kLabelSyms 1 ;i++) ( •pCurrSym - fgetc(stream); for G-l*j<8*J++) •pCunSym ( fgetc(jtream) « j); pCurrSym—; ) fclose(stream); 75(a67) (follcwed by page 75(a68)) NoErrorsO - ErrDec(0,RawDataO); NoErrorjl » Err Dec( 1 ,Ra wDaia 1); printfC\oHPM errorx%d LPM Errors: %d',NoErTonO,NoErrorsl); oFiie - openCTcxtOutJn'.O WRONLY | 0_CREAT | 0_TRUNC | 0_BINARY^_IWRrrE); write(oFSle, &RawDataO(2*ktO],kInfoSyinboIsO); writefcFile, &RawDatal[2*ktl],kInfoSymbolsl); writc(oFile,<fcNoEnoreO, 1); write(oFile,&NoErron 1,1); closc(oFile); ) int ErrDec(Field,RiwData) unsigned char Field; unsigned char RawDalafl; { unsigned char *RawDataF,*SynP,*BP,*LamibdaP,*TP; unsigned char Delta,Delulnv>tlBrkcl+l],Larabda(ktl+l]tSyn[2*ki]+l],TXkt]+J]; int TwoT,i,L,rtMsgCount.SynNo; int nJ,£LPDegree,NoRoots; unsigned char Result,ErrLoc[klll,Oinega[2*ktI],ErrMaglErTNo; int Syalodex.LambdaJadex; if (Field — 0) ( t - ktO; n » knO; TwoT - 2*kt0; MsgCount ■ klnfoSymbolsO + TwoT; - ) else C t - ktl; n - knl; TwoT - 2*ktl; MsgCount - klnfoSymbolsl + TwoT; ) r V f* Compute the syndromes using Horner's rule •/ SynP - ASynflJ; for (SynNo - l;SynNo <- TwoT; SynNo++) { •SynP++ - Horner(Field,RawData1MsgCount,SynNo); RawDataP » RawData + MsgCount - 1; •SynP - 0; for (i-0;i<MsgCount;i++) •SynP - GFMulIndEle(Field,SynNo,*SynP) A •RawDataP—; 75(a68) (follcwed by page 75(a69)) 260 1 7 SynP++; )/* All (2t) syndromcs computed •/ printf("\n Syndromes :\n"); for (i-l;i<"TwoT;i++) printf (*%ie%i» \i,Synli]); r •/ I* Generate error locating polynomial •/ /* Initialir<! •/ LambdaP - Lambda; BP - B; TP -T; •LambdaP++ ■ 1; •BP++ - 1; •TP++ - 1; for (i-I;i<»t;i++) *LamWaP++ - *BP++ » 'TP++ - 0; L - 0; for (r-1 ;r<«*TwoT;r++) ( Delta - 0; /• Compute delta •/ for (i-0;i«"L;i++) Delta A- GFMuI(Field^yn[r-i],Umbda[i]); if (Delta — 0) ( for (i-t;l>0;i—)B[i] - B[i-1]; B[01 - 0; ) else { for (i"l;l<"t;i++) T[i] - Lambda[i] A G FMul(Field,Delta,B[i-1]); if (2*L < r) /• Shift register to be lengthened ? */ ( Deltalnv « GFInverse(FieldtDelta); for (i-0;i<-t;i++) ( B[i] - GFMul(Field,Deltalnv,Lambda[i]); Lambda[i] - T[i]; ) L ■ r - L; ) else /*shift register length OK */ ( for (i—t;i>0;i—) ( Bin - Bii-n Lambdali] - T[i]; ) BIO] - 0; 75(a69) (followed by page 75(a70)) 26 0 i Lambda[0] - 710]; ) } /* Display the state */ /* printf("\n\nr.%d Delta.-%d L:%d\r,Delta,L); printf("\n T:"); for (i-0;i<"t;l++) printf ("io3u VUl]); printf("\a B:'); for (i«0;i<»t^-H-) printf (*%3u ",B£i]); printfaLambda:"); for (i-0;i<-t;i++) printf C%3u \Lambda{i]); •/ )/* Error Locator Polynomial computed */ /* printf("\nLambda^); for (i-0;i<-t;i++) printf ("%3u ",Lambda(i]); •/ r v f* Compute the degree of the ELP */ ELPDegree - t; while ((Lambda[ELPDegree] -- 0) St& (ELPDegtee > 0)) ELPDegree—; /'printf(*\nELP ELPDegree:%d*,ELPDegree); •/ if (ELPDegree l- L) { /* printf("\nToo many errors (L - %d, ELP ELPDegree - %d)\L,ELPDegree); */ ELPDegree - t+1; J f* Find the ELP roots */ if ((ELPDegreoO) &&. (ELPDegree<-t)) ( NoRoots - 0; for (i-n;i>0;l—) ( /* Check if Alpha**! is a root of the ELP */ Result - 0; for G-ELPDegreeJ>-0J~) Result - GFMulIndEle(Field,i>Result) A Lambda[j]; if (Result 0) ErrLoc{NoRoots++] - n-i; if (Horner(Field,Lambda,ELPDegree+],i)~» 0) ErrLoc{NoRootJ++] - n-i; ) /*A11 location checked for being roots*/ f* printf("\n Detected %d roots*,NoRoots); •/ if (NoRoots — ELPDegree) for (j»0J<NoRoottJ++) ( f* RawData[ErrLoc(j]] " Oxde; 75(a70) (follcxjed by page 75(a71)) I 2 3 4 7 8 9 IJ 12 13 14 16 17 18 19 2J 22 23 24 26 27 28 '30 IJ 12 13 14 16 $8 19 to tl t2 13 t4 16 \7 t8 19 •'0 •I 12 <3 ■4 ■5 26 0 173 / printf (*%d ".ErrLoctf]); •/ ) else ELPDegree « t+1; ) /'Correctable error locations found •/ if (ELPDegree > t) return 99; /* Compute error magnitudes (ref. Lab Book Page 25) */ I* Compute Omega(x) •/ for (i-0;i<TwoTp++) { Omegafi]« 0; Synlndex - i+1; Lambdalndex - 0; while ((Synlndex > 0) && (Lambdalndex <- ELPDegree)) Omega(i] A» CFMul(Field,Syn(SynIndf.x—],Lambda{LarnbdaIndex++]); ) /•printf("\nOmega;"); for (i-0;i<TwoT;i-H-) printf (*%3u *,Omega{i]); V /* Compute Derivative of Lambda, and save in Lambda •/ for (i-0;i<ELPDegree;i++) ( L*mbda[i] - Lambda[i+]fc Lambda(++i] - 0; ) /•printf("\nLambda;"); for (i-0;i<t;i++) printf ("%3u \Lambda(i]); •/ J* Compute the error magnitudes using Omega(XlA-l)/Lambda(XlA-l) •/ for (ErrNo«Q;ErTNo<ELPDegree;ErrNo++) ( ErrMag ■ GFDiv(Field,(i-Horner(FieId,Omega,TwoTtn - ErrLoc[ErrNo])), (j-Horner(Field,Lambda,ELPDegree.n ErrLocfErrNo]))); RawData(ErrLoc[ErrNo]] A- ErrMag; printf("\nErrNo:%d Loc%d Mag:%02^X Omega(Xl-l):%d Lambda(Xl-l):%d\ ErTNo,ErrLoc£ErrNo],ErrMag,iJ); ) return (ELPDegree); ) 75 (a71) (follcwed by page 75(a72)) 26 0 1 TABLE 20 ; Static Name Aliases % TITLE horner ; NAME horner.c ; Optimized Govind Shah I 10/9/87 ,286c .287 _TEXT SEGMENT BYTE PUBLIC'CODE* _TEXT ENDS JDATA SEGMENT WORD PUBLIC'DATA' JDATA ENDS CONST SEGMENT WORD PUBLIC'CONST CONST ENDS _BSSSEGMENT WORD PUBLIC •BSS* _BSSENDS DGROUP GROUP CONST, _BSS, _DATA ASSUME CS: _TEXT, DS: DGROUP, SS: DGROUP, ES: DGROUP EXTRN chks tic NEAR EXTRN _IToE0:BYTE EXTRN _IToEl:BYTE EXTRN _EToI0:BYTE EXTRN _EToll:BYTE _TEXT SEGMENT ; Line 10 PUBLIC _Horner _Horner PROC NEAR push bp mov bp,sp mov ax,6 call chkstk push di push si ; Line 14 ; Field - 4 ; RawDataP - 6 ; Count - 8 ; Index - 10 ; Result - -2 ;-•••• register si - i register cx - i ;+•••• register si - Result ; register di - RawPtr ; Line 19 mov di^bp+8] ;Count add di^bp+6] ;RawDataP dec di sub si,si mov cxJbp+8] ;Load count cmp cx,0 je SHORT SFB153 mov di,[bp+6] ;rawDataP 75(a72) (followed by page 75(a73)) 1 2 3 4 K 8 9 11 12 13 14 16 17 18 19 21 22 23 24 26 27 28 £9 f° 31 32 33 34 36 37 w9 Wi0 41 42 13 i4 t5 t6 t7 <8 <9 0 1 2 3 4 260 173 add di.cx dec di ; Line 20 ; mov WORD PTR [bp-2],0;Result ; Line 21 cmp BYTE PTR [bjH-q.O ;Field jne $1143 ; Line 22 • ; sub si,si SF144: ; cmp [bp+S],si ;Count ; jle SFB153 ; Line 23 ; Line 24 ; cmp WORD PTR [bp-2],0;Result cmp si,0 je $1148 ; Line 25 ' ;—•••• mov bx,(bp-2] ;Result mov bl.BYTE PTR EToIO[bx] ;++•♦•• mov bl.BYTE PTR _EToIO[si] • sub bh.bh add bx,[bp+10] ;Index mov al.BYTE PTR __IToEO[bx] sub ah,ah dec di ; mov cljdi+l] ; sub ch.cb ; xor ax,cx mov bljdi+l] sub bh,bh xor ax.bx jmp SHORT SL2000i SI 148: dec di mov al,[di+l] sub ah,ah SL20001: mov [bp-2],ax ;Result mov si.ax ; Line 27 75(a73) (followed by page 75(a74)) J 2 3 4 7 8 9 'J f 2 '5 '5 '5 '7 '5 '9 '■] 12 :5 :•/ !5 ■6 •7 •8 •9 m 2 3 4 6 7 ,8 m inc si jmp SHORT SF144 loop SHORT SF144 jmp SHORT SFB153 51143: Line 29 sub si,si SF151: cmp [bp+8],si ;Count jle SFB153 Line 30 Line 31 --•••• cmp WORD PTR [bp-2].0;Result cmp si,0 je $1153 Line 32 mov bx,[bp-2] -.Result --••• mov bl.BYTE PTR _EToIl[bx] mov bl.BYTE PTR _EToIl[s«l sub bh.bh add bxjbp+10] ;Index mov al.BYTE PTR _JToEl[bx] sub ah,ah dec di mov cljdi+l] sub ch.ch xor ax.cx mov bljdi+l] sub bh.bh xor ax.bx jmp SHORT JL20002 SI 155: dec di mov aljdi+l] sub ah,ah JL20002. ;—•••• mov [bp-2],ax ;Result mov si,ax Line 34 inc si 75(a74) 2 6 0 1?* (follcwed by page 75(a75)) 1 2 3 4 m 7 8 9 IJ 12 • J 14 16 17 18 19 !0 >J •2 !3 \4 IS >6 !7 >8 m u 12 13 14 16 17 m to 'J '2 <3 14 • S 6 7 8 9 0 1 2 3 4 26Q ; jmp SHORT SF151 loop SHORT 5F151 5FB153: ; Line 35 ;—•••* mov axJbp-2] ;Result mov ax,si ;Result pop ti pop di leave ret _Horner ENDP _TEXT ENDS END *Z 75(a75) (follcwed by page 75(a76)) 1 2 3 4 7 8 9 11 12 13 14 IS 16 17 18 19 21 22 23 24 26 27 28 fo 31 32 33 34 36 37 i\ 40 41 42 43 44 45 46 47 48 i9 50 Si n >3 U >5 2 6 0 / TABLE 21 [* Filename; TEXTOUT.C * Author; Donald G. Chandler, PA Technology * Date: October 17, 1987 * Purpose: Unpacks the decoded label text for user display * Modifications after November 15 release: •/ ♦include <conioJh> #include <stdio.h> ♦include <ctype.h» ♦include <mathJ» ♦include <fcntlJ» ♦include <sys\rypes.h> ♦include <sys\stat.h> ♦include <ioJ» ♦define LPSYMS 70 ♦define HPCOPY 5 #define LPCHARS (((LPSYMS-HPCOPY)*8)/6) main() ( int file; int i; int charcnt; char c; double zip; static unsigned char lpinfo[LPCHARS + 3£ sutic unsigned char hpinfo[6); sutic unsigned char lppack[LPSYMS]; sutic unsigned char errcnts(2]; /* read in the file */ file - openftextouUn\0_RDONLY | 0_BINARY); read(file,hpinfo,6); read(file,lppuck,LPSYMS); read(fUe,errcnts,2); separateO; j* recreate the zip code and clas3 of service •/ zip » 0^ for (i - 5; i >« 0; i—) zip - (zip * 64.) + hpiofo{i£ printf(*VnHigh Priority Message results^); if (errcnts[0] — 99) printf(*\nAn uncorrectable number of errors occurred in the HPM dau"); else printf("\n96d symbol error($) were corrected in the HPM data*. 75(a76) (followed by page 75(a77)) errcnts{0]); {* spilt zip and class of service and print •/ dozip(zip); separateQ; printf(*\nLow Priority Message results;"); if (erTcnt5[ll — 99) printf("\nAn uncorrectable number of errors occuned ia the LPM data"); eke printf("\n%d symbol error(s) were corrected in the LPM data", erTcnts[l]); {* unpack the LPM characters */ charcnt ■ 0; for (i - 0; i < (LPCHARS + 3) / 4; i++) { lpinfo{charcnt] » (lppack{3 * i] » 2) & 0x3f; lpinfo(charcnt + IJ - ((lppack(3 * i] « 4) & 0x30) | ((lppack[3 * I + 1]» 4) & OxOf); lpiafo[cbarcnt + 2J - ((lppack[3 • i + I] « 2) & 0x3c) | ((lppack[3 • i + 2J » 6) & 0x3); lpinfo{cbarcnt + 3] - lppack{3 * i + 2] A 0x3f; charcnt +- 4; ) /* print the LPM characters */ printf("\n\n\x!b{] m"); for (i - 0; i < LPCHARS; i++) ( c - Ipinfofi]; if (c < 0x20) c +- 0x40; if (c — 0x5e) { putchax(13); putchar(10); ) else putchar(c); ) printf("\n\x 1 bfm"); /* handle the repeated HPM data in the LPM message */ separate(); printf("\nRepeated data in LPM is as follows:"); zip - 0; for (1 - LPSYMS - 1; i >- LPSYMS - HPCOPY; i—) zip - (zip * 256.) + IppackJiJ; dozlp(zip); separateQ; separateO ( printf( "\n 75(a77) •» (followed by page 75(a78)) 26o ; n t \ ) dozip(zip) double zip; ( double dcos; unsigned int cos; zip - 1000000000. • modf(zip / 1000000000.. & dcos); cos - dcos; cos +- 'A*; if (cos > *Z') cos ■ cos - *Z* + *0* - I; prinrf(*\n\nTbe zipcode is \x 1 b{ 1 m%09.1f\x 1 b{m",zip); printf(*\nThe Class of Service is \xl b(l m%c\x 1 b(m\n",cos); AZ 75(a78) (follcwed by page 76)

Claims (10)

  1. 2 6 0 1 7 $ 10 15 20 25 30 35 What we claim is: 1. An optically readable label for storing- encoded information comprising a multiplicity of information-encoded polygons having at least five aides, said polygons arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, said polygons having one of at least two different optical properties.
  2. 2. An article as recited in claim 1, wherein said array is a hexagonal array.
  3. 3. An article as recited in claim 2, wherein said hexagonal array has three axes spaced 60:degrees apart.
  4. 4. An article as recited in claim 1, wherein said polygons are substantially in the shape of regular hexagons.
  5. 5. An article as recited in claim 1, wherein said optical properties are the colors black, white and gray.
  6. 6. An article as recited in claim 1,- wherein said polygons are irregular polygons.
  7. 7. An article as recited in claims 1 or 2, further comprising a plurality o£ Concentric Rings occupying an area on said article separate from the area occupied by said information-encoded polygons, each Concentric Ring having one of at least two different optical properties in alternating sequence.
  8. 8. An article as recited in claim 7, wherein said Concentric Rings are centrally located on said article.
  9. 9. An optically readable label for storing encoded information comprising a multiplicity of information-encoded triangles, said triangles arranged with the geometric centers of adjacent triangles lying at the vertices of a predetermined two—dimensional array, and said triangles having one of at least two different optical properties.
  10. 10. An article as recited in claim 9, further comprising a plurality of Concentric Rings occupying an area on said article separate- from the area occupied by said information-encoded triangles, each Concentric Ring having one of at least two different optical properties in alternating sequence. - 76 - 26 0 11. An article as recited in claim 10, wherein said Concentric Rings are centrally located. 12. An optically readable label for storing encoded information comprising a multiplicity of information-encoded polygons, said polygons arranged with the geometric ce"hters of adjacent polygons lying at the vertices of a two-dimensional hexagonal array, and said polygons having.one of at least two different optical properties. 13. An article as recited in claim 12, wherein said polygons are substantially in the shape of regular hexagons. /14. An optically readable label for storing encoded information comprising a multiplicity of information-encoded polygons, said polygons arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, and said polygons having one of at least two different optical properties and said array having at least three equally-spaced axes. 15. An optically readable label for storing encoded information comprising a multiplicity of information-encoded polygons, said polygons partially contiguously arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, and said polygons having one of at least two different optical properties. 16. An optically readable label for storing encoded information comprising a multiplicity of information-encoded poly go.is, said polygons noncontiguously arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, and said polygons having one of at least two different optical properties. 17. An article as recited in claims 14, 15 or 16, wherein said polygons are regular polygons. 18. An article as recited in claims 14, 15 or 16, . wherein said polygons are irregular polygons. 19. An article as recited in claims 14, 15 or 16, further comprising a plurality of Concentric Rings occupying an - 77 - 9 fc 260173 area on said article'separate from the area occupied by said information-encoded polygons, each Concentric Ring having one of at least two different optical properties in alternating sequence. 20. An article as recited in claim 19, wherein said Concentric Rings are centrally located on said article. 21. An article as recited in claims IS or 16, wherein said array is a hexagonal array. 22. An article as recited in claim 21, wherein said hexagonal array has three axes spaced 60 degrees apart. + % m 23. A process for encoding information in an optically 5 readable label comprising a multiplicity of partially contiguously-arranged polygons defining a multiplicity of interstitial spaces among said polygons, said polygons arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, and said 10 polygons and said interstitial spaces having one of at least two different optical properties, comprising the steps of: (a) assigning one of at least two optical properties to each polygon to create a plurality of partially contiguously-arranged polygons having different optical proper- 15 ties; (b) encoding the information by ordering the polygons in a predetermined sequence; and (c) printing each polygon in its assigned optical property. 20 24. A process as recited in claim 23, further compris ing the steps of: (d) assigning a plurality of dots» in a dot matrix to define the optical property of each polygon; and (e) printing said plurality of dots. 25 25. A process for encoding information in an optically readable label comprising a multiplicity of contiguously-arranged polygons, said polygons arranged with the geometric centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, said polygons having one of at least two dif-30 ferent optical properties, comprising the steps of: (a) assigning one of at least two optical properties to each polygon to create a plurality of contiguously-arranged polygons having different optical properties; (b) encoding the information by ordering the poly-35 gons in a predetermined sequence; and - - 79 - 260173 (c) printing sach polygon in its assigned optical property. 26. A process as recited in claim 25 further comprising the steps of: 5' (d) assigning a plurality of dots in a dot matrix to define the optical property of each polygon; and .(e) printing said plurality of dots. 27. a process for encoding information in an optically reai-'-ble label comprising a multiplicity of noncontiguously- 10 arranged polygons defining a multiplicity of interstitial spaces among said polygons, said polygons arranged with the geometric v \ centers of adjacent polygons lying at the vertices of a predetermined two-dimensional array, and said polygons and said interstitial spaces having one of at least two .different optical proper-15 ties, comprising the steps of; (a) assigning one of at least two optical properties to each polygon to create a plurality of noncontiguously-arranged polygons having different optical properties; (b) encoding the information by ordering the poly-20 gons in a predetermined sequence; and (c) printing each polygon in its assigned optical property. 28. A process as recited in claim 27 further comprise ing the steps of: 25 (d) assigning a plurality of dots in a dot matrix to define the optical property of each polygon; and - (e) printing said plurality of dots. 29. A process as recited in claims %23, 25 or 21, wherein step (b) includes the step of mapping groups of two or 30 more polygons in predetermined geographical areas on said article. 30. a process as recited in claim y29, further comprising the steps of dividing the information being encoded into at least two categories of higher and lower priorities, and encoding said higher and lower priority information in separate, predeter- 35 mined geographical areas. IN |N. -so - * on is® ,t-1 v 2601 31. A process as recited in claim 30,further comprising the step of separately applying error detection information to said higher and lower priority information. 32. A process as recited in claims 23/ 25 or 21, fur-5 ther comprising the step of encoding a plurality of selected polygons with error detection information and interposing said error-detection-encoded polygons among said polygons. 33. A process as recited in claim :31 further comprising the step of utilizing said error detection information to 10 correct errors in the information retrieved from said article. 34. a process as recited in claim 32 therein said error detection information may be utilized to correct errors in the information retrieved from said article. 35. a. process as recited in claims 23, 25 Or 21,fur" 15 ther comprising the step of structuring said encoding step to optimize the number of polygons having different optical properties. - 81 - 260 10 IS 36. An optically readable label for storing encoded information comprising a multiplicity of information-encoded hexagons contiguously arranged in a honeycomb pattern, each hexagon having one of at least two different optical properties. 37. An article as recited in Claim 36 wherein said optical properties are the colors black, white and gray. 38. An article as recited in Claim.36 wherein more important information is encoded in hexagons proximate the center of said article. 39. An article as recited in Claim,35 wherein the information encoded in said hexagons includes at least a first and second message area and said first message area is located farther from the periphery of said article than said second message area. 40. An article as recited in Claim 33 wherein said information-encoded 'hexagons are encoded with message information and error detection information, thereby allowing errors in the message information retrieved from said article to be detected. 41- An article as recited in Claim40 ' wherein said error detection information may be utilized to correct errors in the message information retrieved from said article. 42. An article as recited in Claim-";3g further comprising a plurality of Concentric Rings occupying an area on said article separate from the area occupied by said information-encoded hexagons, each Concentric Ring having one of at least two different optical properties in alternating sequence. 30 ' 43. An article as recited in Claim 42 wherein said Concentric Rings are centrally located on said article. 20 25 - 82 - t l~ 0 -.F'.VBJ 260173 t 44. An article as recited in Claim '43 wherein said contiguous information-encoded hexagons are arranged in up to about fifty rows and up to about fifty columns' within an area of up to about one square inch. 5 45. An article as recited in Claim !43 wherein said contiguous information-encoded hexagons are arranged in up to about thirty-three rows and up to about thirty columns within an area of up to about one square inch and wherein said Concentric Rings occupy less than about ten percent of the area 10 of said article. 46. An article as recited in Claim 42 wherein the information encoded in said hexagons includes at least a first and second message area and said first message area is located farther from the periphery of said article than said second 15 message area. 47. An article as recited in Claim 42° wherein the Concentric Rings occupy less than about twenty-five percent of the area of said article. 48. An article as recited in Cl&im 42 therein more 20 important information is encoded in hexagons proximate to the center of said article. 49. An article as recited in Claim 42 wherein said optical properties of said hexagons are the colors black, white and gray. 25 50. ^n article as recited in Claim--49 wherein the optical properties of said Concentric Rings are the same as two of'the two or more optical properties of said hexagons. 51. An article as recited in Claim >50 wherein the optical properties of said Concentric Rings are alternately 30 black and white. - 83 - 260173 t 52. An optically readable l(.bel for storing encoded information comprising a multiplicitv of contiguously arranged, information-encoded polygons other than squares or rectangles, each polygon having ona of at les»dt two different optical prop- 5 erties. 53. An article as recited in Claim 52 further comprising .a plurality of Concentric' Kings on said article, each Concentric Ring alternately having one of at least cwo different optical properties. 10 54^ An article as recited in Claim 53 wherein said Concentric Rings are centrally located on said article. 55. A process for encoding information in an optically-readable label comprising a multiplicity of information-encoded hexagons contiguously arranged in a honeycomb pattern, each hexa- 15 gon having one of at least two optical properties, comprising the steps of: (a) assigning one of at least two optical properties to each hexagon to create a plurality of contiguous hexagons having different optical properties; 20 (b) encoding the information by ordering the hexagons in a predetermined sequence; and (c) printing each hexagon in its assigned optical property. 56. A process as recited in Claim 55 further com- 25 prising the steps of: (d) assigning a plurality of dots in a dot matrix to define the optical property of each hexagon; and (e) printing said plurality of dots. 57. A process as recited in Claim 55 wherein step 30 (b) includes the step of mapping groups of two or more contiguous hexagons in predetermined geographical areas on said article. - 84 - 260 58. A process as recited in Claim gg vherein step (b) includes the step of mapping groups of two or more contiguous hexagons in predetermined geographical areas on said article. 5 59. A process as recited in Claims-57 or 58 further comprising the steps of dividing the information being encoded into at least two categories of higher and lower priorities, and encoding said higher and lower priority information in separate, predetermined geographical areas. 10 60.. A process as recited in Claim 55 further com prising the step of encoding a plurality of selected hexagons with error detection information and interposing said error detection encoded hexagons among said hexagons 61. A process as recited in Claim 59 further com-15 prising the step of encoding a plurality of selected hexagons with error detection information and interposing said error detection- encoded hexagons among said hexagons. 62- a process as recited in Claim 61 wherein separate encoded error detection information is separately applied 20 to said higher and lower priority information. 63. "A process as recited in Claim 60 wherein said encoded error detection information may be utilized to correct errors in tile information 'retrieved from said article. 64. A process as recited in Claim 62 whertin said 25 error detection information may be utilized to correct errors in the information retrieved from said article. 65. A process as recited in Claims 55 33; 55 wherein said encoding step is structured to optimize the number of contiguous hexagons having different optical properties. 77'-? o .K.'- ' - 85 - 260173 66. A label produced by the process of any one of claims 23 to 35 or 55 to 65. described with reference to any one of figures 1 to 4 or 11 to 20 of the accompanying drawings. • 68. A process for encoding an optically readable label substantially as hereinbefore described with reference to the accompanying drawings. 67. A label substantially as hereinbefore UNITED PARCEL SERVICE OF AMERICA, By their Attorneys BALDt - 86 -
NZ260173A 1988-04-08 1989-04-06 Optically readable label with information encoded polygons: optical and computer system for decoding NZ260173A (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US07/178,600 US4874936A (en) 1988-04-08 1988-04-08 Hexagonal, information encoding article, process and system
US07/330,111 US4896029A (en) 1988-04-08 1989-03-31 Polygonal information encoding article, process and system
NZ228634A NZ228634A (en) 1988-04-08 1989-04-06 Decoding digital signals representing elctro-optically sensed image of encoded labels

Publications (1)

Publication Number Publication Date
NZ260173A true NZ260173A (en) 1996-11-26

Family

ID=27353602

Family Applications (2)

Application Number Title Priority Date Filing Date
NZ260173A NZ260173A (en) 1988-04-08 1989-04-06 Optically readable label with information encoded polygons: optical and computer system for decoding
NZ241291A NZ241291A (en) 1988-04-08 1989-04-06 Optically encoded label with array of polygons: encoding and decoding

Family Applications After (1)

Application Number Title Priority Date Filing Date
NZ241291A NZ241291A (en) 1988-04-08 1989-04-06 Optically encoded label with array of polygons: encoding and decoding

Country Status (1)

Country Link
NZ (2) NZ260173A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10157301B2 (en) 2014-04-28 2018-12-18 Gelliner Limited Encoded cells and cell arrays

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10157301B2 (en) 2014-04-28 2018-12-18 Gelliner Limited Encoded cells and cell arrays

Also Published As

Publication number Publication date
NZ241291A (en) 1996-11-26

Similar Documents

Publication Publication Date Title
US4874936A (en) Hexagonal, information encoding article, process and system
US4896029A (en) Polygonal information encoding article, process and system
US4998010A (en) Polygonal information encoding article, process and system
US5223701A (en) System method and apparatus using multiple resolution machine readable symbols
JP3023986B2 (en) Low resolution target acquisition device
US6267296B1 (en) Two-dimensional code and method of optically reading the same
US6604682B2 (en) Method of and apparatus for reading a two-dimensional bar code symbol and data storage medium
EP0484132A2 (en) Multiple resolution machine readable symbols
KR890002473B1 (en) Character discirminating method
NZ260173A (en) Optically readable label with information encoded polygons: optical and computer system for decoding
LV10820B (en) Polygonal information encouding article,process and system
DK175743B1 (en) Polygonal information encoding article, process and system - optically scans data array of information encoded polygons to retrieve information
IE80888B1 (en) Polygonal information encoding article

Legal Events

Date Code Title Description
RENW Renewal (renewal fees accepted)