NZ241291A - Optically encoded label with array of polygons: encoding and decoding - Google Patents

Optically encoded label with array of polygons: encoding and decoding

Info

Publication number
NZ241291A
NZ241291A NZ241291A NZ24129189A NZ241291A NZ 241291 A NZ241291 A NZ 241291A NZ 241291 A NZ241291 A NZ 241291A NZ 24129189 A NZ24129189 A NZ 24129189A NZ 241291 A NZ241291 A NZ 241291A
Authority
NZ
New Zealand
Prior art keywords
label
polygons
hexagons
int
page
Prior art date
Application number
NZ241291A
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 NZ241291A publication Critical patent/NZ241291A/en

Links

Landscapes

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

Description

* * I — | Priority Date(s):...S|.Hl.0 3.1J.3.I&1 i * * | >'~,o!ete Specification Fifed: 1 (6) G-oU ici ha Publication Datet ... r,.0. Joum&No; /.{&!.£?.
• ••••Jp*ML*»••••• •••••«« •»«•••« - J,lbI'cation DaterJr>lJ ^ J396. ' lh U9A URttef th« provisions ot (■■on 23 (1) ths ......Cffliapltiifii , ir M1, Speclftcfition has been anSe-daJwf »• If 83 >HHW # J±Z- PATENT OFPI.-P Patents Form No. 5 I 75JAN 1992 NEW ZEALAND ■HECEiven PATENTS ACT 195 3 COMPLETE SPECIFICATION POLYGONAL INFORMATION ENCODING ARTICLE/ PROCESS AND SYSTEM X/We, UNITED PARCEL SERVICE OF AMERICA, INC./ of 51 Weaver Street/ Uot&chanqe. of addres?reen»lch offioe park 5' Green»ich' Connecticut 06831, d.s.a. - A corporation organised and existing under the laws of Delaware %Soo Perir^efer Centre Te«vacGS Nor+K AVIoa^united states of America C^o>rc\a 5o3uip,usp . hereby declare the invention, for which %/we '.pcay that a patent may be granted to m)i/us, and the method by which it is to be performed, to be particularly described in and by the following statement: (followed by page la) 2J42-t)y-2BJ ABSTRACT Qg 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. h 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 decided bit stream.
A system for performing the foregoing encoding and decoding processes. 2 4 1 -la- 2342-89-283 241 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. Hie 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 narked 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 incre'asing 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 2342-89-203 241291 « 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 in-5 herent 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 10 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 fhctor in large volume operations.
Alternatives to bar codes include* circular formats 15 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,<971,917 and 3,916,160; grids of rows and columns of data-encoded squares or rectangles, such as in U.S. Patent No. 4,286,146; microscopic 20 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 suf-25 fer 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 30 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 35 labels are affixed, and the need to utilize a small. Inexpensive, 2342-89-283 24 1 291 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 5 acquiring the label image. Furthermore, once acquired or identified, the label image must 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 signal-10 ing 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 15 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 symbols comprising concentric circles as iden-20 tification and position indicators, which symbols are affixed to articles to be optically scanned. However, these systems employ two separate 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 reduc-25 ing 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 recovefc- information from the data field. Zn the latter system, separate position and orientation markings are utilized at opposite 30 ends of data tracks having data-encoded linear markings of only limited data carrying capability.
The 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 35 data array and position and orientation symbols. The video out- 2342-89-283 14 1191 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 the digitized signal output of the optical.sensor vith a predetermined bit sequence representing both the position and orientation symbols, la 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 discloaes 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. This 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,486,679. Systems of the type described in U.S. Patent No. 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, 24 1 2 2342-89-203 as might be found with a package being transported on a conveyor belt or the like. Thus, 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 code 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 Mo. 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. (followed by page 6a) j fc- a farther 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 label a multiplicity of 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 -.i \ -6 a- (followed by page 6b) 241291 (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 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; and (h) transmitting a digital bit stream output from said computer representing the decoded hexagons. -6b- (followed by page 6c) 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) means for illuminating a predetermined area; (b) means for optically imaging said predetermined illuminated area through which said labal 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 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 two-dimensional array, and said polygons having one of at least two different optical properties. 24 FvlAR 10S4 \ ' c - 241291 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.
T>.mirrro»" f~" nzT-'-^r£F!C€ | \ 2/; r/IAR 1954 - 6d - 241291 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 nonoontiguously or partially continguously 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; (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 comprising a multiplicity of nanccntiguously ar 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 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- 24128 1 (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 ofi (a) printing on a label a multiplicity of nonccaitiouously or 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 from 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 - lk\l^ 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 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) 24 1 2 (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 t< 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 information-encoded polygons arranged contiguously, partially contiguously or noncontiguously 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 241291 Optically readable labels of the invention may comprise predetermined two-dimensional geometric arrays of polygons where the geometric centers of such polygons lie at the vertices of the intersecting axes as more fully discussed below of a predetermined 5 two- dimensional array and where the polygons have one of at least two different optical properties. The polygons of such optically readable labels may be regular or irregular polygons and the two-dimensional arrays of polygons on the optically readable labels may have two or more equally- or unequally-angularly spaced axes lO 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 a multiplicity of interstitial spaces on the 15 optically readable label between adjacent polygons. Sucji 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 flva 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 ouch 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 8 2342-89-2B3 241291 and columns .and a centrally-located acquisition target having a geometric' center which defines the geometric center of the data array. 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 preeise matching of the frequencies and consequent determination of the location 15 of the datb 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 35 optical sensor is used with the system of this invention, hundreds 2342-89-283 241291 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 cora-10 plexity 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 15 cluster of"contiguous hexagons, each hexagon having one of at least two optical propertiesalthough 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 20 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 30 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 mes-35 sage from damage which is more likely to occur to the peripheral - 2342-89-283 241291 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 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 24 12 9 1 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 ares (1) Filtering the non-linear transformed version of the digitized 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 become 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 2342-89-283 241291 \ 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 now be described by way of exanple with reference to the acxxOTpanying drawings wherein: FIG. 1 is a plan view of an acquisition target of concentric rings in accordance with the present invention.
FIG. 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.
-FIG. 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.
FIG. 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 la a schematic view of • 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 24 1 2 9 1 FIG. 9' is 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.
FIG-. 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 plan view of an optically readable label having contiguous polyeons 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 is 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. 2342-89-283 24 12 91 FIO. 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.
FIG. 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.
FIG. 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 I of a rectangular array. -15 2342-89-283 241291 THE LABEL The ability to encode information by virtue of the contrasting colors of contiguous hexagons or "cells1' 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 "road" 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 l.ying at the vertices of a predetermined two-dimensional array and with the borders of such polygons touching the borders of Immediately adjacent polygons, leaving no interstitial spaces. "Partially contiguous polygons" are polygons arranged with the geometric centers of adjacent polygons lying at the vertices of a 16- 2342-89-283 24 1291 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 5 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 polygonal cells 10 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 25 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 2o more densely packed than other polygons. For example, at a given resolution, the comers 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 apace between adjacent circles would .be wasted and would 25 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 polygons Including, octagcns, squares, triangles and the like. Squares and triangles are problems because of the 30 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 axis of a hexagon \ 2342-89-283 • 24 1291 grid facilitates t*\e 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 prod-5 uct, 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 15 "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 "honey-20 comb 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 25 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 hexa-30 gonal cells in black and whits, 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 term "print" or "printed." As used herein, "optical properties" means light ab-35 sorption, reflection and/or refraction properties of cells 23-12-89-283 24 1291 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 is the case in the preferred embodiment of the invention, the invention is said to have 5 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 tha smallest radius "r" of the rings. 10 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 15 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 20 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 (thfting into account the fact that, in the preferred embodiment, 25 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 30 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 "C" in a square perimeter bounding a honeycomb pattern of hexagons, due to the geometric packing of the contiguous hexagons. 2342-89-283 241291 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 5 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 border 32 and 34 of the label, as depicted in 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 15 colors may be utilized. It is possible to use only two contrasting colors, such as white 25, and black 26 as seen in Fig. 2. In the preferred embodiment of the invention, three contrasting colors are utilized, white 25, and 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 30 having a controlled optical property background for one of the contrasting colors, it is preferable to use a discrete label, because the color of the label background is more easily controlled.
The alignment of the hexagons printed on the label in 35 relation to the sides of the label is important for subsequently 2342-89-283 24 1 2 91 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 adjacfent 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 2342-89-283 24 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 tha 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 46, and the white rings are resp«ctively 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 24 1 2 specific filter created and utilized in connection with the preferred embodiment of the invention may be found in the Microfiche Appendix, page 75(a41), lines 51 to 52'page 75(a42), Unas 1 to 8 and page 75(a40), Hnpa 19 to 41 uncter +he file name "nND.C." The acquisition target may be 6f 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 is 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 false readings from "spurious" marks on tha 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, -23 2342-89-283 2 A 1 2 91 although a spiral is not a collection of concentric circles, da-pending 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 5 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 10 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.
Ab used herein, "Concentric Rings" is intended to em-15 brace complete rings, partial rings in the form of semi-circles, sectors of concentric rings occupying between 160 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" 20 of information may be encoded in each hexagon (log 23).
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-25 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 en-30 coding 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 35 is incomplete by having unusable hexagons. In a one inch square 2342-89-283 2412 91 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 5 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 10 in cluster 60 by encoding 11 bits onto the remaining seven hexagons. Since mapping 7 hexagons provides more possible combinations than are utilized (i.e.. 3T=2187 combinations vs. 2>ts2048 combinations), some combinations are rejected as, for example, all black, all gray, all white or substantially all black, gray 15 or white combinations. The reasons for requiring contrasting color8 of hexagons 62 and 64, compared to hexagon 66 are 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 I 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. 25 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 embodiment utilizes 30 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-09-283 241291 theoretical 1.585 bits per hexagon because of the other constraints of the encoding algorithm, since all 3T patterns are not used, and some of the least optically desirable cellrto-cell transitions are eliminated.
For reasons described below, in the preferred embodiment of the invention, it is 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 a high degree of data integrity iu 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 advantages 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. As with hexagon-containing labels, labels printed with other polygonal encoding cells may be "read" with scanning equipment of less complexity when only two optical properties are utilized to encode information in the polygonal calls, in particular the colors black and white, because of the maximum contrast that ia 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 the border of the optically readable label' or that result from partial obliteration by the acquisition target, comprising a series of concentric rings are not used to encode information.
A "honeycomb pattern" comprises an- array of contiguously-arranged hexagons 310, the geometric centers 311 of which likewise lie at the vertices 311A of a "hexagonal 24 °*1 2 91 "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 con-5 figuration, 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, an for instance, if the hexagons are stretched along two parallel sides 321, 322, the geometric centers 325 of adja-10 cent 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 1■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 20 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 25 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 30 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 24 1 2 91 identify the major axis of the optically readable label. The major axis 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 spaces 332 of the Fig. 13 label em-15 bodlraent may or may not be printed with a different optical property than tha 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, HI the interstitial spaces dispersed among polygons are 20 of a difforent optical property than the adjacent polygons, more transitions between the optical 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. -28 2342-89-283 2412 9 t Tha Fig. 13 label utilizes polygons substantially in the form of hexagons. Because they so closely approximate a 5 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 10 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 15 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 20 would appear to be hexagons.
Fig. 15 is a blowup of a label as it would appear if printed with & 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 25 such a dot matrix printer, because of the pixel density of the 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 . 30 certain printers, of the printing process for labels containing hexagonal cells or result from deliberate efforts to print such polygons 2342-89-283 24 1 2 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 this 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 NR,n 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 axee 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-arranged polygons can also be utilized to create an optically readable label in accordance with the 2342-89-283 241291 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 5 A3. It is apparent that tha 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 10 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 15 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 center*. 442 of adjacent pentagons 440 lying along the three equally-spaced axes 20 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 25 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 30 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 multi-35 plicity of interstitial spaces 461 among said octagons 460. The centers 462 of adjacent octagons 460 are located at the vertices 2342-89-283 / & "i ^ Q ii 1 Cm « I 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 axetj 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 15 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 -32 2342-89-283 £ 4 12 91 protection applied thereto, without creating an excessively large size lab^l. It is desirable to have a one square inch label, to reduce the paper and other costs associated witli the-printing, shipping and handling of such labels. Conventional bar code 5 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 10 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 15 spirit and scope of this, invention.
Although "clustering" of hexagons in 3 cell x 3 cell clusters has been described, other patterns of clusters may be used or clustering may be omitted entirely and the encoding algorithm may be directed specifically to an individual hexagon pat-20 tern. 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 inven tion, 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. 30 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 inven-35 tion is not restricted to two different menages or levels of 33- 2342-89-283 2 4 priority. Many messages and levels of priority may be created within the quantitative limits of a label of given sire 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. Nine 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 2ip 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. 34- 2342-89-283 24 1291 Because It is 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 capabili-5 ties, 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 com-10 puter, 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 15 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 raassage suitably encoded in the hexagons of the label.
It is not essential to the invention that a high priority message 20 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 is also printed with a centrally-located acquisition target comprising a plurality of concentric rings of two alternating 25 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 30 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 * 35 "TEXTIN.C" which may be found in the Microfiche Appendix, page75(al), 2342-89-283 lines 8 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).
* Alterhatively, the process may begin with the informa tion to be encoded already contained in a binary bit stream, because, for example, it was received from a storage medium or otherwise created. Therefor*, the message to be encoded can exist, in a form which is manually (with electronic assistance) converted 10 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 hexa-15 gon 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 20 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's. This Indicates that these haxagons do not contain blt-mapp«d information. This is because the exterior X's represent partial 25 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 tha acquisition target or Incomplete hexagons around the perimeter of the acquisition target, so that these interior hexagons indicated by X's are 30 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 Bpaces will be occupied by a black (B), white (H) or gray (G) hexagon. As noted above, although various clustering and mapping techniques can be 35 utilized, the application of this invention may use clusters of 9 24 1 291 2342-89-283 24 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 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 will contain a cluster of either 7 or 8 hexagons because of the geometric packing of hexagons, and the number will alternate from •r row to row. Thus, 6 clusters containing 8 hexagons and 5 clusters containing 7 hexagons result from this arrangement. Also, the centrally located acquisition target creates additional incomplete 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 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 into the set of the first seven usable hexagons.
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 241291 Any remaining single hexagons are used to represent one bit.
Since mapping seven hexagons provides more combinations than eleven bits (i.e., 3T = 2187 vs. 211 = 2048), some combinations 5 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" 132 and "HEXBIN.tUT" 134 may be found in the Microfiche Appendix, page 75(a4), lines 3 to 52; page 75{a5) lines 1 to S3; 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 upon* (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 7S(a20), lines 1 to 53; page 75(a21), lines 1 to 53; and page 75(a22), lines 1 to 42.• 2342-89-283 24 1 2 91 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-dlgit zip code plus one additional alphanumeric character, which 10 may represent a shipping code. In this example, it would also be desirable to use 120 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, of 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 Ik I 2 91 As defined herein, tha step of "interposing error detection symbols" includes systematic and/or non-systematic coding systems.
Various systematic linear cyclic error protection codes 5 are known in the art, for example, BClf codes, Reed-Solomon codes and Bamming 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. 10 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 15 Wesley, 1983, at pages 174 and 175.
By way of example, some relevant Information about the Reed-Solomon code 1s set forth below. Specific characteristics of a Reed-Solomon coda can be specified by the following parameters: m = number of bits in each symbol n = number of symbols in the block =■ 2m-l k = number of message symbols (number of message bits = km) t = correction capability in number of symbols = (n - k)/2 A nine-digit zip code and single alphanumeric charac- 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 » 2° - 1 = 63 t = 10 Therefore, k = n - 2t = 43 Since only six 6-4>lt 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-89-283 24129 1 and need not be stored on the label. Thus, the total number of bits required on the label for the high-priority message is (63 -37) x 6 or 156 bits.
This error coding scheme will be able to correct a maxi-5 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 (8 bit symbols) n = 2® - 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-blt 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: 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-29? Ik 1 2 hexagons on the cluster map of Fig. 5. It will be appreciated that a wide variety of distribution patterns can ba utilized, recognizing that the important criteria to be determined aret (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), Hr*>g 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 in 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 messaget 1 + x* + x' * 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 page 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 + «Jt) where a is the primitive element of the Oalois 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-89-203 24 1291 # remainder obtained from performing a long division of by g(x).
The computation of the generator polynomials g(x) as well as the generator matrices for both the high priority and low S priority messages is implemented according to the auxiliary program "MKRSLUT.C" 125, which may be found 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 10 stored in the file "RS.LUT" 128.
In a preferred embodiment of the 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 satis-15 factory 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 20 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 used to print a three-color data 25 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 of a stored program "MKMAPS.C," 140 a regions look-up table "REGIONS.LOT" 141 of 34 rows x 30 columns was created, which is analogous to Fig. 5, but 30 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 300 x 35 300 pixels on the pixel grid to specific regions in the 2342-89-283 24 12 "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) through 75(a22).
The error protection encoded bit stream i.i 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.LUTn 151 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 7b(a27), lines lto3 . 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 utilized to assign values of O, 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 call 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 page 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), l?nes 1 to 53; page 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 ia used, in a 2342-89-283 2412 91 manner which is 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 3 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 ac-10 quisition target region, preferably of black and white concentric rings is formed at the geometric center of the label.
LABEL INTERPRETATION OR DECODING Having described how data is encoded in the label and 15 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 20 other manipulation or label reading) process takes 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 scanner: Alternatively, an electro-optical sensor, having 25 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 capabili-30 ties described herein with respect to a static fixed-focus scanner is adaptable to a dynamic scanning system with certain 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 35 speed of about 100 inches per second or more and passing below a -45 2342-89-283 24 12 91 fixed scanner location. The image processing function thus comprises the following steps. Fig. 7 provides an outline of the steps of the decoding process. l. mviminatlon of. the 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 aevoral 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 to 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 more 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, whito 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 ^J42-by-i!b3 9 241291 LED's could be used to produce an illumination level of about 10 raW/cm* in the label illumination area at the level of the label.
The LED's may be in an area array, without using a focusing lens, or a linear array, with a cylindrical focusing lens. A laser 5 light source, passed through a suitable optical system to provide a line source of illumination could also be used iri the practice of this invehtion.
The selection of the light source and the properties of the light source for the application in question are wit'iin the 10 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 15 labels properly in order to identify and locate the labels guite 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 portion of the decoding process is to optically sense the illuminated area with an 25 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 30 with a SO 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 NAVITRON"®. The camera was coupled to an image capture board designated model number DT-2803-60, available 35 from Data Translation Inc., 100 Locke Drive, Marlboro, Massachusetts 01752.
-J -u t E 4 1 £ 9 1 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 5 ("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 ia the Thomson-CSF TUX 31510 CDZ, 4096 element high speed linear CCD image sensor, available from Thomson-CSF, Division Tubes Electroniques, 38 rue Vautheir B.P. 10 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 15 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 20 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 licht sensor, to achieve consistently high image resolution. If an area sensor rather than a line sensor is used, the same prin-25 ciple would also apply. This may be accomplished by means of a long optical path as depicted in Fig. 6.
In order to be 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 30 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. 35 Fig. 6 is a schematic view of a camera focusing and adjusting system operable in accordance with the invention for 2312-89-283 24 1291 adjusting the position of tha 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 outpu,t is fed to microprocessor 204 which in turn actuates coil driver 202 to move coll 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-dlgltal 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 24 12 91 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 "5 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 10 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. Proceasing 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 20 label was originally encoded and bit-mapped may be used to decode the Information contained in the label. (a) Locating tha Target Center.
Prior to utilizing the above-described CCD television 25 camera and image capture board, aa outlined in Fig. 10, an initialization program "DTINZT.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 30 "DTGRAB.C" then causes the image capture board to digitize the scene Into a 240 row by 2S6 column image memory, with samples stored as 6 bit values right Justified in bytes. 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), 35 lines 1 to 22; and page 75(a34), lines 1 to 19. Two auxiliary programs 2342-89-283 24 "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 energyiin 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) thrcugfo 75{a43). Hew-ever, 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, 2342-89-283 241291 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. 5 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). 10 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 ia the expected ring frequency. The one-dlmenslonal digital, band-15 pass 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 in Fig. 3. The frequency was 300/16 line pairs per inch, yielding a normalized frequency, (where 400 line 20 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 linage shrinkage and therefore an Increased frequency. Stop bands from 15% below the frequency down to 0 and from 25% above the ring 25 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 30 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 tt)e 35 horizontal magnification of the image is 80 pixels per inch, every 24 fifth sample of the filter would be used (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 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 filter was squared and smoothed with a first order recursive lowpass filter, providing an exponential window of past, history. Whan the smoothing filter output exceeded a predetermined threshold, an optional two-dimensional filtering step was employed to verify 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 maximum two-dimensional correlation exceeds a predetermined threshold, then the final stage of two dimensional filtering, with the £ull 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 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 father elaboration of the filtering process employed in the illustrative example, reference should be made to the source code listings in the Microfiche Appendix, pages 39 through 42. tiJ4^-by-^8J ^-v 7 (b) Normalisation g£ Sensed Image 4 (291 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 vplue 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, mora sophisticated normalization procedures known in the art may be applied. (c) Rogcallng tho.Imaaa For subsequent computations, the stored replicated label image is rescaled to create an image with equal horizontal and 2342-89-283 2412 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 resceling 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-Dlmenslonal 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 entitled "CLOCK.C" 290, depicted on 7ig. 10, and found within the Microfiche Appendix at pages 75(a44), through 75(a51). 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 tha label, since the label may not be perfectly flat.
This is an important part of the process and its application is 55 2342-89-283 241291 not limited to hexagonal encoded labels. It may be applied to other processes for decoding an encoded label comprising a regular, two-dimeftsional 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" term is somewhat confusing to the non-expert, since It does not relate to timing. (l) Eflg» EnhancMiont Mid 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 IS 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 tha (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 be-20 tween 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 ry art, such as LaPlace or Sobel kernels, and then an absolute value 25 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 30 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 35 to determine the regions of pixels having a fixed color (the 2342-89-283 /, ■; } i I tm 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 color 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, 15 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 sensor* 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-203 24 long as the centers of tha polygonal encoding units lie at a predetermined spacing and direction on a two-dimensional, array.
In practice it has been foundthat 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. 15, 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 sensing system, as for example by increasing the number 241291 of samples par unit araa across tha 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. 5 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 10 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 known in relation to adjacent polygonal cells, the polygonal encoding cells may lie on 15 a predetermined array, other than a hexagonal array, and the polygons may be arranged contiguously, partially contiguously or even noncontiguously on the optically readable label.
As explained in greater detail below, the nonlinear mapping techniques,' specifically the standard deviation mapping 2o 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 anci interstitial spaces between polygons of like 25 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 embod iment of the present invention reduces the computations needed to generate the standard deviation map. 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 35 each pixel of the image with the sum of Itself and the pixels -V±Z-U 24 1 291 immediately to ita left and right. This requires two additions per pixel. Then, the same operation is performed on the new image, except the sum ia computed for pixels immediately above and below. This requires two more additions for a total of four.
S It can be shown that, at the end of 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 10 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. 20 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 pro-25 cedure utilized may be found within the source code listings contained in the Microfiche Appendix at page 75(a46), lines-6 to 22. (iii) Two-Dimensional Fast Fourier Transformation A two-dimensional Fast Fourier Transformation of the 30 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- . 35 ing, direction and intensity of the interfaces of contrasting -60 IJ42-89-283 24 1291 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 known. Thus, the regular spacing and directionality of the 5 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 10 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 15 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 20 the center point at the 0,0 coordinate of the transform plane t 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 25 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 30 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 35 connection with the illustrative embodiment of a static fixed 241291 focus system was the commercially-available subroutine R2DFFT from the 87 FFT-2 package from Microway, Inc. of Kingston, Massachusetts. (iv) Filtering the Image A filtering process is 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 10 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 15 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 points 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 corres-25 pond 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 missing 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 35 performing spatial bandpass filtering. The inner and outer radii \ 2342-89-283 24 1 291 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 5 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 10 tilting, causa 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 re-15 jecting 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 ?5 the three direc-20 tions 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 hex-25 agon. 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 re-30- main. 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. 2342-89-283 2A1291 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), »«« 26 to 53; page 75(a47), lines 1 to 52; page 75{a48), lines 1 to 52; and page 75(a49), lines 1 to 46.
The foregoing discussion of tha 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 10 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 de cided 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 20 be contiguous, partially contiguous or noncontiguous. Also, the geometric array upon which the geometric centers of the polygons will be arranged natds 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 25 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 30 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-89-283 241291 other than tha most prominent points corresponding to the axes of the predetermined 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 domain and the interstitial spaces if present. By eliminating such 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. (v) Inverse Fast Fourier Transformation 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 domain 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 Amis Potarmination 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 2342-S9-283 24 1 2 is 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 is arbitrarily chosen as the axis which runs parallel to two sides 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 outline 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 subroutine. Theicorrect 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 whetiher the recorded angle is in the correct direction or 180 degrees away from the correct direction. The source code 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(aS0), 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 three squares does not need to be determined. (f) Searching A stored program entitled "SEARCH.Cn 300, depicted on Fig. 10, combines the Transformed and regenerated hexagon center 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. The source code listings for "SEARCH.C" may be found within the -66 23 42 -8S-2 S3 24 1 2 Microfiche Appendix at page 75(a52) through 75(a60). Fcur inportant 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 OVAL stores the grey level value (0-63) at the center of each hexagon. The remaining arrays IVAL and JVAL store the tow and column 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 six 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. Thr 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? paae 75(a52)f 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 is found.
Then, the location of this starting point relative to the center of the label Is 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 locatipn can be determined without serious influence from warping or tilting. The measure of the -67 2342-89-283 rj ^ £ quality of a point in tha clock recovery pattern Is 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, 1VAL and JVAL. (ii) Main Search Loon 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, e.g. 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 is 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; cage 75(a54), lines 1 to 53; and page 75(a55), lines 1 to 55, is responsible for searching the neighbors of the best 2_<42-yy-283 24 1291 quality clock value found in the main' loop. Tha subroutine loops six times, once for «ach 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 5 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 po-10 sition of the neighbor's center in the clock recovery pattern is computed. At this point, a gradient search for the highest magnitude clock signal ia 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 15 neighbors checked to see if an even better value is found. This gradient search provides -> 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 25 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 bo used in the major axis orientation step.
It will be appreciated, however, that the algorithm could be appropriately modified to have tha 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 /i.e the axis of 35 the two-dimensional array that is parallel to two sides of a 69- 2342-89-283 241291 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 5 decoding process through appropriate modifications to the two-dimensional clock recovery procesa, the variety of label configurations disclosed and discussed herein can be easily accommodated by one of ordinary aklll in the art. It will be appreciated that the number of axes upon which the centers of the individual, 10 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 15 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 20 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 £5 that such minor adjustments to the search routine SEARCH.C 300 in tho 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 3° 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 deleted. An efficient implementation could use a data stnicture which keeps candidates in magnitude order as insert and delete operations are performed. One 35 such structure is called a priority queue (Reference: The Design 2342-89-283 24 12 and Analysis of Computer Algorithms, Aho, Hopcroft and Ullraan, (Addison Wesley, 1974)).. It is known that a linear search algorithm requires order n1 operations whereas an efficiently implemented priority queue using a balanced tree or heap structure 5 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 15 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 20 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) coarss Ccid Corrogtlon 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 30 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 Appendix performs the function of determining whether the label is off center. If 35 the label has been positioned correctly, the coordinates of the 2342-89-283 24 1 2 91 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 5 is closer than the hypothesised 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 15 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, tha bottom left and bottom right hexa-20 gone 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 25 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 re-30 tained. 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 35 higher rows with lower rows and higher columns with lower columns, then the results of slidings should be inverted as well. 2342-89-283 24 12 91 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 5 is this procedure which will make the results of the slide hypo-Q theses 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 10 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. pocodinq 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 28 reads the file Generated by the search program and genera4 »s a bit stream file with, in the 20 prefsrred 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 hexagons, and to aPPly decoding which is the inverse of the coding program.
The first step in the decoding process id to generate a 25 bit stream from the hexagon information,' using a hexagon-to-bit mapping process which is 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 30 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 35 is used, error correction on the bit stream generated by the -73 2342-89-283 24 12 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 proce<-dure utilized in the Illustrative example may be found in the Microfiche appendix at page 75(a67) through 75(a75)r and is designated as ERRDEC.C 164 on Fig. 9.
. Output 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 cause a system to perforce a package handling or manufacturing operation, for example, on th« object bearing the label. The invention allows these operations 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. 2342-89-283 241201 With reference to Fig. 9, to alternatively display the decoded message on a computer terminal, the'program TEXTOUT.C 105 may be employed. Program TEXTOtTT.C may be found within the Microfiche Appendix at pages 75(a76) through 75(a78). . 75- (followed by page 75(al)) J 2 3 4 6 7 8 9 11 12 13 14 IS 16 17 18 19 W U 12 U 14 75 16 17 i8 19 •r; n i33 34 36 37 38 39 40 <1 U2 « i4 *5 (6 (7 <8 <9 50 57 52 3 4 55 241291 MICROFICHE APPENDIX TABLES TABLE 1 f* Filename: TEXTIN.C * Author Donald G. Chandler, PA Technology * Date: October 16, 1987 * Purpose: Get user input for label » * Modifications after November IS release #include <conio.h» #include <stdi6.h> ^include <etype.h> #include <math.h> #include <fcnt1.h> #include <sys\types.h> #include <syj\stat.h> #include <io.b> #define LPSYMS 70 #define HPCOPY 5 #de(lne LPCHARS (((LPSYMS-HPCOPY)«8)/6) main() { int file; int i; int charcnt; char c; unsigned int cos; double dcos; double zip, Ipzip; static unsigned char lpinfoJLPCHARS 4 3J; static unsigned char hpinfo[6]; static unsigned char IppackfLPSYMS); static unsigned char erTcnts[2] - (0,0); (* get zip code •/ getzlp: printf(*\nEnter the ZIP CODE information (up to 9 digits, no hyphen): "); *canfC%lf",Azip); if ((zip > 999999999.) | (zip < 0.)) ( printf("\nlnvalid Zipcode. Try again*); 75 (al) (follc»i?3 by page 75 (a2)) 1 2 3 4 y 6 7 8 0 0 1 i * 3 « 6 7 8 9 0 I 2 3 4 6 7 8 9 0 J 2 3 4 6 7 8 9 0 1 ■2 3 ■4 6 7 8 9 0 1 2 3 4 24 1201 goto getzip; ) /* get class of service */ getcos: printf(*\n£nter the Class of Service (0 - 9, A - Z): •); cos - getchO; cos - toupper(cos); if ((cos < *A') | (cos > 'Z')) if ((cot < *0') | (cos > *9')) C printfCValovilid Class of Service. Try again"); goto getcos; ) printf(*%c\n",cos); if (cos <- *9') cos *- *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++) hpiafofi] - 64.0 * modf(zip / 64.0,Azlp); printff\nEnter the lower priority inform*tion\n"); for (i - 0; i < LPCHARS + 3; i++) Ipinfop] - ' * charcnt - 0; while (charcnt < LPCHARS) { c - getchO; iwitch(c) ( case 0: f* special keyboard character, ignore */ *etch(); break; case 8: /* back space */ if (charcnt > 0) if (lpinfo[charent - 1] !- 0x5e) ( pntchar(e); putcharf y, putchar(c); Iplnfo(—charcnt] »' ) break; caw 13: f* enter •/ lpinfo(charent++] - 0x5e; putehar(l3); putchar(10); break; case 27: f* escape, done */ goto eadlow; default: /* accept if 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 21 22 23 24 >6 V7 28 19 11 12 13 14 <6 17 18 19 II <2 13 14 '5 <6 ■7 S •9 0 1 2 3 4 ? A 1 Z 9 e - tonppetfe); if (e > 0x5Q break; if (c <«■» 0x5e) break; if (c < 0x20) break; IpInfo(ch*rcnt++] ■ c; purchase); break; ) I endlow: /* pack € bit chars into 8 bit symbols (bytes) •/ charcnt - 0; for (i - 0*. i « (LPCHARS + 3) / 4; I++) ( Ippack[3 • i] » ((lpinfo{charsnt] « 2) ft Oxfc) | ((lpinfo{chmrcnt + I] » 4) ft 0x3); Ippack{3 • I + 1J ■ ((lpinfo(charcnt + 1] « 4) A OxfO) | ((lpinfo(charcnt 4 2] » 2) A 0x00; Ippaci^3 • 1 + 2]« ((lpinfo{charcnt + 2] « 6) A OxeO) | (lpinfo{charcnt + 3] A 0x3f); charcnt +~ 4; ) {* append High Priority Message to symbols */ for (i - LFSYMS - HPCOPY; i < LPSYMS; i++) lppack[i] - 256.0 * tnodf(lpzip / 256.0,Alprip); f* write oat results •/ filewrite; file - open("textin.ont".0_WRONLY| OJCREATI 0_TRUNC10_BINARY^_IWRITE); wrhe{fUe,hpinfo,6); write(flle,lppacktLPSYMS); write(file,errcnts,2); close(file); } AZ 75 (a3) (followed by page 75(a4)) 1 2 3 4 6 >; 9 0 1 2 3 4 S 6 7 8 9 0 1 2 3 4 S 6 7 8 9 0 >; 3 4 6 7 8 o ¥ i 3 i 7 9 1 ■) I j i 241291 TABLE 2 /♦MkHexLUT Govfnd Shah 10/20/87 •/ #include <fcntl.h» #inelnde <sy»\typej.fc> #ioclode <sys\st*Ch> # include -do.h> #include <stdioJi> #lnclude <otdUb.li> #inc!ude <tlmeJ» ^include <conioJi> #define True 1 #define False 0 #define kNoBins 32 static int LUTBToH12048J; static int LUTHToB[2187]; /* 2 Hex to 3 bit LUTs generated manually . Ref. Lab Book Page 32*/ static int LUTBH32I8] - (0,1,2,3,5,6,7.8); static int LUTHB23[9] - (0,1.2,3,3,4,5,6,7); static int SortVa!ue(2187]; static char RejectFlag{2187]; static int BinfkNoBins]; static int Bin] [kNoBins]; static int GrayCount,Gray4Count,RejectCount; static int BitValue{7]; static int •pLUT,*pSort,ifile,ofile; static int Diff(int,int); static void Hi5tograro(void); MAIN() ( int i J,7ndex,HexValue; /•Generate the table for histogram and sorting •/ pSort m SortValue; for (Index - 0;Index<2187;Index4+) ( RejectFlagflndex] - False; /•uncompress and find iht individual hex leveb */ HexValue - Index; GrayCount - 0; for (i-0;i<7;i++) ( 75 (a4) . . (followed by page 75(a5)) l 2 3 4 6 7 8 9 0 J 2 3 4 6 7 8 9 0 1 2 3 * 6 7 8 9 0 1 2 3 i 7 3 J ■) I j ? t j 1 > I » t 241291 BitValuefi] - (HexValne % 3); If (BitYalue[i) — 1) GrayCount-w; HexValne - HexVaIue/3; ) printfC\n%04.4d '.Index); for (M;i>-0;1—) printf(*%01.1 «T,BitVaIue{iJ); /•Compute the sort Index */ •pSort - DinnO,lKI>ifr(U)riMrr(3t4)fIMff(4^> DiiT(O^HDifT(1,4)+DilT(4,6>+Dirf(2,5); if (*pSort < 4) RejectFlajflndex] ■ True; if (* pSort — 4) { prlatfT\a%OI.ld VpSort); for printfC%01.1<T,BitVmlue(iD*, Bin![GrtyCoont}++; If (GrayCount >4 ) RejectFlagflndex] ■ True; If (GrayCount — 4) ' If (Gray4C0unt < 10) {Gray4Count+-f;RejectFl«g{Index] » True;) ) if (RejectFl«g[Index}—True) {printfT*");RejectCount++;} Bin{* pSort++]++; ) priotfCXaNumber of rejected codes %d",RejectCount); /•generate histogram for the sort indices */ HistogramO; printf("\n\ngr*y level distribution\n"); for (i-0;i<kNoBins;i++) Bln[i) - Binl[iJ; HistogramO; /• Create the Bin To Hex and Hex to Bio LUTs •/ j-0; for (i-0;i<2I87;i++) { if (RejectFlag[i] «■ True) j+f; else LUTBToHJi-j] -1; LUTHToBliJ - i-j; ) for (»-0;i<2W8;i++) printf(*\n%4.4d BTott%4.4d HToB^.4d\i,LUTBToHIi],LUTHToB{il); for (i-2048;i<2J87;i++) printf(*\n%4,4d HToBflM.4d*J,LUTHToB[i]); ofile - 0pen(*BinHex-lut",0_WR0NLY}0_CREATK)_TRUNQ0 BINARY^_IWRITE); write (ofile .LUTBToH ,»ixeof(LUTBToH)); write (onie,LUTBH32^izeof(LUTBH32)); close(ofile); ofile - open(*HexBin.!ut",0_WRONLYK)_CREATp_TRUNC10_BINARY,S_rWRITE); write (ofile,LUTHToB,sii*of(LUTHToB)); write (ofile,LUTHB23.siteof(LUTHB23)); 75 (a5) (followed by page 75 (a6)) 1 2 3 4 6 7 8 9 '0 •1 •2 •3 ■4 '5 6 7 8 9 •0 ■J •2 •3 '4 ■5 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 ? 4 24 12 91 ) cktseCofHe); r stalk int Diff(BitNol.BitNo2) iat BitNol,BitNo2; c iat i; i - BltValuefBhNOl] - BitValue[BitNo2]; return 1*1; ) r- — ■ — —— static void HistogramO ( iat ij.Max.Count.RunningComst; float Scale^caledConat; /•Find the scaling factor */ Max » 0; for (i-0;i<kNoBins;i++) if (Bin[fl > Max) Max - Binji); RunningCount - 0; Scale - 1.0; if (Max > 50) Scale - 50.0/Max; for (!-0;i<kNoBin$;l++) t RunningCount +~ Binfi]; printf("\n%04.4d %04.4d %0Z2d: *J9in[i].RunninBCouDt,i); Scaled Count « Scale*Bin(i] + 0.5; Count ■> Scaled Count; for (j"0li<CeuntJ++) printf(*%c*,**'); ) ) AZ 75(a6) (followed by page 75(a7)) 1 2 3 4 6 ) 7 8 9 to 11 12 t3 14 16 17 18 1.9 !0 >2 '.3 14 !J !<S >7 >8 \9 >S 13 14 16 17 18 fc '9 f 10 <1 (2 <3 U IS '6 <7 '8 '9 0 J 2 24 1291 /•*TJb V unsigned char GFMuIIndEle(ch*r,cliSLr,char); /•field.Index.elementV unsigned char GFMnl(char,char,char); /•field.elemeDtl ,element2*/ unsigned char GFInverte(chartehar); /•field.element*/ unsigned char GFT>iv(char,char,ehar); /• field ,Divldend,Divbor*/ /• # of info, symbols for Reed-Solomon Code; Including padding •/ #define kkO 43 #define kkl 183 f* Correction capability of the code */ #deflne ktO 10 #define ktl 36 #define ktmax 36 /*max of tO and tl •/ f* Block length of the code •/ #de(ine knO 63 #define knl 255 f* Actual number of information synbob */ #define klnfoSymbobO 6 #define klnfoSymbobl 70 /* Total number of symbob on the label *f #define kLabelSymsO 26 #define kLabelSynsl 142 75(a7) (follcwed by page 75(a8)) 24 12 91 T A 3 L E 3 f GF.c Govind Shah Govind Shah 9/18/87 Program to generate Galois Field Tattles for 2*6 and 2*8 Entries Range Entries Range L IndexToElement 128 1-63 512 1-255 LJElemenfToIndex 63 0-62 256 0-254 Polynomial 1+X4XA6 I+xA2+xA3+xA4+xA8 Note: The number of entries required In the Index to element LUT Is only 63/255; however the tables with 64/512 entries are helpful for multiplying two elements.
The ElementToIndex LUTs return 63/255 If the input element Is 0 (disallowed) V "include <stdio.h> "include <stdlib.h> #include <tizneJi> "include <conlo.h> "include <io.h> "include <sys\types.h> "include <sys\staLh> "include <fcntLh» static unsigned char L IndToEle(2I512],L_EleToInd(2I256J; unsigned char IToE0l5T2],EToI0l256),IToEl|512],ETo]U256]; InitGF() / { int iFile; iFiJe - openCGfXirr.O RDONLY | OJJINARY); read(iFile,L_IndToEle^keof(L__IndToEle)); read(iFile,LJEIeToInd,sizeor(L EleToInd)); read(iFileJToEO^Ueof(IToEO))f" read(iFiIe,EToI0^izeor(EToI0)); read(iFile,IToE 1 .sizeofQToEl)); read(iFUe,EToIl .sizeof(EToI I)); c!ose(iFile); ) r~— ———— «•/ unsigned char GFMulIndEIe(Field,IndexJEIement) unsigned char Field,tndex,^tement; ( if (Element — 0) return(O); return (L_IndToEle(FieldIIndex 4 L_EleToInd(FieldIElenient]]); 1 r v 75 (a8) (followed by page 75(a9)) 24 1 291 unsigned char Field,EleltEk>2; { If ((Elel — 0) B (Ele2 —O)) retunKO); retmrn (LJodToEIefFieldlL EkToInd{FieldlEIell + L__EIeTolndlFieldIEIe2J]); ) r unsigned char GFInverse(FIe!d.Element) unsigned char Field.Ele«nent; C if (Field — 0) return (L_IndToEle{0|53-L_EleToInd!0|7ileinentI]); else return (L_IndToEle[ll255-L EleToInd(lIEIement]]); ) "" r unsigned char GFDivfField.Dividend.Divisor) unsigned char FieldJSividend.Divisoi; ( if ((Dividend "«0)| (Divisor —0)) return(O); if (Field — 0) Divisor • 63-L_EleToIndlOIDivisor]; ebe Divisor - 255-L_EleToInd[llDlvisor); retura (L_IndToEle[FieldIL_EleToIndtFieIdIDividend] ~ ♦ Divisor]); ) "Z 75(a9) (followed by page 75(al0) 1 2 3 4 6 7 8 9 11 12 >3 14 f 5 16 •7 <8 >9 \0 >1 >2 13 14 '.6 17 '.8 '.9 11 12 13 14 16 17 18 19 (1 12 13 (4 16 17 18 19 ; o ;/ \2 <3 14 •5 24 1291 I* MkRSLUTx Govlnd Shah /28/87 Program to generate: Gtlois Field Tables for 2A6 anil 2A8 RS Coding generator matrices Entries Range Entries Range LJndexToEJement 128 1-63 512 1-255 LJElementToIndex 64 0-62 256 0-254 Polynomial l+x+xA6 I+xA2+xA3+xA4+xA8 Note: The 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 ElementTotndex LUTs return 63/255 if the input element is 0 (disallowed) V ^include <stdio.h> #include <stdtib.h> #include <timeJ» #include <conio.h> # include <3o.h> #inelude <sys\types.h> #include <sys\stath> "include <fcntl.h> #include <\ups\code\gf.h> unsigned char IToE0(5l2],EToI0(256]JToEl[512],EToIl(256]; unsigned char GMatO[kInfoSymbolsOi2*ktO],GMat I[klnfoSymbols 112*kt I J; mainQ { static unsigned int Lj.oFile.Poly.NoElements.OverFlowMask.PrimePoly; static unsigned char L_IndToEle{2I512]fL_E]eToIndl2I256]; static char Field; static int n,k,NeededRows,t; static unsigned char GPoly(2*ktmax + 1); static unsigned char Qlndex.QCoeff; unsigned char Dividendtknl); static int Degree,Row; /•Generate the Galois Field Look Up Tables */ r Galois Field (2**m) */ 75 (alO) (Followed by page 75(eill)) 6 7 8 9 0 ] 2 3 4 6 7 8 9 0 1 6 7 8 9 0 1 2 3 4 7 ? 3 I 2 i i F 7 ? ) > 1 I I > 24 ' 2 91 for (Field-0;FieId<2;Fleld++) ( If (Field — 0) ( NoElements - 63; OverFtowMask » 0x40; PrimePoly - 0*43; /•I+x+xA6V ) else { NoElements - 255; OverFtowMask ■* 0x0100; PrimePoly - 0x01 lD;/*l+xA2+xA3+xA4+xA8V ) f* Generate Index To Element LUT */ Poly ■» 1; for (i-0;i<-2*NoEIementS4l;i++) ( L IndToEIefFieldli] - Poly; /^Multiply by Alpha, shifting by 1 •/ PoIy«-l; if ((Poly St OverFtowMask) I- 0) /* Incorporate the prime polynomial*/ Poly PrimePoly; ) f* Generate Element To Index LUT */ L_EleToInd(FieldI0] - NoElements; for (i-l;i<-NoElctnents;i++) { L_EleToI ^FieldIi] - 0; for (j-OJ<NoEIementsU+*) ( if (L_IndToEle(FieldIj] — i) ( if (LJEIeToIndtFiekSJi]!- 0) printf(*\n«,,,***,,*****#**"); L_EleToInd{FkWIl] - j; ) ) ) ) f* Copy toto IToEO.rroEI ,EToI0,EToI 1 •/ for (i-Op<256;l++) ( EToIOtiJ - L_EleToIndp>IiJ; EToIl[i] - L_EleToInd[J JJJ; ) 75(all) (followed by page 75(al2)) 24 < 291 foi (i-0;i<5iy+-f) I IToE0{iJ-L IndToEleCOIil; TFoEI[i] - L~IndToEJeI]IiJ; ) oFlJe - openCGf.LUT*sO_WRONLY 10_CREAT 10_TRUNC 10_BIN AR Y^_IWR1TE); write(oFili,L_lndToE!e,sfaeof(L_IfldToEle)); write(oFUeJL_EleTolBd^Izeo((L_EleTolad)); write(onje.TroEO,»!»or(rroEO))r vrite(oFile,EToIO^l»sof(EToIO)); write(oFiJe,rroE I .jlxeottTToE I)); write(oFile,EToIJ .slzeof(EToI] )); closefcFile); printfr\n OF(63) GF(256)T: printf("\n IndToEle EleToInd IndToEle EleToInd"); printfr\n _'X for (Wy<5I2^t+) ( printf("\n %3d %3XH \i,i); if (i < 32) pHntfr%3d %3XH %3d %3XH%LJtodToEle{<>IiJ, L_IndToEleJOIi],L_E«eToIndIOIi].L_EleToIadtOIiJ); ebe printf(* mX priatfT %3d%3XH nX IndToEteJIIO.
~ L IodToEleClIiJX if (i<256) printfC%3d %3XH\LJ^ToInd{l I«],L_E!eToInd(l Ii]); ) /* Generate the Generator Matrices */ InitGF(); f* Compute the Generator Polyaomial (x+aX*+>A3)(x-»aA3)x4aA4) (a+aA2t) Ref: Page 13 of lab book V for (FieId-0;Fifld <-l;FJeld++) ( IT (Field —0) I t - ktO; n - knO; k - kkO; NeededRows - klnfoSymbobO; ) ebe ( t - ktl; a - Jen I; 75(al2) (followed by page 75(al3)) 24 1 291 k - kkl; NeededRowi - klnfoSymbobl; ) GPolyfO] - I; for (i-l;i<-2*tu++) GPoIypJ - 0; r printf("\n Generator Polynomial Tor R_S Code; GF(%d) t«%d",n+l,t); printfC*\B Coeffi. of x^x* I x*%d*,2*t); •/ for (i-l;i<-2*t;i++) /•multiply by (x+a*i)*/ ( for a-y>oj--) GPo!y[jJ - (GPolyU-1] A GFMuIIndEle<FieId,i,GPo!ylj])); GPoltfOJ - GFMaUndEle(FieldJ,GPoly[OP; ) r Printfnn "Y, for (j"0U<""2*l-j++) printfr*2a \GFoIyUJ); •/ r- — — —«•/ /•Compute the generator matrix */ for (Row-0;Row<NcededRowi;Rcw++) { for (i«0;i<ii;i-M-) Divider) d(ij •> 0; Dividend[n-k+Row] - I; f'tci x*(n-l-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 - Dividend[Degree]; /• printf("\nDeg.%u Qindex%u QCoeff%u\n",Degree,QIndex,QCoefO; V for (i-0;i<-2*t;i++) ( (Dividend[QIndex +i] A- GFMul(FieId,GPoI>li],QCoeff)); } /*New remainder computed */ while ((Divldend(—Degree] — 0) AA (Degree >- 2*t)); )/* Degree reduced to less than that of polynomial •/ /* prlntfC\nRow no. %u\n*,Row); for (i-0;i<2*t;i++) printfC%2u "JDividendJiJ); •/ f* Copy the remainder to the G-Matrix */ Tor (i-0;i<2*t;i4+) if (Field — 0) GMatOptowIi] - Dividend!!); ebe GMatl[Rowji] - Dividend!!]; )/• All row* done •/ prlntf("\n Generator Matrix for R_S Code; GF(%~) t«%d computed*,n+l,t); } /*Both fields done •/ 75(al3) (followed by page 75(al4) J 2 3 4 6 7 8 9 '0 <1 '2 '3 •4 •5 6 7 8 9 0 J 2 ■3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 I 2 3 4 7 S ? 1 r > f t i 241291 oFile -open("R5.LUT\0 WRONLYJO CREAT|0 TRUNC10_BINARY,S_IWRITE); write(oFUe,GMit0^ixea^OMatO)); ~~ write(oFUe.GMat 1 ^izcof(GM*tl )); close(oFHe); ) 75(al4) (follcwed by page 75(al5)) 1 2 3 4 6 7 8 9 11 n 13 14 IS 16 17 18 IP U 12 13 14 16 17 18 19 11 12 U 14 16 17 18 19 <0 il 12 '3 <4 !J '■6 7 ■8 9 0 1 2 3 2412»1 TAB L E 4 I* ErrCodex Govind Shah 9/23/17 Program to encode for error corrected V #include <k>Ji> #include <sys\types.h> •include <sys\ttaLh> #include <fcntLh> #lachide <stdk>.h> # include <stdlib.h> #include <timeJt> # include <conio.h> #include <\upi\code\gf.h> unsigned char GMatO[klnfoSyinbolsOI2*ktO],GMatl[kInroSyinboIs)I2*ktl]; main() ( unsigned char RawData0[kInfoSyinbols042*kt0],RawDatal[kInfoSytnbolsl+2*ktl); unsigned char •pCurrSym; int IJ.iFile; FILE 'stream; InitGFO; InitRS(); iFile - 0pen(TextIn.0ut\0_RD0NLY 1OJBINARY); read(iFile, ARawDataO[2*lctO),kInfoSymbolsO); read(iFile. ARawData 1 [2*ktl ],WnfoSymbob 1); close(iFile); EirCode(0,R«wData0); ErrCode(l ,RawData 1); stream - fopeD("ErrCode.Out",*w+b"); pCutrrSym » ARswDataOfkLaMSymsO-lJ; for (M);i<kLabeISymsO;i++) ( for tH>J<6J++) { fputcCpCurrSym A 1 stream); •pCurrSym »- I; ) pCurrSym—; ) pCurrSym ■ ARawDatal[kLabe!Symsl-l); for (i-0;i<kLsbelSymjl;i-M-> ( for (j-«J<8 J4+) ( 75(al5) (followed by page 75(al6)) 1 2 3 4 6 7 8 9 0 1 2 3 4 6 7 a 9 o i 2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 I 2 3 4 7 J ? J I ; I f f 24 1291 } fputcCpCunSym A 1 .stream); •pCurrSym »» I; > pCurrSym—; ) fcloie{strnm); ) r —»— laltRSO { Int iFile; IFile - open("RSXUT,,0_RDONLY | O BINARY); read(iFiIe,GMat0^izeof(OMatO)); reacKiRk.GMatl ,sizeof(GMatl)); ctose(iFile); EnCodcCFkld^UwDats) unsigned char Field; unsigned char RawDttaQ; ( Int InputCOuntJ,t,TwoT,CkSymbolNo; unsigned char CkSymbol; if (Field —0) ( InputCount - UnfoSymbolsO; t - ktO; 1 elfe ( - InputCount - klnfoSymboIsI; t-ktl; ) TwoT - for (CkSymbolNo-0;CkSymbolNo<2*t;CkSymbolNo++) ( CkSynlot - 0; for (i-0;i<InputCount;l++) ( if (Field - - 0) CkSymbol A-GFMul(0,R*wData(i+TwoTJ,GMit0(iICkSynjbolNo]); else CkSymbol A-GFMuKl.R»wData(i+TwoT],GMatl(iICkSymbolNo]); ) /*Cbeck symbol computed*/ RawD»ts(CkSymbolNo] - CkSymbol; }/* All the check symbols have been computed */ ) "Z 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 I 2 3 4 6 7 8 9 0 I 2 3 4 6 7 8 9 0 I 2 J i 7 S ? 1 I I 1 I i 24 ; 2 81 TABLE 5 /♦PrUbel.c Govind Shah 10/26/87 Reads Input binary data from file ERRCODE.OUT Loads Re*ionsiAJT created by MlcMaps Selects cells of 3x3 hexes from the region map in the sequence specified by OrderXUT Performs binary to 3 level hex conversion using CeilCode for each 3x3 cell Uses FrintLabel to generate bit map file for the label Also generates a file PRLABEL.OUT showing hex levels in B,W,G. •/ # include <io.h> #include <sys\typei.h> #include <sys\stath> #include <fcntlji> #include <stdio.h» #lnclude <stdlibJi> #include <time.h> #include <conio.h> #include <math.h> #include <\ups\code\labeLh> int RegionMapflcRegionRowsIkRegionCols]; int BiDData[kNoBJts£ main(argc,argv) int arse; char *argv(); { int i,AvailableRegiot>s; int Rej,Row,Co!,CellNo; int BitsConverted; static int LUTOrder(110I2]; static int Histo{I4]; static int oFile.iFile; FILE 'stream; char OutChar; if (atoi(argvfl]) — 75) Res - 75; else Res « 300; lnitCeUCod«(): stream - fopen("ErrCode.Out","rb"); for (i«0;i<kNoBiti;i+-t) BinDatafi] - fgetc(stream); fclose(stram); iFile - 0p«n(*order.!ut*,O__RDONLY | OJBINARY,S_IREAD); 75(al7) (follcwed by page 75(al8)) i 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 > 2 3 4 6 7 8 9 i°> 2 3 4 7 3 ? ) 2412 91 retd(iFile,LUTOrder,440); c!ose(IFile); r -•/ BitsConverted ■ 0; LoadHexMapO; AvailableRegJons ■ LoadRegionMap(RegionMap); for (£eIlNo-0;CeIlNcx 110;CellNcH+) { 1 - CeUCode(BltsConverted,LUTOrder!CenNoIO],LUTOrdertCellNc| J j); BitsConverted i; Histo[iJ+-f; ) /*Copy region map to a data file •/ printf(*\n*); stream - fopen("prUbel.out",*V); for (Row-32;Row>—0;Row—) ( for(CoI-0;CoI<30;Col++) I switch (RegionMip[RowIColJ) { ease 0: OutChar - *W*;break: case 1: OutChar - *G';break; case 2: OutChar - *B*;break; default OutChar - *X'; ) fprintf(stream,"%c",OutChar); prin tfC^ic'.Ou tChar); ) fprintf(stream,"\»*); printmn"); ) PrintLabel(Res,RegionMap); printf(*\nCell size dutribution:\n*); for (l-0-,l<I4;i++) printf("%d.-%d "J,Histo[l]); printf(*\nTotal bits encodecL%d",BitsConverted); 75(al8) (followed by page 75(al9)) 1 2 3 4 6 7 8 9 <0 '1 '2 •3 '4 '5 •<5 ■7 •8 '9 •0 'J •2 '3 •4 ■5 •6 7 •8 ■9 ■o •3 •4 •5 •6 7 8 9 )• 2 3 4 6 7 8 9 0 J 2 3 4 241291 ) t TAB IE 6 /•MkMaps.C.
Govlod Shah 10/26/87 Generate HexMapJLUT and Regiom.LUT.
HexMap.LUT assigns a RegionRow/RegionCol pair to each pixel ia • 300x300 matrix. Pixels that do not belong to any regions we initialised to indicate a fixed white region (Regions.LUT[33I0]). It also maps the appropiiate 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 region* in the short rows, are indicated as disallowed in the RegfonMapXUT by storing a number higher than 2. */ #inc!ude <io.h> #include <sys\types.h> ♦include <sys\st*t.h> #include <fcntl.h> ♦include <stdio.h> #include <stdlib.h> ♦include <time.h> ♦include <conio.h> #include <mathJi> ♦include <\ups\code\label.h> #define H 12 ♦define W 10 FILE •bitmap; static char huge map[300I30412]; char Lioe{30412]; int region; int i, j, k, I.RegionRow.RegionCol.RingColorCol; int x, y, int Isd; int ofile; int level; double theta, rl, rwidth; double c, s; int t; unsigned char byte; static int hexpatfHIW] » ( 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, 1,1,1,1,1,1,1,1.1,1, 1,1,1,1,1,1,1,1.1.1, 75(al9) (followed by page 75(a20)) 1 2 3 ■* 6 7 8 9 0 1 2 3 4 6 7 8 9 0 J 2 3 4 6 7 8 9 0 1 2 3 4 6 7 3 9 0 I 2 J i S 7 ? } ) ( i 2412dt • 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 }; /• ——————■ mak^trgc.argv) int argc; char *argvQ; ( static Int RegioiiMap[kRegionRowsIkRegionCols); char far *pi; int AvailableRcgions; int NoRings; float RingWidth; NoRings - 6; RingWidth - 8.0; /* initialize the pixel map to point to wtdte region RegionMapfkRegionRows-lJO] is fixed at 0 (white) RegionMap[kRegionRows>lIl] is fixed at 2 (black)*/ fprintf(stderr,"\nlnitializing map"): for (i » 0; i < 300; i++) for 0 • 0: j < 304; j++) - kRegionRows-1; mapIiUll] - 0; ) for <i—0; i<kRegionRows; 1++) for 0-0; j<kRegionCols; j++) RcgionMap(iIj] - 3; /* initialize to unusable */ RegionMapfkRegionRows-110] - 0; RegionMap[kRegioaRows-lIl] - 2; fprintf(stderr,"\nDoing hexagons'); RegionRow » 0; /* do length 30 rows •/ for a - 0; i < 300; 14- 18) (RegionCol - 0; for (| - 0; j < 300; j t- 10) ( for (k - 0; k < 12; k++) for (1 - 0; I < 10; !♦+) if (hexpa^kjl] — 1) {map[i+klj+!l0] » RegionRow; map{i+kIj+lXl] - RegionCol; ) RegionMap[RegionRowXRegionCol] - 0; RegionCol-H-; ) RegionRow +* 2; 75(a20) (follcwed by page 75(a21)) 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 3 9 0 1 2 1 i f 1 1 ) ) i > t f * 24 1 2 91 RegionRorf - 1; /• do leogth 29 rows •/ for (1 - 9; I < 293; 1 ■»- 18) (RegionCol - 0; for 0 - 5; j < 300 - 5; j +- 10) { for (k - 0; k < 12; k++) for 0 " 0; 1 < 10; Iff) if (hexpatfkp] — 1) {map(i+kIj+HO] - RegionRow; nup{i+k£j+lll] - RegionCol; ) RegionMapptegionRowIRegionCol] ■ 0; RegionCol++; ) RegionRow +■> 2; ) fprintf(stderr,"\nDoing finder circles"); for (theta «■ O4 theu < 3.14159 / 24 thets +- .015) /*.005 worked*/ ( c - cos(theta); ■ m sin(theta); for (r • 0; r < NoRings; r++) { RingColorCol - (r A 1); f*0 for white, 1 for black •/ if (r > 0) rwidth - RingWidth; else rwidtfa - RingWidth/2.; for (rl - 0.; rl < rwidth; rl +•» J2) ( * m S + (((r - S) • rwidth) + rl) • c; y - .5 + (((r - JS) * rwidth) + rl) • s; pi - &mip{ 150+xI 150+yl0]; if (*pi <kRegionRow>-l) RegionM»p[*piX*(pi+l)] » 3; •pi++ m kRegionRows-1; •pi - RingColorCol; pi - Amap{150-xll50+yx0t if (*pi <kRegionRows-l) Regk>nMap{*piI*(pi+1)] * 3; *pi+f ■ kRegionRows-1; •pi - RingColorCol; pi - &map(150+xl350-yl0]; if (*pi «kRegionRows-l) RegionMap[*pSl*(pi+l)) ■ 3; •pl+f * kRegionRowi-1; •pi « RingColorCol; pi - &map{ 150-xI 1 SO-ylOJ; if (*pi <kRegionRows-l) RegionM«p{*piI*(pi+])] - 3; •pi-H- ■> kRegionRows-1; •pi - RingColorCol; ) 75(a21) (followed by page 75(a22)) 24 12 91 ) ) AvailableRegioos •• 0; for (i»0;l<kRegionRow*-l ;!+-♦•) for (j-0; j<kRegionCols; J++) If (RegiooMap{iIj] ■— 0) AvallabI«Regioni++; printf ("\nAv*il«bIe region£%d".AvsilableRegioiu); /•Output map data to regmap.out */ ofile - 0pen("bexmjtpXirr,O_VRONLY | OJCREAT | OJIRUNC | 0_BINARY^_IWRITE); for (i - 0; i < 300; I++) t for (j-0j<304j++) ( LineUIO) - iwptiUIO]; Unefjll] - maptHjlH ) write(ofile>Line,sizeof(Line)); } dose(ofile); ofile - opcD"Regions.LUT",0_VRONLY | OJCREAT I O TRUNC | 0_BINARY,S_IV JTE); write(ofile,RegionM»p,sizeof(RegionMap)); closefofHe); /* Print the regioa nup */ for (i»kRegionRowj-l;i>»0;i—) ( printf(*\n%2.2d *,i); for (j-0"J<kRegionCols;j-H-) ( If (ReglonMapIilj] < 3) printf(-%l.l«rt(j%10)); else printf(*%c",V); ) ) printf(*\n •); for (i-0;i<kRegionCoU;i+-10) priatf("%l.ld *,i/10); ^ 75(a22) (followed by page 75(a23)) 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 24 v2 5 26 27 28 79 31 32 33 14 36 37 38 39 fl 12 13 14 \6 17 18 19 >0 U >2 ;3 ■■4 ■5 24 7 2 91 * «r TABLE 7 /•CellCode.c Govind Shah 10/26/87 Converts binary bits from the BinData bitstream into 3 levels for the available bexes In 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 2S lab book).
V #include #include <sys\typesJi> #include <sys\stat.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <conio.h> # include <math.h> #include <\ups\code\labeUi> int iFile; int LUTBinHex[2048J,LUTBH32I8J; extern int RegionMap{kRegionRowsIkRegionCols]; extern int BinData[kNoBits]; CtCeUCode() ' ( iFile - 0penCBinHex.LUT,,O_RDONTLYlO_BINARY); read (iTiIe^UTBinHex^izeof(LUTBinHex)); read (iFile,LUTBH32,jiieof(LUTBH32)); clcte<iFile); ) int CeUCode(Index,CeURowlCellCoI) /•Returns number of bits converted to hexes; pBinDataP points to next bit*/ int Index,CellRow.CellCol; ( int RowOffset,ColOffset,iJ,AvaiIableHexes,FixedHexes,BitsConverted; int CeUIndex,RawRow,RawCol,HexValue,BinVitlue; /•printf("\nlnder. %T CellRow. %d CellCok %d,.Iaclex,CsnK.owICellCol); •/ RowOffset - CellRow*3; 75(a23) (follcwed 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 (1 <2 43 44 (6 17 18 19 W U (2 !3 !4 ■<5 24 12 91 } ColOffset - CeIlCol'3; /•Find the number of allowed bexes •/ AvailableHexes « 0; for (i-0;i<3;k+) foKi-0J<3d^) if (RegionMap(RowOffset. + ilColOffset ♦ j] <- 2) AvaiIabIeHexes++; /•printf(* available: %d°,AvmilableHexes); V Bin Value ■ 0; if (AvallableHexes >• 7) for (i-0;i<ll;k+) Bin Value ■ ( (Bin Value « 1) I BinData[Index++]); HexValue - LUTBlnHex[BinValue]; /*■ —FULL CELL CASE — -———•/ if (AvailableHexes — 9) { for (i-0;i<6;i++) ( RawRow - RowOffset + (2-1/3); RbwCoI - ColOffset ♦ (i%3); RegionMapfRawRowJRawCol] - HexValue % 3; HexValue « HexValue/3; ) RegionMap(RowOffsetIColOffset+]]» HexValue; RegionMapiRowOffsetlColOffset] - (HexValue + 1 + (BinData(Index-M-])) % 3; RegionMap(RowOffsetIColOffset-i-2] - (HexValue + 1 + (BinData{Index++])) 9b 3; return(13); )/• Full cells completed •/ ^ Celllndex - 0; FIxedHexes - 0; BitsConverted - 0; if (AvallableHexes >- 7) ( while (FixedHexes < 7) ( RawRow » RowOffset + (2-CellIndex/3); RawCol - ColOffset + (CeUIndex%3); if (RegionMap[RawRowIRawCol] <- 2) ( RegionMaptRawRowJRawCo!] » HexValue % 3; HexValue - Hex Value/3; FixedHexes++; ) Celllndex-h-; AvallableHexes — 7; BitsConverted >11; ) /•Convert pairs of hexes into 3 bits using LUTBH32 */ while (AvailableHexes > 1) 1 75(a24) (followed by page 75(a25)) 1 2 3 4 6 7 6 9 11 12 13 14 IS 16 17 r« 19 >0 ]] !2 >3 \4 IS >6 >7 '.8 !9 11 12 13 14 IS 16 '■7 S •9 •o 7 2 3 4 6 7 8 9 0 I 2 3 i 24 1 291 BinValue - (BinData[Index4+] « 2) | (Binl>ata{index++] « I) | (BinData[Index-h-]); HexValue - LUTBH32(BinValue]; /* printf(*BinValue:%d HexVaiue:%d\BinValue„HexValue); •/ FixedHexes « 0; while (FixedHexes < 2) { RawRow m RowOffset + (2-Celllndex/3); RawCol - ColOffset + (Celllndex%3); if (RegionMap{R«wRowIRiwCol] <• 2) ( RegionMapfRawRowfRawCol] - HexValue % 3; HexViIue - HexValue/3; FixedHexes++; ) Celllndex++; ) AvailableHexes — 2; BitsConverted 4- 3; J /*Q>vert the remaining hex, if at all •/ if (AvailableHexes ~ 1) { FixedHexes - 0; while (FixedHexes < 1) ( RawRow - RowOffset + (2-CellIndex/3); RawCol - ColOffset + (Celllndex%3); if (RegionMap[RawRowlRawCol] <- 2) ( RegionMap(RawRowIRawCol] - ((BinData(Index++]) « 1); FixedHexes++; ) Celllndex++; I* printf("\nRowOff:%d ColOff:%d dRow:%d dCot%d", RowOffset,ColOffset,dRow,dCol); */ ) BitsConverted**; ) return (BitsConverted); ) AZ 75(a25) (followed by pacje 75(ai6)) J 2 3 4 S 6 7 8 9 11 12 13 14 IS 16 17 IS 19 21 22 23 24 26 17 28 29 u 12 13 14 ?5 16 \7 18 19 U 12 13 14 '5 17 « '9 •0 7 2 3 4 24 1 2 r Filename ORDER.C * Author: Donald G. Chandler, PA Technology * Date: October 24, 1927 * Purpose: Generates the ORDER.LUT look up table * Modiflcations after November IS release: */ #include <fcntl.h» •include <sys\types.h> •include <sys\stat.h> •include <lo.h» maln() ( static Int ordeitllllO] -{ 107. 88. 87. 86, 85, 84, 83. 82, 81. no. 89, 46, 45. 44, <3. 42, 41. 40, 39, 106, 90. 11. 22. , 21, 9, , 8, 19, 105, 91. 23, . 37, 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, 23. 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 orderlut(l]0I2]; int i, j; int file; for (1« 0; i < 11; i++) for 0 ■ 0; j < 10; j++) C order!ut[ordeffigj] - 110] - i; orderluttorderfiljj - l^l] - j; J file - open("order.lut",0_WRONLY | O CREAT I O TRUNC | 0_BINARY^__rWRITE); ~ ~ write(filc,orderlut,440); close(file); ) 'Z 75(a26) (followed by page 75{a27)) 1 2 3 4 6 7 8 9 '] •2 <3 '4 '5 •6 •7 •8 •9 '.0 '.2 '3 •4 '5 '6 •7 •8 •9 "0 •1 •2 ■3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 1 241291 /*Label.h •/ #define kRegionRows 34 /*extr* tow for regions fixed black and white •/ #define kRegionCols 30 #define kNoBils 1292 AZ 75(a27) (followed by page 75(a28)) J 2 3 4 6 7 8 9 IJ 12 13 14 16 17 18 19 11 12 13 14 16 17 18 19 II 12 13 J4 16 17 13 19 IJ <2 13 14 IS >6 17 18 •9 0 1 2 3 4 291 TABLE 8 /•Label Govind Shah 10/17/87 Routines tc generate bitmap for a label from RegionMap.
Uses HexMap.LUT to find the region for each pixel in a 300x300 matrix.
V #tnc!ude <io.h> # include <syj\typej.h> #include <sys\stat-h> # include <fcntLh» #include <stdio.h> #include <stdlibJi> ^include <time.h> ^include <conio.h> #include <math.h> ^include <\ups\density2\label.h> FILE *bitmap; static char huge map(300J[304|2]; /* 304 to allow integer number of bytes for each row */ char Line[304I2]; int region; int i, j, k, l,RegionRow,RegionCol,RingG>lorCol; int x( jr. int Isd; int ofile; int level; double theta, rl, rwidth; double c, s; int r; unsigned char byte; LoadHexMapQ { fprintf(stderr,Unloading hex map"); ofile - open("hexmapJut",0_RDONLY | 0_BINARY); for (i « 0; i < 300; i++) ( read(ofiie,Line,iiMof(Line)); for (j-0J<304U++) ( mapIililOJ - LineOIO); mapIiUIl] - LineUIlJ; ) ) close(ofile); ) 75(a28) (followed by page 75(a29)) 24 1 2 91 int LoadRegionMap(RegionMap) int RegionMap[kRegionRowsIkRegionCols); ( int AvailableRegions; fprintf(stderr,"\nIoading region nap'); ofile - open(*rcgions.lut",0_RJX)NLY 10_BINARY); i - read(onie,RegionMaplkRegionRows*kRegionCok*2); clo$e(ofile); fprintf(stderr,"\nRcgion map bytes read.*%d"JX AvailableRegions - 0; for (i-0;i<kRegionRows~ I ;i++) for (j-0; j<kRegionCo!s; j++) if (RegionMap[>lj] •» G> AvailableRegions++; fprintf (stderr,"\nAvailable re^ions&d",AvailableRegions); returo(AvailableRegions); ) /•-- ———— PrintLabel(Res, RegionMap) int Res,RegionMap{kRegionRowsIkRegionCols]; ( bitmap ■ fopen('bitiaap.out","wb"); fprintf(stderr,"\BMotting graphics to bitmap"); linit(Res); Igraphics(); for (i - 299; i >-0; j--) ( Uine(38); for 0 - 0; j < 300; j ■»- 8) { byte ■ 0; for (J. - 0; k < S; k-H-) { level - RegionMaptmapJiU + kI0]Xmap{i][j + k£l]]; if (level > 2) level - 0; switch (level) ( case 0: level - 0; break; case 1: if (((i + j + k) % 5) 0) level - 1; eke level ■ 0; break; /* half toning for gray hexes*/ case 2: level - 1; break; ) byte - byte • 2 + level; ) lplotbyte(byte); ) ) 75 (a29) (followed by pays 7:: (a30)) 1 2 3 4 4 8 9 0 1 2 3 4 6 7 8 9 0 I 2 3 4 S 6 7 S 9 ) f S s 1 1 * I I t f 24 1 2 lendgraphics(); Ieject(); ) linit(res) Int res; fprintf(bitmap,*%c*t%dR",27,rej); graphicsO fprintf(bitmap,*%c*rlA*,27); ejectO fprintf(bitmap,"%cE",27); endgraphicsO fprifltf(bitmap,*%c*rB",27); plotbyte(byte) unsigned char byte; putc<byte,biunap); line(bytecount) nt bytecount; fprintf(bitmap,"%c*b%dW",27,bytecount); ) 75(a30) (followed by page 75(a31)) I 2 3 4 6 V W8 9 0 J 2 3 4 6 7 8 9 0 1 2 3 4 t> 7 8 P 0 > ) t t i 24 1 2 TABLE !* Filename: . DTINIT.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\density2\dt2803J» mainO I* program DT1NIT 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 •/ { int i, j; unsigned char far *sp; /* check if DT2803 is present */ if ((inp(DTSTAT) & 0x70) !- 0x60) ( fprintf(stderr,"\nTbere is no DT2803 instilled at base 0x2E0\n"); exit(l); ) else printf("\nDT2803 is present at 0x2E0"); clr2803(); /• send the READ CONFIGURATION command ♦/ wcomm(3); printfOThe DT2803 device id is %xVdataQ); switch (rdattQ) { case 0: printf("\nThe DT2803 device is not configured for interrupts"); break; case 1: printfC\nThe DT2803 device is configured for interrupt IRQ2"); break; case 2i printfC\nTbe DT2803 device is configured for interrupt IRQ3"); break; case 3: printf("\nThe DT2803 device is configured for interrupts IRQ2 and IRQ3-); break; default: fprintf(stderr,*\nDT2803 intenupt configuration not expected\n"); exit(l); break; ) 75(a31) (follcwed by page 75(a32)) 241291 printf("\nThe DT2803 memory buffer begins »t %*",rdati() * 0x1000); /* set up color lookup table 0 •/ wcomm(0xl9); /* send write output lookup table command */ wd»ta(0); /• output lookup table 0 •/ for (i ■ 0; I < 256; i++) ( wdata(i % 64); switcb(i / 64) ( case 0: wdata(63); break; case l: wdata(4S); break; case 2: wdata(12); break; case 3: wdata(3); break; default fprintf(stderr>a\nUnexpected case in dtinit\na); exit(l); break; ) ) printf("\nlssuing SET INTERNAL TIMING command"); wcomm(0xl2); printff\nlssuing DISPLAY ON command*); wcomm(0x20); f* write a test pattern into the video memory and check it */ sp - 0xa0000000; for (i - 0; i -c 240; i*+) for Ci - 0; j < 256; j++) { •«p ■ j; if C»P I-j) { fprintff\nMemory error in DT2803 video memory location %x\n",iX exitO); ) id++; ) f* normal exit */ priatf("\nTesting and color lookup table 0 initialization complete\n"); ) 75(a32) (followed by page 75(a33)) • J 2 3 4 6 7 8 9 >J !2 '3 •4 '5 •6 •7 '8 •9 '■0 '.J •2 \3 •4 '5 '6 ■ 7 •8 9 0 m 4 7 8 9 0 •; 3 4 6 '/ % i ) r i i i 24 1291 TABLE 10 /* Filename: DTLIVE.C * Author Donald O. Chandler, PA Technology * Date: August 1, 1917 * Purpose: Puts the DT2803 image capture board In live mode * * Modifications after November 15 release: V •f #include <stdioJ» •include <\ups\density2\dt2803J» main() /• program DTLIYE puu the image capture board in live or "pass-through" mode •/ ( wcomm(Oxlc); /* select input look up table •/ wdata(0); J* number 0 (input in range 0 - 63) */ wcomm(0xl3); /* set to external video synch */ wcomm(0x23); /• set pass-through mode */ ) 75{a33) (followed by page 75(a34)) 24 12 91 TABLE 11 J* Filename: DTGRAB.C • Author Donald G. Chandler, PA Technology • Date: August 1, 1987 • * Modifications after November 15 release: V #include <stdio.h> ♦include <\ups\denslty2\dt2803.h> mainO /* program DTGRAB grabs an image and puts it on the display */ ( wcomm(Oxlc); f* select input look up table */ wdata(O); /* number 0 (input In range 0 - 63) •/ wcomm(0xl3); /• set to external video synch */ wcomm(0x22); (* execute acquire frame command •/ ) *Z 75(a34) (followed by page 75(a35)) 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 11 12 13 i4 16 17 18 19 U 12 13 14 <5 TABLE 12 24 1 2 91 I* Filename; DTSAVE.C * Author Donald O. Chandler, PA Technology * Date: August 10.1987 * Purpose: Saves the DT2803 linage capture board image to • disk file * Modifications after November 1$ release: •/ compile with COMPACT model (MCCC) »»••••»•»•*»«••••••»••»•••*•»»»*»•**»»•»•••••»»«j #inc!ude <stdioJh> •include <fcntLh> #include <sys\types.h> #include <sys\statJ» •include <io.h> •include <\ups\density2\dt2803.h> /* 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(*rgc,argv) int argc; char *argv{J; ( int ofile; ofile - opeo(argvj[ 1 J.O_WRONLY 10_BINARY10_CREAT,S_IWRITE); (* open */ write(ofile,0xl0000L * MEMSEG.61440); /* write direct from screen mem */ ) *Z 75(a35) (follcwed by pa$a 75(a36)) 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 22 23 2 4 26 17 18 29 11 12 13 14 16 17 18 19 11 12 13 14 16 17 18 '9 : 0 •1 '<2 <3 •4 2 4 12 91 TABLE 13 /* Filename: DTLOAD.C -• Author Donald G. Chandler, PA Technology * Date: August 10, 1987 * Purpose: Loads the DT2S03 image capture board from a disk file * Modification! after November IS release: V compile with COMPACT model (Batch file MCCO #bclude <stdio.h> #include <fcntl.h> ^include <syi\types.h> #inc!ude <jy»\»Uth> #include <ioJ»> #include <\ups\density2\dt2803J» f* DTLOAD loads an image file from a disk * the image file format is just 61440 consecutive bytes, an exact * replica of the screen memory •/ maia(argc,argv) int argc; char "argvl); { int iflle; ifile - open(argvfl]tO_RDONLY | O BINARY); /• open the file */ read(iflle,0x 1OOOOL * MEMSEG,61440); /* read it directly onto screen •/ ) AZ 75(a36) (followed by page 75(a37)) J 2 3 4 6 7 8 9 U 12 13 14 IS 16 17 18 19 >0 U >2 >3 !4 !S >6 >7 18 >9 IJ 12 13 14 IS 16 17 18 19 <0 i; '2 ■3 •4 '6 7 '8 9 0 I 2 3 4 24 1291 } /* 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 <3tdioJ» # include <conio.h> ♦include <\ups\density2\dt2803J» main() I static unsigned char far in[240I256); sutic unsigned char far out(240I256}; char far *sp; int row, col; int i, j; int pixel; int max, min; float m; /* copy in the screen data •/ ' getscreen(in); /* loop on small centered blocks */ for (row *» 10; row < 230; row 4- 10) { /* do bar graph •/ for (i « 0; I < 10; i++) for (j • 0; j < 5; j4+) { sp - (0x10000 * MEMSEG) + ((239L - (row + i)) « 8) + j; •sp - 127; ) for (col - 16; col < 240; col -*• 16) C max - 0; min - 100; f* find max and min In larger surrounding block •/ for (I« -10; i < 30; i*+) for 0 - -16; J < 32; j++) ( pixel ■ in[row + ijcol + jt if (pixel > max) max - pixel; if (pixel < min) min - pixel; 75(a37) (follcwed by page 75(a38)) 1 2 3 4 6 7 8 9 11 12 13 14 IS 16 17 18 19 >0 '.1 >2 13 14 16 \7 18 >9 II 12 13 14 16 17 18 19 II (2 13 14 <5 •6 7 '8 9 0 1 2 3 4 ( 24 12 91 ) /• normalize centered block according to max and min values •/ m ■ 255. / (1 + (max - min)); for (i ■ 0; i < 10; in) for (j - 0; j < 16; j++) outfrow 4 ijcol + j] - (m * (in[row + ijeol + jj - min)) / 4; ) ) /* copy data back to screen •/ putscreen(out); ) 75(a38) (followed by page 75(a39)) 1 2 3 4 6 7 8 9 0 I 2 3 4 S 6 7 8 9 0 ] 2 3 4 6 7 8 9 0 >1 3 4 7 S ? >; > 1 J i* ) 24 1 2 91 TABLE 1 4 /* Filename: FIND.C * Author Donald G. Chandler, PA Technology * Date: October 24.1987 * Purpose: Finds the center of labels and rescales the Image * * Modifications after November 15 releasee */ #include <stdioJi> #include <mstbJi> ♦include <\ups\density2\geometry.h> ♦include <\ups\density2\dt2S03J» /* This program finds the center of a 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.
V ♦define PFLEN 63 ♦define PFMAG 400.0 ♦define FLEN ♦define SLEN 9 /* length of half of symmetric prototype filter */ I* pro to filter designed for 400 pixels / Inch */ f* 1-D and 2-D filter lengths •/ j* short 2-D filter length */ unsigned char far in[YPIXIHPIX]; f input pixel array */ unsigned char far outfVPDCIHPIX]; f* output pixel array */ • static float odfilterfFLEN]; static float tdfilterfFLENIFLEN]; int imsx - 0; Int jmax - 0; float interp2d(); float filter2d0: int filter! d(); tnainO ( /* read in the prototype filter and design i-D and 2-D filters */ printf(*\nDesigning filters"); design(odfilter,tdfilter); 75(a39) (followed by page 75(a40)) • 1 2 3 4 6 7 8 9 0 1 2 3 4 S 6 7 8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 3 9 0 J 2 3 i ' $ 7 I ) ) [ i i i 2412 91 [* read In the screen */ printf("\nReading in the screen"); geUcrcenfin); IT (filter icKodfiiter)) ( printffYnNo vmlid center found\n"X ) mark(imuJmax,GREEN); printf("\&Re*calii>g"); rescaleO; puUCfeen(out); float fi]ter2d(tdfilter,ilen,jlen,icenter,jcenter,iextent, jextent.color) noat tdfilteilFLEN|FLENJ; int ilen, jlen, icenter, jceater, Iextent, jextent, color; ( int i, j, k, 1; float oux, sum; max » -l.elO; for (i - icenter - Iextent; i <» icenter + iextent; i-H-) ( mark(i Jcenter - jextent,color); mark(i Jcenter + jextent,color); for (j - jcenter - jextent; j <■ jcenter + jextent; j-t-t) ( sum - 0; for (k - 0; k < lien; k++) for (I ■ 0; 1 < jlen; 1++) sum tdfilterikjlj * in[i + k - ilen / 2j£j + 1 - jlen / 2J; if (sum > max) ( max » sum; imax - i; jmax - j; ) ) ) printfCAnMax - %f",max); return(max); int filter! d(odfilter) float odfl!ui{FLEN]; ( int i, j, k; 75(a40) (follcwed by page 75(a41)) 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 4 6 7 8 9 0 1 2 3 4 o 7 8 9 0 I 2 3 t 241291 float sum, smooth; smooth ■ 0^ for (i - 32; I < VPIX - 32; i ■*- 2) { mwk(i32.GR££N); mark(l,HPIX - 32.GREEN); for U - 32; j « HPDC - 32; j++) ( sum « 04 for (k - 0; Ic < FLEN; k++) sum +- odfilter[k) * inpli ♦ k - FLEN / 2J; smooth * smooth • .95 4 .05 • fum * sum; If (smooth > 6.0) { if (fllUr2d(&tdfiltei((FLEN - SLEN) / 2J(FLEN -SLEN) / 2]. SLEN.SLEN.U.5.20.BLUE) > 10.0) If (fUter2d(tdfiiter,FLEN,FLEN,imax,jmax,2,2,RED) > S0.0) retura(0); smooth - 3.0; ) ) ) return(l); designCodniter.tdfUter) float odfUtertFLEN]; float tdnileifFLENlFLEN); { FILE 'stream; static float pfilteifPFLEN]; float xpos, ypoi, fpos, fracpos; Int ipos; int I, j; /* read In the prototype filter */ stream - fopenr\\ups\\fllters\\impulseJut",V); for (I - 0; I < PFLEN; I++) fscanf(stream* %f ",&pfilter{i]); /* design the I-D filter based on horizontal magnification •/ for (I - 0; I < FLEN; 1++) ( fpos - fabs((i - FLEN / 2) • (PFMAG / HMAG)); ipos ■ fpos; fracpos - fpos - ipos; odfilter{i] - (1. - fracpos) * pf!ltei(ipos] + fracpos • pfiltertipos + IJ; ) /* design the 2-D filter based on horizontal and vertical magnification */ for (i - 0; i < FLEN; i+-+) { 75(a41) (follcwed by page 75(a42)) 6 7 a 9 o i 2 3 4 6 7 8 9 0 1 2 3 4 6 7 8 9 0 i > 24 12 91 ypos - (I - FLEN / 2) • (PFMAG / VMAG); fcx U - OS i < FLEN; j+O ( xpos - (j - FLEN / 2) * (PFMAG / HMAG); fpos ■ faypotfxpos.ypos); Ipos ■ fpos; fracoos m fooi *» jpQt! If ((ipos ♦ I) » PFLEN) tdfilteifiU) - O4 else tdfilteifiXJl" (>• - fracpos) * pfilteifipos] + frmcpos • pfilteifipos + 1]; ) ) ) rescaleO ( float al, a2, bl, b2; static int irow{220); sutic int kol(220); static noat frow{220]; sutic float fcol[220£ int i. j; int pixel; bl - VMAG / 150.; al - imax - bl * IIO4 b2 - HMAG / 150.; a2 - jmax - b2 • 110.; for (i » 0; i < 220; k+) { frowfi] - al; irow[i] - frowfifc frowlij — irowfi]; fcol(i) - a2; icol[i] - fcolli]; fcolji] — icol[i); al 4- bl; a2 b2; ) for (i - 0; i < 220; i++) for G - 0; j < 220; j++) ( pixel - interp2d(frow[i],fcoltj],irow(i],icol[j]); mark(i + 10J 4 it,pixel); outfi + 10Jj + IS] ■ pixel; ) float ioterp2d(yf,xf,yi,xi) float xf, yf; int xi, yi; 75(a42) (followed by page 75(a43)) 1 2 3 4 6 7 8 9 11 12 13 14 IS 16 17 18 19 21 22 23 24 2 5 26 17 '.8 '.9 to I 1/ 12 13 •4 6 8 >: i 2 3 i 7 1 ) ) 24 1291 ( { /* bilinear interpolation in 2 dimensions for positive x, y */ I* formula courtesy Govind Shalt •/ int iO, il, i2,13; /* neighboring points •/ /* get the four pixels of interest •/ » - inlyilxit 11 - infyilxi + It 12 - in(yi + H« + 1% 13 - in[yi + 11*1]; /* return interpolated value */ returatffloat) (iO + (il •iO)*tf + (13 - 10) • yf ♦ (H) - il + i2 - i3) • xf * yf)); ) AZ 75(a43) (followed by page 75(a44)) 1 2 3 4 6 7 8 9 11 12 !3 14 16 17 18 19 70 21 22 23 24 26 27 28 29 31 32 33 34 16 17 <8 19 i; •2 3 ■4 s 6 7 8 9 0 1 2 J i f 24 1 2 91 TABLE 15 /* Filename: CLOCK.C * Author Donald G. Chandler, PA Technology * bate: October 20,19S7 * Purpose: regenentes the hexagon clock from incomplete hexagon edge * information * Modifications after November IS release: •/ # include <atdio.h> # include <math.h> #define MEMSEG OxaOOO #deflne PI 3.I41S92653S float huge real[256I2S8]; float huge aux[256I258); extern void far fortran r2dfft(); /* provided by Microway, Inc */ extern void far fortran r2diftQ; P use library uns2fft.lib •/ static long far fftrowarg - 8; static long far fftcolarg - 8; sutic float far fftscalearg » 1.0; sutic long far fftdimarg - 258; double filter2S6Q; main(argc,argv) iat argc; char *argv[]; { int i, j; long r, c, 62; .double angle; P Read in the image •/ get256(real); P Form the standard deviation map */ sd256(real,aux); pul256(real); P Window the map */ window256(rea]); put2S6(real); P 2-D FFT the windowed standard deviation map •/ r2dfft(rea]>&fftrowargt&fftcolarg,&ffucalearg,&ff<dimarg); P Remove components of wrong frequency or direction */ angle » filter256(real); 75(a44) (follcwed by page 75(a45)) J 2 •I 7 8 9 0 •i 6 7 8 9 0 J 2 3 4 S 6 7 8 9 0 1 2 3 4 6 •> 9 0 1 2 3 4 • 3 9 9 J ? 1 F 241291 /• Iovene 2-D FFT •/ r2dift<real,&fftrowarg,&fftcoIarg,&ffttcalMrg,& fftdimarg); f* Determine major axis */ majoifreal^ngle); /* convert valleys to peaks •/ for (i - 0; 1 < 256; k+) forO-0; j < 256; J++) if (reatylj) >- 0) realfilj] - O4 ebe realtflj] - -realtflj]; put256(real); sd256(a,b) I* This routine computes the standard deviation map of a 256 x 256 anay */ I* Array a is the input, and output, array b is used as a temp •/ /* This routine computes 3x3 window s.d.*s using the separability trick •/ float huge at256J25S]; float huge b{256I258J; { int i, j; /* square a into b •/ for (i « 0; i < 256; i++) for 0 - 0; j < 256; j4+) bliljj - alilj] • aliljj; I* do the row sums for a and b */ \ for (i - 0; i < 256; i++) for (j - 1; j < 255; j++) C a[ilj - 114- alilJl + a(ilj ♦ I* bfilj - 1] 4- b{iU) + bliU ♦ I* ) /* do the column sums for a and b */ for (i - 0; i « 254; i++) for (j - 1; j < 255; j44) { aU - Hi] 4- aOliJ + aCj 4 111]; b(j - lli] 4— btfli] 4 b{j 4 Hi]; ) f* square a into itself •/ for (i - 0; i < 254; 14+) for 0 - 0; j < 254; j4+) alilj] *- afllj]; /* compute standard deviation •/ for (i - 254; i >- 0; i-) for G - 254; j >- 0; j-) mli 4 1U 4 I] - sqrt((double) ((9. * btfljl - / 72.)); 75(a45) (followed by page 75(a46)) 1 2 3 6 7 8 9 11 £ 14 IS 16 17 18 19 11 12 13 11 IS 16 77 18 19 n 12 13 14 IS 16 % >9 II 12 13 14 % 1:8 19 0 1 2 3 4 24 1291 /• zero out the .edges •/ for (I - 0; i < 256; k+) mtiJO] - «JiI255] - alOlQ - a{255Ii] - O4 ) window256(real) float huge real{2561258]; ( int i, j; float r; /* perform radius based windowing •/ for (i - 1; i < 255; k+) for 0 - I; j < 255; j++) I r - sqrt((double) 0 - 120) • (i - 120) + (j - 128) • G - 128)); if (r > 127.) reaVlj] - O4 else if (r < 22.) realfilj] ~ 0.; else if (r « 30.) reaQiU) •« (r - 22.) / 8; else realpljl •- -54 + .46 • cos(r • 2 * PI / 255); ) get256(array) float huge array{2561258]; ( int row, col; unsigned char far *ip; f* copy pixels from screen to memory •/ sp - (unsigned char far*) (OxlOOOQL * MEMSEG); for (row - 0; row < 240; row++) for (col « 0; col < 256; col++) arrayfrowlcol) - *»p++; for (row - 240; row < 256; row++) for (col • 0; col < 256; coI-m-) amy[rowIco!] - 0^ put256(amy) float huge arr«y[256I258]; ( 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++) 75 (a46) (followed by page 75(a47)) 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 70 21 12 23 24 26 27 28 2 9 Bl J 2 S3 34 S5 I >7 38 39 to 11 12 13 14 f f16 17 18 <9 ;o :1 >2 <3 <4 ■5 / 241291 IT (arrayfrowjcol] > mu) max ■ amyfrowlcol]; scale « 63.999 / max; /* copy to »own */ 9 » (assigned char far*) (OxlOOOOL * MEMSEG); for (raw - 0; row < 256; mm) for (col - 0; col < 256; cok-t) •»p++ - scale * amytrowlcol]; putmag256(complex) float hnge complex{256I129I2]; { int mrow. row. col; unsigned char far *sp; float max. scale; float r2; /• autoscale •/ max - I.e-10; for (row - 0; row < 256; row++) for (col ■ 0; col < 129; coI++) If ((r2 - (complex[rowlco!10]• complex(rowlcoll0] + complex[rowlcolIl] * comptex[rowlcolll])) > max) max - r2; scale - 63.999 / sqrt(max); /• copy to screen •/ sp - (unsigned char far*) (OxlOOOOL * MEMSEG); for (mrow - 0; mrow < 256; mrow++) { row - (128 + mrow) % 256; for (col - 0; col < 129; col-H) { sp - (unsigned char far*) ((MEMSEG • OxlOOOOL) + ((long) mrow « 8) + col); •sp - scale * sqrt(complex[rowlcolI0] * compIexfrowIcolIO] + complex[rowlcolll] * complex[rowIcolI 1 ]); ) ) double filter256(complex) float huge compIex[256I129l2]; ( Int i. xm, j. jl; double angle, slope; double lowO, highO; -double low], highl; double low2, high2; double max; double r2; int nnax, cmax; «• 75 (a47) (followed by page 75(a48)) 1 2 3 4 6 7 8 9 JJ 12 13 J4 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 36 37 38 39 to 41 i2 i3 (4 16 17 18 19 il !2 13 •4 241291 putmag256(complex); /• remove the low frequency components */ for (i - 0; I < 45; I++) ( jl -.5+sqr<4S.*4S.-i*i); for (j - 0; j < jj; j*+) complexfiTilO] ■ coookxIiTiTl] ■ complex[(256 - 1) % 256UI0] - complex((256 - i) % 2561)1»] - O4 ) putmag256(coinplex); /• remove the high frequency components •/ for ( i - 0; i < 129; in) ( if (i < 80) jl - JS + tqrt(SO. • gO. - I • i); else jl - 0; far(J-Jl; J«S2*j«*) compIexfiUIO] - comp!ex[l|JXl] - complex[(256 - i) % 256UI0] - coznplexI(2S6 - i) % 256JHI] - 04 ) putnug256(complex); /* find bright point to determine minor axis orientation •/ max - Ijb-10; for (i - 0; i < 80; i++) for (j » 0; j < 80; j++) ( *2 - complex[tUl01 * complexflUlOl + complexfiljl]] * compk^lillt if (r2 > max) ( max » r2; rmax - i; ctnax - j; ) ) /* printf(B\n(rmax,anax) - (%d,%d)Vmax,cmax)^/ angle - atan2((double) nnax,(double) cmax); (* compute upper and lower bound of slopes for directional filters */ lowO - t»n(angte - PI /18.); lowl » tan(angle - PI / It. ♦ PI / 3.); low2 « t»n(angle - PI / It. + PI / ISk highO - tan(ang1e + W/ 18.); highl - tan(angle ♦ M / 18. * PI / 3.fc high2 - + VI / 18. ♦ PI / UX r printf("\nangle - %f; (Iow0,hlgh0) - (%f.%Q; (low 1 .high 1) - (%f.%f); (low2,Mgh2) - (%f,%ir, angleJowOJ>lghOllowlJiigblJow2thigh2X */ /* perform directional filtering */ for (im ■ -80; im < 80; im++) for (j » 0; j < gO; j++) 75(a48) (followed by page 75{a49)) 1 2 3 4 6 7 8 9 0 J 2 3 4 6 7 8 9 0 1 2 3 4 S 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 4 241291 ( 1 • (256 ♦ Im) % 256; if (j) slope - (doable) (Im) / (doable) (j); else slope - I.elO; if (highO < lowO) ( If (((slope < InwO) fti (dope > highO)) St£ ((slope < low!) | (slope > highl)) && ((slope < low2) | (slope > high2))) complex[iIjKO] ■ complexpUll] ■ O4 ) else If (kifhl < lowl) ( if (((slope < *»w0) | (slope > highO)) && ((slope < lowl) Ait (slope > highl)) 8t8t ' ((slope < low2) | (slope > higb2))) eomplex[ilJlO] » complex(iljIl) - O4 ) else if (bigh2 < low2) ( if (((slope < lowO) | (slope > highO)) A& ((slope < lowl) I (slope . iighl)) ScJt ((slope < low2) &&. (slope > bigh2))) compIextilJIO] - complex{ilj^l] . 0.; ) else if (((slope < lowO) | (slope * highO)) && ((slope < lowl) | (slope > highl)) && ((slope < low2) | (slope > high2))) complcxtiUIO]. comptexliljll] - 0.; ) putmag2S6(eompIex); return(tngle); ) majorfreal, angle) float huge real[256I2S8]; double angle; ( int trial; int i, j. jl, j2; int ix, iy; int t; double tangle, cangle, maxangle; double z, y, dx, dy; double maxsum, cam; /* perfonn three trials to determine major axis orientation •/ fumiiin m 0^ for (trial - 0; trial < 3; trial++) ( tangle ■ angle ♦ trial • PI / 3.; I* draw In the lines •/ for (i ■» 0; I < 4; h+) 75(a49) (followed by page 75(a50)) 1 2 3 * 6 7 8 9 0 1 2 '3 4 7 8 9 0 h >: 24 1 2 91 ( l* compote direction to a corner •/ cangle - tangle + FI/4. + i*PI/2; /* compote z and y coordinates of a corner */ x ■ I2t. 4106.066 * cos(cangle); y - 120. + 106X66 • sin(cangle); /* compote heading towards next corner */ cangle — .75 • PI; /* compote x and y Increment values •/ dx ■ coe(otngle) / 2^ dy - »ln(cangle) / 24 for (t - 0;« < 300; frw) ( ix - x * J5; ly - y + J; m*rk(iy,i*,I27 4 64 * trial); if (real[iy][ix] < 1x2) rea^iyfix] 4- 2^2; x 4- dx; y 4- dy; ) ) I* torn the absolute values of points in bounded area of real •/ sum - 0^ for 0 - 12; I < 22*; tw-) ( f* scan for leftmost boundary */ for (j - 20; j < 236; j44) • if (reaQilJ] > 1x2) (raalfflU] — 2x2; break;) \ f* scan for rightmost boundary •/ for (jl ■ 235; jl j; jl—) if (reaQifjl] > 1x2) {reagiljl) — 2x2; break;) for02-j;j2<- jl;j24+) { if (resQiIj2] > 1x2) real(i]j2] —2x2; sum 4- fabs((doubIe) reaQiIj2]); ) ) /* printf(*\nTriiI %d at angle %f has sum - %f",trial,tangle^um); •/ if (sum > maxsum) ( mamnn • ram; maxangle ■ tingle; ) ) printfC%lf*.miT»ngle); ) int mark(row,col,valoe) /• Marks a point on the screen and returns the existing value */ int row, col, value; ( unsigned char far *sp; int pixel; 75(a50) (follcwed by page 75(a51)) 0 1 2 3 4 S 6 7 8 9 0 J 2 3 4 6 7 8 9 0 I 2 3 4 S 7 S ? 1 I > » t i i i ( i I I 24 1291 f"*) WMEMSEG * OxlOOOOL) + ((long) row « 8) ♦ coly. •«p- value; rcturo(pixe]); A2 75(a51) (follcwod by page 75(a52)) 1 2 3 4 6 7 a 9 II 12 !3 14 IS 16 17 18 19 '.0 \1 12 !3 !4 IS '.6 '.7 •8 !9 tl 12 13 14 'J •■6 ■7 •8 9 •o 1 2 3 4 6 7 8 9 0 1 2 3 4 241291 > T A B L E 16 /* Filename SEARCH.C * Author Donald G. Chandler, PA Technology * Date: October 27, 1987 * Purpose: Combines information from the clock regeneration and the * hexagon image * • Modifications after November IS release: V * SEARCH should be compiled with MCCC •/ # include <stdio.h> # include <stdlibJi> #include <fcntUi> #include <sys\types.h> #include <sys\stat.h> #include <lo.h> #ioclude <math.h> #include <\ups\density2\dt2803Jt> #define PI 3. U15926535 int cva%3SI32£ Int ival[3SI32]; int jval(35I32]; Int gv>Q3SI32K int gvalinv[35I32]; Int diffl3SI31); unsigned char far ck[240I256); unsigned char far grey(240I256]; static Int rpliu{6]; static int cplusl6]; main(*rgc,argv) Int argc; char *ttgvfl; C Int max; inti,* int flag; Int imax, jmax; int mie; double theta; I* compute the appropriate relative search directions and locations based on the major axis angle */ printf(*\nEnter the major axis angle: "); 75(a52) IMllcwed by page 75(a53)) 241291 7 8 9 '0 •I •2 '3 •4 '5 6 7 ■8 •9 '0 ■2 •■3 '4 '.6 !7 •8 •J !2 13 14 V 16 7 •1 2 J '4 5 '6 7 8 9 0 1 2 3 4 scanff %If ".Jttheta); theta « PI / 2. ♦ theta; /* angle Input Is perpendicular to axis •/ direction^ theta); f* get the clock array */ getjcreen(ck); I* get the grey array */ ifile - open(ngvIJ ],0_RDONLY | O BINARY); /* open the file •/ re*d(inic,OxlOOOOL • MEMSEG,61440); /* read it directly onto screen •/ getscreen(grey); /* initialize the search arrays cval, gvsl, ival, and jval */ inltsearch(theta); [* main search loop */ loop: max ■ -1; flag ■ 1; /• learch for largest clock value on grid */ J* also check if entire grid is populated •/ for (i - 0; i < 35; i++) for Q - 0; j < 32; j++) < if (cval[ilj] — 0) flag - 0; if (cvallilj] > max) ( max m cvatyilife imax » i; jmax- j; ) ) If (flag) goto fullgrld; cval{ imax {j max] - -cvallimaxjjmax]; /* printf("\nOn grid (imaxjmax) - (%d,%d) located at imaxjmax^val(imaxljmax]jval(imaxljmax]); */ j* insert clock, grey, and (ij) values of any neighbors not previously inserted */ lnsert(imaxJmaxX /• loop*/ goto loop; fullgrid: histogramO; pristout(); coarsegridO; inserKU) tall.* C static int iplus{6] ■ (0,-1,-1,0,1,1); 75(a53) (followed by page 75(a54)) 24 1291 static Int oddjpIus[6] - (1,0,-1,-1,-1,0); static int evenjplus[6] - (1,1,0,-1,0,1); Int pos; int ip, jp; int r, e; • int rl, cl; int max; Int march, csearch; /* searches ■ hexagons neighbors •/ r if ((i 4 j) ft 1) mark(iv*]JiU]jv*l{iIj),GREEN); else mark(ivalliIj]jvt]{iIj],RED); •/ ip - ivalfiljK jp- JvaliUk mark(ipjp,GREEN); /* check for condiUons which terminate Iteration */ for (pos « 0; pos < 6; pos+4) ( ip - i + iplus(pos£ if (i ft 1) jp » j ♦ oddjplus[pos]; else jp - j + evenjp!us[pos£ if (ip > 34) continue; if (ip c 0) continue; if (jP > 31) continue;' if (jP < 0) continue; if (cvalfipljp] — 0) { /* compute expected position of neighbor */ r - rplus[pos] 4 Ival[i][j); c - cp!us(pos] 4 jval(ilj]; /* do first step of gradient search •/ rl ■ r; cl - c; max * 0; /• prifltl'(*\nStart search for pos - %d at (%d,%d) - %d"tpos,r,c,ck[r][c]);V for (nearch - r - 1; nearch o»r + l; isearch44) for (csearch « c - 1; csearch <■ c + 1; csearch44) if (ck(rsearchlcsearch] > max) ( max « ckfrsearchlcsearch); rl " nearch; cl - csearch; ) f* do second step of gradient search */ r - rl; c » cl; /* printf("\oBest step 1 for pos - %d is (%d,%d) - %da,pos,r,c,ck[rIcD;*/ for (nearch • rl - 1; nearch <- rl 4 I; rsearch+4) for (csearch - cl - I; csearch <• cl + 1; cscarch++) if (ck(nearchlcsearch] > max) ( max - ck[rsearchlcsearch); 75(a54) (followed by page 75(a55)) J 2 3 4 6 7 a 9 n 12 13 14 16 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 37 18 39 iO 41 12 13 (4 16 17 18 19 iO >1 12 f 3 14 i5 \ 2 4 1 2 91 r - nearch; c - csearch; ) I9 printff\nBest step 2 for pos - %d, grid(%d,%d) Is (%d,%d) - %d\ pos.ipjp.r.c.cktrlcl); •/ f* update cveI, jval, Ival, and jval •/ cvalliplip] - I + I • ckfrlc] - (ckfr - He - 1] + cktr - He] + ck[r - lie + 1] + ckfrjc - 1] + ckfrlc + I] ♦ ck[r + Ifc - 1] + ek[r + lie] + ck[r + l]c + 1]); iva^ipljp] - n jval{»pljp] - c; gvaltfpljp] - greyfrlc]; ) ) ) histogramO { int i. j; lot min, low, high; static int bin[64]; I* create grey level histogram of gval entries */ for (I - 0; i < 35; i++) for G - 0; j < 32; j++) bin[gvaltiU]}++; /• plot •/ for (i - 0; i < 64; 1++) ( printff\n%2d: \i); for G - 0; j < bin[i] / 2; j++) printfC*"); ) I* determine slicing levels */ min - 10000; for (i - 10; i < 32; i++) if (bin[i] < min) ( min - binji}; low ■ i; ) min - 10000; for (I - 32; I < 54; i++) if (bin[i] < min) < min ■ binfi]: high - I; ) /• slice •/ for (i - 0; I < 35; 1++) 75 (a55) (follcwed by page 75(a56)) 1 2 3 4 6 7 8 9 U 12 13 14 IS 16 17 18 19 11 12 13 U 16 17 18 >9 U 12 13 14 16 17 18 19 11 <2 '3 14 'J '6 >7 18 '9 ■0 1 2 3 4 24 1 291 . for (j •» 0; j < 32; j*+) if (tvtUlU] <- low) ( nurk(iv*qittljv*l[ilj],GREEN); gvalMM-0; ) else If (gvsgijj] <m Ugh) { «a*rk(iv»Hi|jljv*l[iIjJ,RED); gwliiU) - 1; ) •be { mix BLUE); *v»ltiljl - 2; ) printout) ( iat i. j; static char bgwstriogl] » "BGW"; printf(*\n\ngrey values"); for (i - 0; i < 35; h+) C printf(*\n%2d.-\l); for 0 - 0; j < 32; j++) printf("%c *,bgwstrtng[gval[iIj]D; ) /* printfC\n\ol values'); for (i - 0; i < 35; *♦+) ( printf(*\n%2d;,,i); for (j • 0; j < 32; j++) printff %3d-,ivtl(i|jl); ) priatf(*\n\nj values"); for (i« 0; i < 35; i+f) ( printf("\n%2<fc%i); for 0 « 0; j < 32; j++) priatfC Jvaljili}); ) V ) iaitsearcMtbeta) double theta; t Int i. j. k. I; Int sum; int max, imax, jtnax; double ftmax, fjmax, rmax, thetamax; 75(a56) (folic*, ad by page 75(a57)) • J 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 18 19 SO >1 >2 >3 \4 i 5 24 1291 lot isert, jsert; /* iuid location or largest point near center */ bu - 0; for (i - 96; i < 144; i++) for 0 - 104; j < 152; j++) ( stun - 0; for (1c - -1; k <- 1; k++) for (I —1; I <- 1; h+) If (k 11) sum — ckji + kjj + IJ else sum +- S * ck[i + k|j + It If (sum > max) ( max - sum; imax - i; jmax - j; ) ) priatf("\nOn screen (imaxjmax) - (%d,%d)a,imax,jmax); /* compute approximate position on grid */ f* start by converting max location to polar relative to major axis •/ fimax - imax - 1204 fjmax - jmax - 12S4 rmax » sqrt(finxax * fimax + fjmax * fjmax); thetamax - theta - atan2(fimax,fjmax); isert - 17.5 + rmax * sin(thetamax) / 4.5; jsert • 16. 4 rmax * cos( thetamax) / 5.0; printf("\ntheta - %f, rmax ■ %f, thetamax - %f",theta,rmax,thetamax); printffXninserting into grid at (IJ) « (%d,%d)\isert,jsert); /* insert clock, grey, and (i J) values •/ cva)(isertljsert] - max; gvalfisertljsert] - greytimaxjjmax]; iva![isertljsert)» imax; ' jvalfisertljsert] - jmax; direction^ theta) double theta; ( f* determine expected relative positions of neighbor hexagons •/ rplus[0] - 5.0 * sin(theu); cplus[0] - 5.0 * cos(theu); rplusfl] - 5.0 • sln(theta + PI / 3.); cplusfl] » 5.0 * cos(theta ♦ PI / 3.); rplus[2} - 5.0 • ain(theta + PI / 1.5); cplus{2] - 5.0 * cos(theta + PI / IJ); rplus[3] - -rplus{0t cplus(3] - -cplusfO], rplus{4] - -rplusl? J; cplus(4] - -cplu^lt rplus(5] - -rplus{2t cplus[5] - ~cpius[2t 75(a57) (follcwed by page 75(a58)) 1 2 3 4 6 7 O 9 >0 '] •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 7 » ? > f > 'r i i 2 4 1291 coarsegridQ { iat i. j. k, ft Int mix, imax, jmax; iat sum; int inverse; FILE 'stream; static char bgwQ <* "BGV; /* test for initial row detennination off by one either way •/ fixrow(); /• genermte left/right difference map for right side up read •/ for (i - 0; i < 35; i++) for (j - 0; j < 31; j++) if (gval[ilj]!- gval[ilj + 11) diff]ilj] - 1; else difflilj] - 0; max - -1; inverse - 0; for (i» -1; i <■ 1; i++) for (j - -1; j <- I; j++) { sum - 0; for (k - 1; k <- 31; k +- 3) for 0 - I;»<- 28; 1 +- 3) sum +- difft* + klj + 1] + dlff|i ♦ klj + 1 + 1]; if (sum > max) ( imax - 1; jmax - j; max - sum; ) printfC\nright side up (ij) - (9bd,%d); sum - %d; max ■» %d;\ ij^um.max); ) /• generate up side down grey value map •/ for (2 - 0; i < 35; i++) if (i ft 1) for (j - 0; j < 32; j++) gvalinv(34 - ipi - j] - gval(ilj]; else for (j ■ 0; j < 31; j++) gvalinv[34 - II30 - j] - gvaQilj); /* generate left/right difference map for upside down read */ for (i - 0; i < 35; i++) for (j <■ 0; j < 31; j+f) if (gvaUnv(iIj] I- gvalinvtflj + 1]) difflilj] - 1; else diff[ilj] *0; for (I - -1; i <- 1; I++) 75(a58) (followed by page 75(a59)) 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 4 7 S 0 t > 1 t » 241291 t "• for (j - -1; j 1; j++) ( sum « 0; for (k - I; k <- 31; k •*« 3) for (1 - 1; 1 <- 28; 1 -h- 3) sum *- diffti + kli + IJ ♦ diflli ♦ klj + 1 + Ifc if (sun > max) ( imax ■ i; jmax-j; max - sum; inverse - 1; ) printf(*\nupside down (i J) - (%d,%d); sum - %d; max -ij,sum,max); ) stream - fopenfrdlabeljnVw"); for (i - 33 + imax; i >- 1 + imax; i—) ( for (j - 1 + jmax; j < 31 + jmax; j++) if (inverse) fputc(bgnf8valiii\ii|j]] .stream); ebe fputc(bgw(gvil(i][j]]tstreain); fputcf\n*,stream); J flxrowO ( int i, j, be*trow; double min; double sumx, sumy, sumxx. sumxy; double a, b, m, p, yt min - 1x10; for (i - 16; i <- 18; i++) ( lumx - sumy •» sumxy - sumxx - 0^ for (j - 5; j 10; j-M-) ( lumx +- jval[ilj]; sumy +- IvaHiUl; sumxy +- iva^ilj] • jval[i]UJ; sumxx +- jval[ilj] • jvsltflj]; sumx +- jval(il31 - jl sumy -*«• ival[iI31 - j]; sumxy ival(iI31 - j] • jvslfipl - jt sumxx -t- jval[iI31 - j] * jval[iI31 - jj; ) p - 12. * sumxy - sumx * sumy; m - 12. * sumxx - sumx * sumx; a - p / m; b - (m • sumy - p • sumx) / (12. * m); y ■ a • 128. + b; 75(a59) (follcwed by page 75(a60)) 1 2 3 4 6 7 8 9 JO Jl 12 13 14 16 17 18 19 21 72 23 24 26 27 28 29 31 32 33 34 36 37 38 39 to il 12 i3 U 16 (7 18 19 50 i/ (2 ij \4 "printf("\nRow - %d; y - %lf;"J,y); if (fab*(y - 120.) < min) { bestrow - i; min - fabs(y - 120.); ) ) switch (bestrow) ( case 16 for (i ■ 32; i » 0; i—) if (i A 1) for (j - 32; j >« j; j—) gvtHi + llj - 1] - gva^iUt else for (j - 0". j < 32; j++) «villi + llj) - gvTdfiUl break; case 18: for (i - 2; i <- 34; i++) if (i A 1) for (i - 32; j >- 1; j-) gvafli - llj - 1] - gvalpjj]; ebe for G - 0; j < 32; j++) gvaltf - llj] - gvaHilj]; break; case 17: break; default: printf("\nFittl error ia fizrow"); exit(l); ) ) 241291 ) t \ 75(a60) (followed by page 75(a61)) 24 1 ( TABLE 17 /*RdLabeLc Govlnd Shah 10/27/87 Reads RDLABEL.IN generated by image processing software, and generates a binary bit stream, output to ERRDECJN.
Selects a 3x3 cell, picked in the sequence specified by ordenLUT, and uses CellDec to convert 3 level hex data into biu. CellDec in turn uses Regiocs.LUT to discard information for disallowed bexes.
V #include <ioJi> #include <sys\typesJi> #include <sys\s»th> •include <fcntLh> #include <stdio.h> •include <stdlib.h> •include <time.h> •include <conioJ» •include <mathJi> •include <\ups\code\labeLh> int RegionMapfkRegionRowsIkRegionCOls); int BinData(kNoBitt]; main(argc.argv) int argc; char *«rgvQ; ( iat {.AvailableRegions; int Res.Row.COl.CellNo; iat BiuConverted; sutic int LUTOrder[l 10J2]; sutic int Histo{M]; sutic int oFile,iFiIe,NoErrors; sutic char Line[30£ FILE 'stream; char OutChar; InitCellDec(); iFile - openforderJuf.O RDONLY I 0_BINARY^_1READ); re*d(iFile,LUTOrder,440); close(iFile); AvailableRegions - LoadRegionMap(RegionMap); /•Get region map from data file •/ stream - fopenfrdlabel-inVr"); for (Row«>32;Row>"0;Row--) < fscaaf(stream," %30s ".Line); 291 75(a61) (follcv<ed by page 75(a62)) 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 6 7 8 >: i 2 3 4 7 J ? f > 1 f i 24 1291 for(Col-0;Col<30;Col++) { if (RegionMap[RowICol] «-2) switch (Line(Col]) ( esse "W*: RegJonMatfRowICol] - 0;break; case 'G*: RegionMap[RowICol] - l;break; case 'B': RegionMapfRowlCol] - 2;brcak; default: RegionMap{RowICol] - 3; J ) ) /* generate binary bit stream */ BitsConverted - 0; for (CeUNo-0;CeliNo<110;CellNw-f) { i - CcllDec(BitsConverted,LUTOrder(CellNo$0]lLUTOrder[CellNoXlD; BitsConverted +- i; Histo{i}++; printf("\nBits converted.*%d %d",i,BitsConverted); } printf(*\nBits decoded;%d",Bits Converted); prictf(*\nDistribution;"); for (i-0;i<l4;i++) printf("%±%d •,i,Histo[i]); stream » fopen("ErrPec.In","wb"); for (»~0;i<kNoBits;i++) fputc(BinData[i],stream); 75(a62) (followed by page 75(a63)) \ \ 1 2 3 4 6 7 8 9 11 12 13 14 16 17 18 19 21 72 23 24 26 27 28 >9 iO 11 12 13 14 >6 17 13 19 II 12 13 14 IS >6 '7 •8 •9 0 1 2 3 4 241291 TABLE 1 8 /•CcllDec.c Govind Shah 10/26/87 Converts 3 level data for available bexes In the indicated 3x3 cell into binary bits stored into BinData bitstreau. 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 HexBinXUT generated by MkHexLUT. frV Number of bits used is a function of the number of hexes available in the indicated cell (See Page 28 lab book).
V #include <ioJ» # include <sys\types.h> #include <jyi\itat-h> #inc!ude <fcntLh> #include <stdioJ» #include <stdlit>.h> #include <time J»> #include <conio.h> ^include <mathJ» #include <\ups\code\label.h> int iFile; int LUTHexBin[2187J,LUTHB23[9J; extern int RegionMap{kRegionRowsIkRegionCoIs]; extern int BinData[1500]; InitCellDecO ( iFile - 0pcn("He*BinXUT,0_RD0NLY10_BINARY); read (iFile,LUTHe*Bin,sizeof(LUTHexBln)); read (iFilc,LUTHB23,ilxeof(LUTHB23)); close(iFile); ) /^——I—PM—B—I———Mf——■■■■■■■■■■ — int CellDec(Index.CellRow,CeliCol) /•Returns number of bits generated from hexes*/ int Lnde* .C;llRow,CellCol; ( int RowOffset,GolOffset,iJ,AvailableHexes,HexVa]ue,Bin Value; int Ce!llndex,Weight,FUedHexes,flits Converted,RawRow.RawCol; RowOffset - CeURow*3; ColOffset - CeIICol*3; /•Find the number of allowed hexes */ 75 (a63) (followed by page 75(a64)) • 1 2 3 4 6 7 8 9 '0 •] '2 •3 ■4 6 7 8 '9 •0 •1 •2 •3 '4 U \6 7 :« •9 ■0 1 ■2 >3 •■4 ■5 ■6 7 8 V 0 1 2 3 4 6 7 8 9 0 1 2 3 4 241291 AvailableHexes ■ 0; for (i—0;i<3;i-H-) for(i-0J<3J++) if (RegionMap{RowOffset + ilColOffset ♦ jj ■«- 2) AvailableHexes++; w—■—wii^ tJLL CELL CASE if (AvailableHexes «■ 9) ( HexValue « ReglonMapfRowOffsetIColOffset+1]; for (i-5;i>-0;i—) ( RawRow - RowOffset + (2-1/3); RawCol - ColOffset + (i%3X HexValue - HexValue*3 + RegionMartRawRowJRawCol]; ) BinValue - LUTHexBin(HexValue]; /* printf("\nHex VaJue.-%d Bin Value:%d",HexValue,Bin Value); V Index +- 11; for (i-0;i<J 1;1++) ( BinData[—Index] <■ BinValue A 1; BinValue »- 1; ) Index 4« 11; BinData(Index<H-] - ((RegionMap{RowOffset)[ColOffset] + 2 - RegionMap{RowOffset](ColOffset+l ]) % 3) & i; BinData[Index++] - ((RegionMap{RowOffsetIColOffset+2] + 2- RegionMap{RowOffset][ColOffset+] ]) % 3) & i; ' return(13); )/* Full cells completed •/ WMWMWBW1W—W— Celllndex - 0; FixedHexes - 0; BitsConverted - 0; Weight - 1; if (AvailableHexes >- 7) I HexValue - 0; while (FixedHexes < 7) ( RawRow - RowOffset + (2-CelUndex/3); RawCol « ColOffset + (C*lllndex%3); if (RegionMap(RawRowIRawCoi] <- 2) ( HexValue +- Weight*RegionMap{RawRowIRawCol]; FixedHexe*++; Weight *- 3; 75(a64) (followed by page 75(a65)) • J 2 3 4 6 7 8 9 tl 12 13 U \6 <7 >8 >9 \0 11 \2 >3 \4 LS '.6 17 !S !9 11 12 13 14 '■5 '6 •7 •8 •9 •0 1 ■2 3 •4 6 7 8 9 0 1 2 3 4 24 1291 » * ) Celllndex++; ) BinValue - LUTHexB inTHexValuet /• printf(-\nHex Value*bd Bio YaJue3fcd\HexValue.Bin Value); */ Index +- 11; for (i-0;i<l l;i++) I \ BinData(—lodex] * BinValue A 1; BinValue »- 1; ) Index 4<11; ' AvailableHexes -• 7; BitsConverted - 11; ) /•Convert 3 bits into hex pairs using LITTHB32 */ while (AvailableHexes > 1) ( HexValue - 0; FixedHexes - 0; Weight» 1; while (FixedHexes < 2) { RawRow - RowOffset + (2-Celllndex/3); RawCol - ColOffset + (Celllndex%3); if (RegionMapfRawRowIRawCol] <- 2) ( HexValue - HexValue + Weigh t*RegionMap[RawRow][RawCoI]; FixedHexes++; Weight •- 3; > Celllndex++; ) BinYalue - LUTHB23[Hex Value]; BinDatapndex++] - (BinValue » 2) Sc. 1; BinData[Index-H-] - (BinValue » 1) St 1; BicData[Iadex++] - BinValue A 0x1; AvailableHsses — 2; BitsConvert&l +- 3; ) /•Covert the remaining hex, if at all •/ if (AvailableHexes — 1) ( FixedHexes - 0; while (FixedHexes < 1) ( RawRow - RowOffset + (2-CellIndex/3); RawCol - ColOffset + (CelHndex%3); if (RegionMap[RawRowIRawCoI] <» 2) ( 75(a65) (followed by page 75(a66)) 1 2 3 4 6 7 8 9 >0 <1 12 13 14 !5 16 17 18 19 L0 a 12 23 24 26 17 18 19 W M ?2 13 i4 JJ 16 17 IS 19 11 <2 13 14 '■5 >7 '■8 ■9 0 1 2 3 4 Ik 1,2 91 BinData[lndex++] - ReglonMap(RawRowIRawCo1J » 1; FixedKexes-H-; ) CelUndex-H-; ) BitsConverted++; ) retura (BitsConverted); ) 75(a66) (followed by page 75(a67)) 24 1291 TABLE 19 /• ErrDec.c Govind Shah /28/17 Program to decode for nror correction Reads bit stream gcaetated by RdLabel from file ERRDEC.IN; Output error corrected bitstream Into TEXTOUTJN.
For error decoding algorithm, ReHPage 16 - 26 of Lab book. •/ #include <k>.h> #include <syi\types.h» #include <sys\stat.h> #include <fcntLh> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <conio.h> #include <\ups\code\gf.h> extern unsigned char Horner(unsigned char,unsigned char *,int,int); main{) ( unsigned char RawDataO[klQfoSymbolsO+2*ktO],RawDate 1 [klnfoSymbols 1 +2*kt IJ; unsigned char 'pCurrSym,Temp; int ij.oFile.iFile.ErrCnt; FILE 'stream; unsigoed char NoErrorsO,NoErrorsl; InitGFO; stream - fopenfErrDecJnVrb"); pCurrSym - &RawDau0(kLabelSyms0-l]; for (i»0;i<kLabelSyms0;i-H-) ( •pCurrSym - fgetc(streamX for 0-1 J<6;j+-0 •pCurrSym |« < fgetc(stream) «j); pCurrSym--; 1 pCurrSym - &RawDaul[kLabelSynul-l]; for (i«0;i<kLabelSymsI;i+f) { •pCurrSym - fgetcfrtream); for *pCurrSym |- ( fgetc(stream) « j); pCurrSym--; ) fclose(stream); 75(a67) (followed by page 75(a68)) 1 2 3 4 6 7 8 9 0 1 2 3 4 A 6 7 8 9 0 1 2 3 4 0 7 8 9 0 I 2 3 4 7 S 9 0 I 2 3 i 7 y j ) i i } r i 24 1291 NoErionO - ErrDec(0,RawData0); NoErrorsl - ErTDcc(l,R*wI>atal); printf("\nHPM crrorc%d LPM Errors %d\NoErTorsO,NoErrorsl); oFile - 0penCText0uUn',O_WRONLY | OjCREAT | OJTRUNC | 0__BINARYtS_IWlUTE); write(oFila, &RawDataO(2*ktO],kInfoSyn)bolsO); write(oFile, &KawDatal[2*ktl],kInfoSymboUl); wri»e(oFile,&NoEiTOr*0,l}; wrrite(oFile>&NoErronl, 1); close(oFiJe); ) /*• lot ErrDec(Field,RawDaW) unsigned char Field; unsigned char RawDataft { unsigned char •RawDataP,*SynP,*BP,*LambdaP,*TP; unsigned char Delu<Delulnv,t,B{ktl+l]>Lsmbda[ktl+l]>Syn[2*ktl+l),Tlkt)+l]; int TwoT,i,L,r,MsgCount,SynNo; int nJ.ELPDegree.KoRoots; unsigned char Result,ErrLoc[ktl],Omega[2*ktl],EiTMag,ErrNo; Int Synlndex.Lsmbdalndex; if (Field — 0) ( t • ktO; n - knO; TwoT - 2*kt0; MsgCount - klnfoSymbolsO + TwoT; - ) else ( t - ktl; n » kol; TwoT - 2*ktl; MsgCount - klnfoSymbolsl + TwoT; ) /♦ /* Compute the syndromes using Horner's rule */ SynP - &Syn[l$ for (SynNo - IjSynNo <» TwoT; SynNo++) ( •SynlP++ - Horner(Field,RawData,MsgCount,SynNo); RawDauP - 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)) • 1 2 3 4 6 7 8 9 to 11 \2 '3 14 <6 >7 !8 •9 '.0 <2 •3 !4 'S \6 \7 !S !9 M 12 '5 '■4 •5 ■6 ■7 •8 9 0 1 2 3 4 6 7 8 9 0 1 2 3 4 2412 91 SynP++; •••••••••**••*«••••*»•I }/* All (2t) syndromes computed •/ printf("\n Syndromes :\n"); for (i-l;i<-TwoT;i++) priotf ("%u.-%u ",i,Synli]); r •/ f* Generate error locating polynomial •/ J* Inifialiie */ LambdaP - Lambda; BP - B; TP - T; •LambdaP++ ■ 1; •BP-h- - I; •TP++ - 1; for (i-l;i<-t;i++) *LambdiP++ - *BP++ * *TP++ - 0; L-0; for (r-1 ;r<-TwoT;r++) ( Delu - 0; !* Compute delta */ for (i-0;i<-L;i++) Delu GFMul(Field,Syn[r-i),Lambda(i]); if (DelU —0) { for (i-t;i>0;i--)BIil - B[i-1]; B[0J - 0; ) else I for (i»l;i<-t;i++) HI] - Lambda(i] * GFMul(Field,Delu,B[i-l]); if (2*L < r) f* Shift register to be lengthened 7 */ ( Delulnv » GFlnverse(Field,Delu); for (i-0;i<-t;i++) ( B{i] - GFMul(FieId,DeItaInvtLambda[i]); Lambda(i] - T|iJ; ) L - r - L; ) else /*shift register length OK •/ i tot (i——) { Bli] - Bti-lt Lambda(i] - Hit ) BIO] - 0; 75(a69) (followed by page 75(a70)) 24 12 91 LunbdagO] - T[0); ) J /* Display the state */ r printfC\n\an%d Delta&d L.-%d\r,Delta,L); printf("\n Ti*); for (i-0;i<-t;M printf (*%3u • TjiDs printf("\n &•); for (i-0;l<-t^++) printf (*%3u *,B{i]); Drintff*\nLambda^k for (i-0;i<-t;i++) printf ("%3u \Lambda[i}); */ )/* Error Locator Polynomial computed •/ /* printfC^nLambda.-*); for t;i-t-»-) printf ("%3u ",Lambda[i]>; •/ /* */ /* Compute the degree of the ELP */ ELPDegree «• t; while ((Lambda(ELPDrgree] — 0) StSt (ELPDegree > 0)) ELPDegree—; /*prlntf("\nELP ELPDegree:%d",ELPDegree); V if (ELPDegree !- L) ( /* printf("\nToo many errors (L - %d, ELP ELPDegret - %d)",L,ELPDegree); •/ ELPDegree - l+l; ) /* Find the ELP roots •/ if ((ELPDegree>0) SlSl (ELPDegreeot)) I NoRoots - 0; for (i-n;i>0;i--) ( /* Check if Alpha**! is a root of the ELP */ Result« 0; for G-ELPDegreeJ>-0"J—) Result - GFMuIlndEle(Field,i,Result) A Lambda[j]; if (Result — 0) ErrLoc(NoRoots-M-] » n-i; if (Horner(F»eld,Lanibda,ELPDegree+lti)-» 0) EirLoc[NoRoot$-t-t] ■ n-i; ) /*AU location checked for being roots*/ /* printf(*\n Detected %d roots*,NoRoots); •/ if (NoRoots — ELPDegree) for (j-0J<NoRoots;j++) { /* RawData[ErrLoc{j]] - Oxde; 75(a70) (follcwed by page 75(a71)) 1 2 3 4 6 7 8 9 11 12 13 14 IS 16 17 18 19 70 11 72 23 14 IS 16 27 28 19 il 12 13 14 IS 16 17 18 19 tl 12 13 t4 IS 16 17 «5 19 i 0 :1 :2 ■>3 ■4 24 1291 printf (*%d \ErrLoeUD; V ) else ELPDegree - t+1; ) /•Correctable error locations found */ if (ELPDegree > t) return 99; /•— —-—— —— V /* Compute error magnitudes (ref. Lab Book Page 25) •/ r — — — — V /* Compute Omega(x) •/ for (i-0;i<TwoT;i++) ( Omega[i] - 0; Synlndex - i+1; Lambdalndex - 0; while ((Synlndex > 0) SlA (Lambdalndex <- ELPDegree)) Omega[i) A« GFMul(Field,Syii[SynIndex—],Lambda[LarnbdaIndex+-t]); ) /•printf("\nOmega:"); for (i-0;i<TwoT;l++) printf ("%3u *,Omega[i]); •/ J* Compute Derivative of Lambda, and save in Lambda •/ for (i-0;i<ELPDegree;i<H-) ( Lambda[i] - Lambda[i+1]; Lambdal-H-i] - 0; ) /*printf(*\nLambda;*); for (i«0;i<t;i-H-) printf ("%3u c,Lambda{ip; •/ /• Compute the error magnitudes using Omega(XlA-1 )/Lambda(XlA-1) */ for (ErrNo-0;ErrNo<ELPDegree;ErrNo++) ( ErrMag » GFDiv(Field,(i«Horner(FieldtOmegalTwoT,n - ErrLocfErrNo])), (j-Horner(Field,Lambda,ELPDegree,n EitLoc[EitNo]))); RawData[ErrLoc(ErrNo]] A- ErrMsg; printf(*\nErrNo.-%d Loctftd Mag:%02.2X Omega(Xl-l):9od Larobda(Xl-l):%d\ ErrNo.EnLocIErrNo]. ErrMag, ij); ) return (ELPDegree); ) AZ i 75(a71) (followed by page 75(a72)) J 2 3 4 6 7 8 9 0 1 2 3 4 S 6 7 3 9 7 I .2 9 4 .5 6 7 .1 .? 0 1 2 3 4 .<! 6 7 8 I 9 0 i 2 3 •1 S IS ;/ 3 !» 3 ■I I > i 1 > 2412 91 TABLE 20 ; Sialic Name Aliases ' • TITLE borner • ; NAME hornerx ; Optimized Govind Shah ; 10/9/87 .286c Ml _TEXT SEGMENT BYTE PUBLIC'CODE* _TEXT ENDS _DATA SEGMENT WORD PUBLIC "DATA' _DATA 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 chksticNEAR EXTRN _IToE0:BYTE EXTRN _IToEl:BYTE EXTRN _EToI0:BYTE EXTRN _EToII:BYTE _TEXT SEGMENT ; Line 10 PUBLIC _Homer _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,[bj>+8] ;Count •dd diJbp+6] ;RawDataP dec di sub si,si mov cx,[bp+8] ;Load count cmp cx,0 je SHORT SFB153 mov di,[bp+6] ;rawDatfc? 75(a72) (follcwed by page 75 (a73)) J 2 3 4 6 7 8 9 JO JJ 12 J3 J4 IS J6 17 18 19 21 22 23 24 26 27 28 29 31 32 33 34 36 37 38 39 40 41 *2 13 f4 <6 i7 <8 '9 0 1 2 3 4 24 1291 add di.cx dec di ; Line 20 ; mov WORD PTR [bp-2],0;Rciult ; Line 21 cmp BYTE PTR [bp+4],0 ;Field jne SI543 ; Line 22 t ; tub si,»l SF144: ; ciap [bp+8],ii ;Count ; j:e SFB153 ; Liae 23 ; l ine 24 • cmp WORD PTR [bp-2],0;Reiult cmp si,0 je $1148 ; Line 25 ;-»•••• mov bx^bp-2] ;Retult ;—•••• mov bl.BYTE PTR _EToIO(bx) mov bl.BYTE PTR _EToIO{iiJ • sub bh.bh add bxi[bp+10] ;Index mov *1,BYTE PTR _IToEO(bxJ sub ah,ah dec di ; mov cl,[di+l] ; sub ch,ch ; xor ax.cx mov bljdi-tl] tub bb.bh xor ax.bx jmp SHORT SL20001 $1148: dec di mov aljdi+l] sub ah,ah SL20001: ;—•••• mov [bp-2],ax ;Resul: mov si,ax ; Line 27 75 (a73) (followed by page 75(a74)) 1 2 3 4 6 7 8 9 W <1 '2 '3 •4 >5 '6 <7 •8 '9 \0 •2 '.3 •■4 If •6 •7 •s •9 0 1 2 3 4 6 7 8 9 0 1 2 J i S 7 1 ) 241291 inc si jmp SHORT SFI44 loop SHORT SF144 jmp SHORT $FB153 $1143: ; Line 29 • ; sub si,si SFI51: ; cmp [bp+S],si ;Count ; jle^ SFB153 ; Line 30 ; Line 31 cmp WORD PTR [bp-2],0;Result cmp si,0 .•••••••••••••a je $1155 ; Line 32 ;—••• mov bx,[bp-2] ;Resu1t mov bl.BYTE PTR _EToIl[bx] mov W.BYTE PTR JEToIJlsi] 9 sub bh.bh add bx,[bp+10] ;Index mov al.BYTE PTR _IToEl[bx] sub ah.ah dec di mov cljdi+1) sub ch.ch xor ax.cx mov bljdi+l] sub bh.bh xor ax.bx jmp SHORT $L20002 $1155: dec di mov aljdi+l] sub ah,sh SL20002. ;—•••• mov [bp-2],»x ;Result mov si.ax ; Line 34 ; inc si 75(a74) (followed by page 75(a75)) 1 2 3 4 S 6 7 8 9 IJ 12 13 14 IS 16 17 18 19 >0 >1 '.2 3 >4 >5 >6 >7 >8 >9 IJ 12 13 14 IS 16 17 18 19 >J 12 13 14 S •6 7 8 9 0 J 2 3 4 2 4 12 91 ; jmp SHORT 5F151 loop SHORT SF151 SFB153: ; Line 35 ;—•••• mov axJbp-2] ;Result mov ax,si ;ResuIt pop (I pop di leave ret _Horner ENDP _TEXT ENDS END AZ 75(a75) (follcwed by page 75(a76)) • J 2 3 4 6 7 8 9 11 12 13 14 IS 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 / (2 JJ 4 >5 24 1291 > T A BLE 2 1 /• 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 IS release: V #ioclude <conioJ» #include <stdio.h> ^include <ctypt.h> #include <m*th.h> #include <fcntl.h> #include <sys\types.h> #include <sys\stat.h> #include <to.h> #define LPSYMS 70 #define HPCOPY 5 #define LPCHARS (((LPSYMS-HPCOPY)*8)/6) main() { int file; int i; iat charcnt; char c; double zip; static unsigned char lpinfo(LPCHARS + 3]; static unsigned char hpinfo{6]; static unsigned char IppackfLPSYMS]; static unsigned char errcntt[2]; {* read in the {He V file - opeof textoutJn%0_RD0NLY | 0_BINARY); read(fi!e,hpinfo,6); read(file,lpp*ck,LPSYMS); read(file,errcnts,2); separated I* recreate the zip code and class of service •/ zip - 0.; for (i ■ 5; i >• 0; i—) zip - (zip * 64.) * hpinfo(i]; printf("\nHigh Priority Message results^); if (errcnts(0] —- 99) printf^\nAn uncorrectable number of errors occurred in the HPM dau"); else printf("\n%d symbol error(s) were corrected in the HPM data", 75(a76) (followed by page 75(a77)) 1 2 3 4 6 7 a 9 o 'i •2 ■3 '4 •5 •6 7 8 9 0 1 2 3 4 6 7 3 9 0 1 2 3 t S 7 3 ? I ) I I 1 ( > J T ? ) ) I ? ^ 1 2 91 erTcnts(OD; f* split zip and clan of service and print •/ dozipfzipfc I separateO; printf("\nLow Priority Message results^); if (encnts[ll — 99) printf(^nAn uncorrectable number of errors occurred in the LPM data"); else priatf(*\n%d symbol error(s) were corrected in the LPM dau", errcntsfl]); /* unpack the LPM characters •/ charcnt - 0; for (i - 0; i < (LPCHARS + 3) / 4; I++) ( Ipinfofcharcnt] ■ (lppack(3 * i]» 2) A 0x3f; Ipinfofcharcnt + 1] - ((Ippackf3 * i] « 4) A 0x30) | ((lppack[3 • i + 1] » 4) A OxOf); Ipinfofcharcnt + 2] - ((lppack[3 * i + IJ « 2) A 0x3c) | ((lppack[3 • I + 2]» 6) A 0x3); Ipinfofcharcnt + 3] « lppack[3 • i + 2J ft 0x3f; charcnt 4; ) I* print the LPM characters •/ printf("\n\n\x 1 b{l m"); \ for (i - 0; i < LPCHARS; i++) ( c - lpinfofi]; if (c < 0x20) c +» 0x40; if (c — 0x5e) { putchar(13); putc!ur(10); ) else putchar(c); ) printf("\n\x J bfm"); /* handle the repeated HPM datt in the LPM message */ separateO, printf(*\nRepeated dau in LPM is as follows:"); zip - 0; for (i - LPSYMS - 1; i >- LPSYMS - HPCOPY; i—) zip - (zip • 256.) + Ippackfi); dozirfzip); separateO; separateO { printf( "\n 75(a77) S (follcwed by page 75(a78)) * 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 45 47 48 49 SO SI 52 S3 54 SS r (\ > dozfp(zip) double zip; ( double dcot; unsigned int cot; zip - 1000000000. * modf(zip / 1000000000..Adcos); cos - dcos; cos +» 'A"; if (cos > *Z') coi - cos - *Z' + *0* - 1; printf("\n\nThe tipcode is \xlb(lin%09.1f\xlb(m",zip); printff\nThe CUss of Service is \x 1 ty 1 m^bcVx I b[m\n* ,cos); 2A 1291 75(a78) (followed by page 76)

Claims (13)

% AT WE CLAIM IS: 241291
1. 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 having at least five sides, 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.
2. An apparatus as recited in claim 1, wherein said optically readable label further comprises a plurality of Concentric Rings, said Concentric Rings having alternating optical properties corresponding to at least two of the optical properties of said polygons.
3. An apparatus as recited in claim l, wherein said predetermined two-dimensional array comprises a two-dimensional hexagonal array.
4. An apparatus as recited in claim 1, wherein said polygons are substantially in the shape of a regular hexagon.
5. An apparatus as recited in claim 1, wherein said multiplicity of information encoded polygons are non-contiguously arranged.
6. An apparatus as recited in claim 1, wherein said multiplicity of polygons are partially-contiguously arranged.
7. A process of storing and retrieving data, comprising the steps of: (a) printing on a label a multiplicity of polygons having at least five sides 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 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; (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; 77
' ' I 241291 (f) scoring said digital signals in a storage medium connected to a computer to form a replica of said digital signals in said storage medium; - to retrieve the characteristics of the intensities, locations and orientations of the individual optical properties of said polygons; and the computer representing the decoded information represented by the polygons. label further comprises a plurality of centrally-located Concentric Rings, said Concentric Rings having alternating optical properties corresponding to at least two of the optical properties of said polygons.
9. A process as recited in claim 7, wherein said polygons are partially-contiguously arranged.
10. A process as recited in claim 7, wherein said polygons are noncontiguously-arranged.
11. A process as recited in claim 7, wherein said polygons are contiguously-arranged.
12. A process as recited in claim 7, wherein said polygons are hexagons.
13. A process as recited in claim 12, wherein said hexagons are arranged m a honeycomb pattern. .. «•*;(g) decoding said replica of said digital signals;(h) generating a digital bit stream output from;8. A process as recited in claim 7, wherein said;241291;14 A combination optical mark sensing and decoding system, comprising:;(a) an optically readable labii for storing encoded information comprising a multiplicity of information-encoded;5 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;;(b) means for illuminating a predetermined area;;10 • (c) means for optically imaging said predeter mined illuminated area through which said label is arranged to pass and generating analog electrical signals corresponding to the intensities of light reflected "from said triangles and striking each pixel of said imaging means;;^5 (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;20 subsequent decoding of said label; and;(f) means for decoding 'said digital bit stream, aaid decoding means producing an electrical output representative of the encoded information.;15 # An apparatus as recited in- nlaim 23 , wherein aaid 25 optically readable label further comprises a plurality of Concentric Rings, said Concentric Rings having alternating optical properties corresponding to at least two of the optical properties of said polygons.;* ' V a —< V 2 4 SEP >996 7 - 79 -
NZ241291A 1988-04-08 1989-04-06 Optically encoded label with array of polygons: encoding and decoding NZ241291A (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
NZ241291A true NZ241291A (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 Before (1)

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

Country Status (1)

Country Link
NZ (2) NZ260173A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2526261B (en) 2014-04-28 2017-08-02 Gelliner Ltd Encoded cells and cell arrays

Also Published As

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

Similar Documents

Publication Publication Date Title
EP0336778B1 (en) Polygonal information decoding process and apparatus
EP0336769B1 (en) Hexagonal information encoding article, process and system
US6267296B1 (en) Two-dimensional code and method of optically reading the same
US5241166A (en) Low resolution target acquisition
EP0484132A2 (en) Multiple resolution machine readable symbols
US6604682B2 (en) Method of and apparatus for reading a two-dimensional bar code symbol and data storage medium
US5464974A (en) Dynamically variable machine readable binary code and method for reading and producing thereof
US6128414A (en) Non-linear image processing and automatic discriminating method and apparatus for images such as images of machine-readable symbols
EP0072910B1 (en) Decoding method for multicharacter labels
EP1416421B1 (en) Barcode detection system and corresponding method
NZ241291A (en) Optically encoded label with array of polygons: encoding and decoding
RU2081453C1 (en) Scanning device which reads and decodes label and label to be read by said device
DK175743B1 (en) Polygonal information encoding article, process and system - optically scans data array of information encoded polygons to retrieve information
IE960903L (en) Polygonal information encoding article, process and system
JPH113397A (en) Symbol information reader

Legal Events

Date Code Title Description
RENW Renewal (renewal fees accepted)