IE80888B1 - Polygonal information encoding article - Google Patents

Polygonal information encoding article

Info

Publication number
IE80888B1
IE80888B1 IE960903A IE960903A IE80888B1 IE 80888 B1 IE80888 B1 IE 80888B1 IE 960903 A IE960903 A IE 960903A IE 960903 A IE960903 A IE 960903A IE 80888 B1 IE80888 B1 IE 80888B1
Authority
IE
Ireland
Prior art keywords
label
hexagons
polygons
information
hexagon
Prior art date
Application number
IE960903A
Other versions
IE960903L (en
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 IE960903L publication Critical patent/IE960903L/en
Publication of IE80888B1 publication Critical patent/IE80888B1/en

Links

Landscapes

  • Character Input (AREA)

Description

POLYGONAL INFORMATION ENCODING ARTICLE This invention relates to an optically readable article storing· encoded information comprising a multiplicity of > information-encoded polygons having the same shape and more them / s six sides, said polygons having one of at least two different optical properties. The optically readable article may be in the * form of a label attached to or printed on a substrate.
Merchandise, various component parts, letters, packages containers and a whole gamut of related items being shipped or transported, frequently are required to be identified with information as to origin, flight number, destination, name, price, part number and numerous other kinds of information. In other applications, reading encoded information printed on labels affixed to such items permits automation of sales figures and inventory or the operation of electronic cash registers. Other applications for such encoded labels include the automated routing and sorting of mail, parcels, baggage, and the like, and the placing of labels bearing manufacturing instructions on raw materials or component parts in a manufacturing process. Labels for these types of articles are conventionally marked with bar codes, one of which is the Universal Product Code. Numerous other bar code systems are also known, in the a.rt.
Commercially-available bar code systems typically lack sufficient data density to accommodate the present and increasing need to encode more and more information on labels of increasingly smaller size. Attempts to reduce the overall sige and spacing of bars in various bar code systems to increase data density have not solved the problem; optical scanners having sufficient resolution to detect bar codes comprising contrasting bars spaced five rails or less apart are generally not economically feasible to manufacture because of the close tolerances inherent in the label printing process and the sophisticated optical apparatus required to resolve bit-encoded bars of these dimensions. Alternatively, to accommodate increased amounts of data, very large bar code labels must be fabricated, with the result that such labels are not compact enough to fit on small articles. Another important factor is the cost of the label medium, such as paper. A small label has a smaller paper cost than a large label; this cost is an important factor in large volume operations.
Alternatives to bar codes include: circular formats employing radially disposed wedge-shaped coded elements, such as in U.S. Patent 3,553,438, or concentric black and white bitencoded 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 spots disposed in cells forming a regularly spaced grid, as in U.S. Patent No. 4,634,830; and densely packed multicolored data fields of dots or elements, such as described in U.S. Patent No. 4,488,679. Some of the coding systems described in the foregoing examples and other coding systems known in the art primarily suffer from deficiencies in' data density, such as in the case of encoded circular patterns and grids of rectangular or square boxes. Alternatively, in the csss of the grids comprised of microscopic spots or multicolored elements referred to above, such systems require special orientation and transport means, thus limiting their utility to highly controlled reading environments.
GB-A-1 216 539 describes articles having coded information applied thereto, and also methods of manufacturing such articles, and methods of storing and/or recovering data by use of such articles, the articles being in particular merchandising coupons.
The eoupon has printed on it, for optical machine reading, at least two rows of black and white areas. One row is a timing row and has alternate black and white areas indicating successive information positions. The or each other row is an information row and has a succession of black and/or white areas aligned with the timing row positions and encoding information. Each black or white area in the timing row indicates one bit in the or each information row. A square array of information tracks may ba provided having a timing row along a top edge and a row indicator column of alternate black and white squares along one side edge. G3-A-1 216 539 also proposes, instead of the black squares, diamonds, ovals, concave sided quadrilaterals, and X-shapes. Reading is effected using transmitted or reflected light incident on any type of photocell or photosensitive device, and may involve the use of buffer storage for holding the data from the coupon for subsequent recognition, validation, or feeding to a computer.
US-A-3 959 613 describes a different type of code which uses dark wedge-shaped code elements on a white background, data being encoded by having a wedge-shaped element that points to the right representing a binary 1, and a wedge-shaped element that points to the left representing a binary 0. Consequently, decoding a label using this known code requires the direction in which each wedge-shaped element decreases in thickness to be determined. The optical properties of all the wedge-shaped elements are the same and are not used in the encoding and decoding.
Dus to the else and speed of modem conveyor systems, (utilizing conveyor belt widths of 3 to 4 feet, for example) and having belt speeds approaching 100 inches per second or more, carrying packages'of varying heights on which information encoded labels are affixed, and the need to utilise a small, inexpensive. compact label of about one square inch, great strains are placed on the optical and decoding systems required to locate and read the data encoded labels on these rapidly moving packages and the like. There are difficulties in the optical scanner simply acquiring the label image. Furthermore, 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 signal10 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 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,5X3,320 and 3,503,720. U.S. Patents Nos. 3,693,154 and 3,801,775 also describe the use of symbols comprising concentric circles as iden20 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 tha symbols, as well as reduc25 ing the d&ta-carrying capacity of the- associated data field.
Also, when two symbols are used, damage to one causes problems in locating the position of the data field and the attendant ability to recover information from the data field. Xn the latter system, separate position and orientation markings ar® utilised at opposite 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 data array and position and orientation symbols. The video out4 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 symbol® for first ascertaining th® image and siecondly determining its orientation. Also, the process of having to match the digitised signal output of the optical sensor with a predetermined. bit sequence representing both the position and orientation symbols, is more likely to produce erroneous readings that the process and system of this invention, because the prior art .label acquisition systems ρχ-ovide an inflexible characterization of the acquisition target signal level. u.S. Patent No,. 3,553,438 discloses a circular data array having .a centrally-located -acquisition target comprising a series of concentric circles. The acquisition target provides a aeans 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 bulla-ey® configuration of the acquisition target. However, as 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 fox- a slight gain in data -capacity over conventional bar codes.
To increase the data carrying capacity of data arrays, codes employing multiple high density colored dots have been developed, a® described in U.S. Patent No. 4,488,679. Systems of the type described in U.S. Patent No. 4,488,579, however, x-equire tile us®· of hand-held optical scanners, which are totally incapable 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-ancoded spots, as described in U.S.'Patent No. 4,634,850, require special transport means, thereby ensuring that the data array is moved, in a specific direction, rather than simply at a random orientation, β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 colours have also been utilized in the art of producing bar code systems so as co overcome the optical problems of scanning very minute bars. A bar code utilizing more than two optical properties to encode data in a data array, by for instance, use of alternating black, grey and white bars, is described in U.S. Patent No. 4,443,694. However, systems of the type described, although an improvement over earlier bar code systems, nevertheless fail to achieve the compactness and data density of the invention described herein.
According to the invention, an optically readable article of the kind defined hereinbefore at the beginning is characterised in that the said polygons are arranged with the geometric centres of adjacent polygons lying at the vertices of a predetermined two-dimensional grid, and in that each polygon is substantially in the shape of a hexagon.
Preferred embodiments of the invention provide: compact, high-information-density, optically-readable labels; optically readable labels which may be encoded with about 100 highly error-protected alphanumeric characters per square inch of label area; compact high-information-density, optically-readable labels which may be read by an optical sensor when the label is affixed to a package or other like article being transported on a high speed conveyor system, without regard to the orientation of the package thereon or the variability of the heights of said packages upon which the optically-readable label is affixed.
An optical mark sensing and decoding apparatus for reading such an optically readable article storing encoded information preferably has : (a) means for illuminating a predetermined area; (b) means for optically imaging said predetermined illuminated area through which said article is arranged to pass and generating analog electrical signals corresponding to the intensities of light reflected from said polygons to 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 imaging means; (d) means for storing said digital bit stream for subsequent decoding of said article; and (e) means for decoding said digital bit stream, said decoding means producing an electrical output representative of the encoded information.
In a preferred embodiment of the invention, a label is capable of being reliably decoded even if tilted, curled, warped, partially obliterated or partially tom.
In using preferred embodiments of this invention, the location of a label passing under an optical sensor at high speed and decoding said label may be determined with a high degree of data integrity; compact, high-information-density, optically-readable labels may be encoded by dividing the information to be encoded into higher and lower priority messages, to create a hierarchy of messages, which are separately error protected to ensure the integrity of the encoded information; compact, high density, optically-readable labels may be encoded and decoded by methods which include error correction capabilities, so so as to restore misread or missing information and to do so with a preference to the high priority encoded message; optically-raadable labels may ba produced by conventional printing means and decoded, with relatively inexpensive logic circuitry.
A preferred embodiment of the present invention comprises an optically-readable label storing data encoded in bit form, the label having the multiplicity of information-encoded polygons arranged contiguously, partially contiguously or noncontiguously and having at least two different optical properties.
Optically readable labels of the invention say 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 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 twodimensional arrays of polygons on the optically readable labels may have two or more equally- or unequally-angularly spaced axe's in the plane of th® label.
Optically readable labels may be printed with configurations of polygons which are totally contiguous, partially contiguous or noncontiguous. The latter two confimirations inherently define a multiplicity of interstitial spaces on the IS optically readable label between adjacent polygons. Such interstitial spaces may have the same or different optical properties as the two or more optical properties, of’the polygons.
In addition to the foregoing varieties of geometric polygonal cells, arrangements of such polygonal cells,' and geom20 ©tries of the optically readable labels formed by such arrangements of polygonal ceils, the optically readable labels of the invention may optionally contain an acquisition target comprising a series of concentric rings to aid in th® locating of the optically readable labels on the articles upon which they are affixed, particularly in dynamic label reading systems.
In Irish Patent No. 075212 (corresponding to European. Patent So. 0 335 759) from which the present application was split as a divisional application, there is described a data array which comprises a generally square-shaped array of about one square inch, 30 having contiguously-arranged hexagons forming rows 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 easily recognisable video signal when scanned with an optical * sensor across a linear scan line passing through the geometric center of the acquisition target. The 1 acquisition target is a plurality of concentric rings of contrasting reflectivities, which will yield a periodic video signal when scanned linearly. By using analog filter means as part of the method of locating and decoding the data array, the -signal generated by the optical· sensor is compared directly· with a predetermined frequency, thereby allowing rapid and precise matching of the frequencies and consequent determination of the location of the data array affixed to a substrate. The analog electrical signal output from the optical sensor representing the informationencoded label is then digitized and decoded. Utilising an .analog bandpass filtering step permits label acquisition fo occur without the need for decoding the information-encoded label. By locating 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 deter? mination of the center of -the acquisition target and the data array may be accomplished. A central location of the acquisition target on the label is preferred, but not required, in the practice of the subject invention.
The optic&lly-readable data array of European patent no. 0 336 769 is capable of encoding 100 or up to several hundred or more error protected alphanumeric characters in an eras of about on® square inch when hexagons are encoded utilising three reflective properties, such as the colors black, white and gray. For a sensor with a given optical resolution, the array permits a much denser 'information packing capability than is possible with bar code systems. For example, if a high resolution optical sensor is used, hundreds I 0 of alphanumeric characters may be encoded in a square inch. Alternatively, 100 characters par square inch may easily ba detected with a relatively low resolution sensor with the system of EP-A-0 336 769.
Optically-readable labels of the said European patent 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 com™ plaxity and the addition of more elaborate decoding algorithms to read the encoded message; when compared with a bar code reading system.
Data encoding may be accomplished by encoding a plurality of bits from a binary hit stream into a cluster of contiguous hexagons, each hexagon having one of at least two optical propertiesj although the encoding could alternatively be done on a hexagon-by-hexagon basis. The digital bit stream may b® generated by a computer, based upon data entered manually or otherwise converted into a binary bit stream, or may b.e provided as a prerecorded digital bit stream. The data to be > encoded‘is bit-mapped in a predetermined aeoufcnce and within predetermined geographical areas of the data array to increase the .number of transitions between hexagons having different optical properties.
The messages to be encoded are divided into high and low priority messages, which are separately mapped in different geographic areas of tbs data array. The high priority message saay optionally be duplicated in the low priority message to reduces the possibility of losing the high priority message due to scanning errors caused by smudges, tears, folds and other types of damage to the data array. The high priority message is encoded in a central area of the data array, near the acquisition target contained in the preferred embodiment, ia order to protect the message fro® damage which is more likely to occur to the peripheral t 1 areas of the data array. Error correction capabilities are desirably incorporated in the data array, utilising the large information-carrying capacity of the present invention, to ensure a very high degree of data integrity upon decoding the message.
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.
The pixel grid is bit-mapped so that, when the label is printed, 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 properties required.
To retrieve the data encoded in the bit-mapped array of hexagons, forming the data arrays encoded labels may be passed through a predetermined illuminated area and 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 pixels of the optical sensor. By means of aa .analog filter, the analog signal of the optical sensor ia 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 acquisition target is determined, thereby also determining a refer* ence point on the data array. The analog signal is simultaneously digitized oa 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 pro33 cessing in the decoding process. Ϊ 2 By scored program logic circuits, the digital data is transformed, into a map of the interfaces of hexagons having different optical properties. In a preferred process, 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 chat first pixel. High standard deviations therefore correspond to transition areas at the interfaces of contrasting hexagons.
Further data transformations, involving filtering programs to determine orientation, direction and spacing of the hexagons, are performed on the digital data. The general steps of this process are: (1) Filtering the non-linear transformed version of the digitised image. (2) Determining the orientation of the label, preferably by locating the three axes of the image (as illustrated in Fig. 2) and determining which axis is parallel to two sides of the label. (3) Finding the center of each hexagon and determining the gray level at each center. (4) Transforming the gray levels to a bit stream. (5) Optionally, applying error correction to that bit stream; and (5) Optionally, converting the bit stream to a predetermined set of characters.
The process of EP-0 33S 7S3 described as applied co hexagons having two or more optical properties, in particular, the steps for adjusting the optical image for label warp, tear and the like, is applied to other types of polygonal cells used in embodiments of the present invention . ϋ 3 The invention will now be described by way of example with reference co the accompanying drawings, in which:Figures 1 to 12 relate to the technology of EP-A-0 336 769 as used in the present invention.
FIG. 1 is a plan view of an acquisition target of concentric rings.
FIG. 2 is a fragmented plan view of an optically-rsadahle label having contiguously-arranged hexagons for encoding data .
FIG. 3 is si plan view of a complete optically-raadable label having contiguously-arranged hexagons of three optical properties for encoding binary data and including an acquisition target.
FIG. 4 is a plan view of a three cell by three cell cluster of contiguous hexagons, which may scrvs as the basic encoding unit.
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. 5 ia a schematic view of a camera adjusting system in accordance with the invention for adjusting the position of the optical light sensor in accordance with the height of package being sensed.
FIG. 7 is a detailed outline of the decoding process.
FIG. S is a flow chart showing the acquisition target location process. 4 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 hexaββ gons 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 f lying at the vertices of an irregular hexagonal array.
FIG. 13 is a plan view-of a cluster of partially contiguous ooly15 cans 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 sub20 «tantially in the form of hexagons arranged with the geometric I centers of adjacent polygons lying at the vertices of a hexagonal array.
FIG. 15 is a plan view of an optically readable label having con25 tiguous polygons substantially in the form of hexagons arranged with the geometric centers of adjacent polygons lying at the vertices of a hexagonal array and including an acquisition target. r ί 5 Embodiments of the present invention will be described hereinafter in relation to European Patent No. 0 336 769 which utilizes actual hexagons as the polygons of substantially hexagonal shape. A hexagon encoded label will therefore be described first. t 6 DETAILED DESCRIPTION OF THE INVENTION .THE LABEL The ability to encode information by virtue of the con5 trusting colors of contiguous hexagons or cells arranged in a honeycomb pattern in a predetermined sequence and array permits the information stored on the label to be recovered by an electrooptical sensor. Polygonal cells, other than hexagons, that are B 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 asIS signing different optical properties to a plurality of such polygonal cells, may be "read by an electro-optical sensor and subsequently decoded in accordance with the process of the invention described below.
The nolygonal cells 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 25 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 ad j ¢.6 tint polygons lying at the vertices of a 30 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 35 Ϊ 7 predetermined two-dimensional array and which polygons are separated somewhere along their respective borders from other surround ing polygons, thereby causing a multiplicity of interstitial spaces, to be interspersed among said polygons on the optically readable label. Noncontiguous polygons are individual polygons arranged with the geometric centers of adjacent polygons lying at » the vertices of a predetermined two-dimensional array, and having no contact between the borders of an individual polygon and polv* gons surrounding said polygon. Additionally, the polygonal cells and the predetermined two-dimensional grids or arrays upon which the centers of adjacent polygons are located may be irregular, having unequally-spaced axes, or regular, having equally-spaced axes,, in configuration. Such two-dimensional array axes may be independent of the axes of symmetry,, if any, of the polygonal ' cells.
Hexagons present certain important advantages for encoding information on a label. Those advantages are: (1) For a given optical resolution, hexagons can be 2Q 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 reread squares. Circles would be optimal for optical resolution·, but the space between adjacent circles would be wasted and would « complicate the processing and printing of the label image, because of the need to assign an optical property to the spaces. Hexagon® permit optimum packing of information, compared with circles or other polygons including, octagons, squares, triangles and the like. Squares and triangles are problems because of the 3Q 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 ! 8 grid facilitates the reading of the data encoded in the hexagon by its relation to that major axis.
As used herein, label includes a discrete unit, with a suitable adhesive backing, to be attached to a package or prodS 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 calls 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 IS ’"informatioa-eneoded 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-hexagoa interfaces for optimal reading and maximum information storage density is referred to as a '’honey20 comb pattern.
The contrasting reflective properties utilised to print the individual hexagons or cells of th® data array can be varied greatly within the spirit of this invention. As used herein, printing" means depositing materials having predetermined optical properties oa a substrate, or changing th® optical properties, as when thermal printing is used, Printing also includes th® omission to deposit a material having a predetermined optical property oa a portion of the substrate, where the substrate itself has & distinct optical property. For example, in printing hexa30 gonal cells in black and white, if the substrate is white, then only black cells must actually be printed. Thus, as used herein, the white hexagonal cells are also within the definition of th® term print" or printed.
As used herein, optical properties means light ab35 sorption, reflection and/or refraction properties of calls ?. 9 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, there are said to be three optical properties.
As used herein, and with reference to Eig. 1, plurality of concentric rings" or concentric rings" 10 means two or more concentric rings 12, one of which is the interior area of a circular zone 15 defined by the smallest radius "r" of the rings.
Eig. 2 illustrates a portion of an electro-optically scannable label .
As seen in Eig. 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 IS 20, and comprises 6 equal sides 22. The interior angles a of the hexagon are also equal, each of 120 degrees. In the illustrated embodiment, the hexagon has a long vertical axis y-y and a horizontal axis x-x. The x-x dimension of the hexagon 20 is somewhat smaller than the y-y dimension of the hexagon 20 due to the geometry of a regular hexagon.
Fig. 3 shows a label 30 having dimensions of approximately 1 by 1, i.e. about 2.5 cm by 2.5 cm, in which there will be approximately 888 hexagons or cells 20 (taking into account the fact that 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 KCK, defined by imaginary lines 33. In this example a one inch by one inch label has a total of 33 horizontal rows ’’R and 30 vertical columns’ C" of hexagons 20. Each individual hexagon has a diameter" of about 0.8 ma. There are more rows !!RW than columns C in a square perimeter bounding a honeycomb pattern of hexagons, due to the geometric packing of the contiguous hexagons. 0 Utilizing the hexagons illustrated, in Fig. 2, it will be seen that the hexagons are aligned in staggered! and overlapping vertical columns, with alternate vertically spaced hexagons having co-linear y-y axes. The y-y axes of spaced hexagons 20 are in alignment with an exterior vertical side 22 of an intermediate, displaced hexagon. The y-y axes of hexagons 20 are parallel to the two vertical borders 32 and 34 of the label, as depicted in Fig. 3. Horizontal rows ΒΗ are measured through the x-x axes at the mid-point of the hexagon 20.
As more fully described below, the hexagons 20 are formed by a printing process which .will print the hexagons 20 in two or more optical properties, for example, contrasting colors. Those colors may be white 25, black 26 and also, optionally but preferably, gray 27 as illustrated in Fig. 3, although other contrasting colors may be utilised. It is possible to use only tv/o contrasting colors, such as white 25, and black 26 as seen in Fig. 2.
Preferably» 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 a one square inch area, or, if an acceptable color background is utilized (preferably white), the label may be printed directly on a package surface, without requiring a discrete label. Because of the importance of having a controlled optical property background for one of the contrasting colors, it 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 relation to the sides of the label is important for subsequently determining the major axis of the label as described below. The label is printed so that the v-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. ϊη reading the hexagonal array, In order.to decode the Information contained in the individual.hexagons, it is Important to have a sharp color contrast between adjacent hexagons. For reasons described below, the fewer optical properties utilized to encode the hexagons, the simpler may be the scanning 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 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.
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 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 to print labels of the preferred embodiment is contained in the source code listings entitled LABEL in the Microfiche Appen dix, page 29, lines 39 to 48.
The black hexagonal calls can be formed by printing with a standard black ink. As described below, the scanning analysis software of the decoding process makes gross determina35 tions among black, gray and white reflectivities, so that precise 2 color definition is not necessary. On the other hand, if colors other than black·, gray and white are used, or if various 'shades of gray are used, to create four or five color data arrays, the contrast of ink shades must be much more carefully controlled to ensure measurable optical property differences among the various colors. It will be appreciated that the use of black ink is the simplest and easiest approach to creating a three optical property honeycomb array of hexagonal cells, and is preferred.
Because of the square shape of the label 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.
The label also contains an acquisition target. The acquisition target 35, seen in Fig, 3, comprises a plurality of concentric rings of contrasting colors (shown as black and white). The black rings are respectively designated 42, 46 and 48, and the white rings ar© respectively designated 44, 50 and 52. The target is preferably located- in the geometric eentey 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, sailed 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 •minimised when the acquisition target ia in the label center.
The number of concentric rings used ia 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 acquisi35 tion target has been located as more fully described below. The specific filter created and utilized may be found in the Microfiche Appendix under the file name FIND.C.
S The acquisition target may be of 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 sited as small as possible since the area it occupies on the label cannot carry encoded information..
In the preferred embodiment th® 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 hex.agons contiguous with the outer boundary of th© acquisition target 56 are not uti> liaed 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 the label and other spurious marks not on the label, such as marks elsewhere on a conveyor belt.
The acquisition target may take shapes other than con30 centric 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 th© acquisition target will ereate 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. 4 although a spiral is not a collection of concentric circles, depending on the size and radius of the spiral, a close approximation of concentric circles can be achieved. A target of concentric rings is preferred, because the signal generated by a scan through their canter has a frequency which is the same when sections are taken in any direction through the center of the concentric rings. This makes identification of the center simpler, as more fully described below, and allows identification of the location of the acquisition target with a one-dimension search of the analog or digital output of the scanner, although the process of the invention may alternatively or subsequently utilize a twodimensional digital search for increased accuracy when a digital signal is being analysed.
As used herein, ’’Concentric Rings is intended to em15 brace complete rings, partial rings in the form of semi-cireles, sectors of concentric rings occupying between 180 degrees and 3SO degrees and concentric spirals which approximate concentric rings.
Since each hexagon may be encoded in three different optical properties, 1.585 bits of information may be encoded in each hexagon (log ^3).
Obviously, if fewer or more optical properties than three are utilized., the number of bits encoded ia each hexagon will vary commensurataly. The encoding algorithm is structured to acini eve close to maximum data density and to increase the number of cell25 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, which is the basic encoding unit utilized» This is a desirable en~ coding approach, but is not essential. Other encoding units are fsasiblis. As more fully described below, the 3 cell x 3 cell clusters of hexagons' 60 are mapped to encode 13 bits of information if the cluster contains a full complement of 9 hexagons, or less than 13 bits if the cluster is incomplete by having unusable hexagons. In a one inch square label with a data array comprising about 888 hexagons and an acquisition target occupying about 7 percent of the label area, about 1292 bits off 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, in cluster 60 by encoding 11 bits onto the remaining seven hexagons. Since mapping 7 hexagons provides more possible combinations than are utilised 11. e_, . 3'=2187 combinations vs. 2’’"=2048. combinations), some combinations are rejected as, for example, all black, all gray, all white or substantially all black, gray IS or white combinations. The reasons for requiring contrasting colors of hexagons 62 and 54, compared to hexagon 66 are to guarantee transitions necessary for the clock recovery step and optional normalisation process step described below and to assist in determining horizontal alignment of the data array, as described below. In cases where encoding clusters have 7 or 8 hexagons, 7 > usable hexagons are encoded with 11 bits and· the eighth hexagon, if available, is encoded with 1 bit. For all other partial clusters 3 bits are encoded on every pair of hexagons and 1 bit onto' each remaining single hexagon as more fully described below.
It will therefore be seen that the label constitutes a particularly efficient, easy-to-read (by means of appropriate scanning equipment and analytical software) label for encoding a very high density of information into a relatively inexpensive, easy-tr-print label. As noted, the label utilizes a 33 row x 30 column packing of hexagons into a one square-inch label, with an acquisition target representing approximately 7% of the total surface area of the label. In practice, 13 bits of information are obtained from a cluster of 9 hexagons, so that 1.44 bits of data are derived per cell. This is less than th® 6 theoretical 1.S85 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 cell-to-eell transitions are eliminated.
S For reasons described below, if 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 in the decod10 ing process.
As may ba readily appreciated by one skilled in the art, the foregoing discussion of labels employing hexagonal calls is directly applicable- to optically readable labels utilizing other polygonal cells. .The .disclosed methods of printIS ing 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 proper20 ties black and whit®, and optionally gray,, are utilised to print the polygonal cells. As with h&xagon-confaiping labels, labels printed with other polygonal encoding cells may be read88 with '.scanning equipment of less complexify when only two optical prop*» «srties are utilised to encode information in the polygonal cells, in particular the colors black and white, because of the maximum contrast that is obtained with these colors.
Information encoding procedures and the algorithm described for hexagon-containing labels are directly applicable to labels printed with, different polygonal cells. Similar to hexagon30 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 arc 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 grid or hexagonal array 312, as shown in Fig. 11. Regular hexagons, i.e. . hexagons having six equal sides and six equal interior angles, form hexagonal arrays that are likewise regular in con5 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, ss for instance, if -the hexagons are stretched along two parallel sides 321, 322, the geometric centers 325 of adja10 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 i.e, the three axes will not all be 60 degrees apart.
Although the hexagonal array of Fig. 12 is not regular in nature, it is nevertheless a two-dimensional geometric grid or array having axes of predetermined spacing. Thus, the locations and spacings of the geometric centers of the hexagons located at the vertices of the intersecting axes of the hexagonal array are also predetermined; The geometry of· the hexagonal array is then utilized in the decoding process described below. Specifically, the filtration step, performed on the transformed digital data corresponding to the image sensed by the optical sensor, is adjusted to reflect the predetermined label geometry, so that the digital representation of the sensed label can be used to precisely reconstruct the original grid. The reconstruction process further supplies the missing points from the hexagonal grid. The missing grid points occur because optical property transitions did not take place between polygons of like optical properties.
With irregular hexagonal grids of the type- disclosed in Fig. 12 it will be 'desirable to adjust the major axis determination step, step (3)(e) of Fig. 7 of the decoding process done after the Fourier transformation step of the process to 8 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 label'·; 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 polygons, rather than hexagons. Similarly constructed polygons with more or less than 20 sides could also be printed. Polygons 330 are partially contiguous unlik® th© imaginary contiguous hexagonal cells 331 in which they are depicted.
The interstitial spaces 332 of the Fig. 13 label ®m15 bodiment may or may not b© printed with a different optical property than the encoded polygons. Interstitial spaces do not carry encoded information, therefore, their presence leads to a lower data density for a given optical resolution and performance level. Further, if the interstitial spaces dispersed among polygons are of a different 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. 2S Because the polygons of the Fig. 13 label are arranged as a hexagonal grid having three equally-spaced axes, the geometric centers 333 of th® polygonal cells 330 lie at the vertices of hexagonal array 33S. The spacing, location and spatial orientation, of the centers of the polygons are predetermined and csa be detected in the transform domain of the decoding process. 9 The Fig. 13 Label utilises polygons substantially in the form of hexagons. Because they so closely approximate a hexagon, the optical sensor at a moderate resolution could read them as hexagons. The geometric centers 333 of the polygons 330 do lie, however, at the vertices of the three equally-spaced axes (Al, A2 and A3) of the hexagonal array 335.
Fig. 14 illustrates a similarly shaped (to polygon 330 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 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 & moderate optical resolution would appear to be hexagons.
Fig. IS is a blowup of a label as it would appear if printed -with a dot matrix printer printing 200 pixels per inch. Polygons 360 of Fig. 15 illustrate the shape of the geometric figure that will actually be printed in place of a hexagon with such a dot matrix printer, because of the pixel density of the printer. Printers with greater pixel densities should yield closer approximations of a hexagon than the polygons 3SO shown on Fig. 15. Thus, polygons 340 of Fig. 14 and 360 of Fig. 15 are likely resulting shapes, due to the inherent limitations of certain printers, of the printing process for labels containing hexagonal cells or result fro® deliberate efforts to print such polygons 0 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 cells.
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 37S. Like the hexagons on the label of Fig. 3, the polygons 360 substantially in the form of hexagons in Fig. IS are arranged in columns aCH and rows "R, as bounded by imaginary lines 3S1 and 362 and 363 and 364, respectively. Also, as in the case of the hexagons of Fig. 3, the polygons of Fig 15 have their respective geometric centers lying at the vertices of a hexagonal array as defined by equally-spaced axes Al, A2 and A3. Thus, labels of the eonfig15 «ration shown in Fig. 15 are readily encoded and decoded in accordance with the processes disclosed hereinbelow.
If aa alternative label geometry is employed such as utilising a square or rectangular array, or the like, adjustments must be made in the two-dimensional clock recovery process de20 scribed below. 'The different geometry of the predetermined array requires changes to be made in the filters utilised.in the filtering step of the two-dimensional clock recovery process. The filters operate os the transformed digital data corresponding to thd optical properties of the polygon® read by the sensor in the image domain. Such minor adjustments to the filtration schism® could easily be made by a person of ordinary skill in tits art. In situations where the predetermined two-dimensional array has unequallyspaced axes, or is irregular in configuration, it may be desirable to identify th®, major axis of the label prior to performing th® JO 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 utilised to create aa optically readable label is accordance with th® 1 present invention. «Οι 6¾ ί |> <£ϋ Ic will be appreciated that many variations of the label are possible.
For example, the label need not be one-inch square. One square inch was selected as a reasonable size of label, to achieve an acceptable data density of 100 alphanumeric characters of information with a high degree of error en-p «rj> wj* V protection applied thereto, without creating an excessively large size label. It is desirable to have a one square inch label, to reduce the paper and other costs associated with the printing, shipping and handling of such labels. Conventional bar code labels of similar size would have a radically decreased data density. Using 4, 5 or more optical properties or colors to define the hexagons will allow substantially more information to be packed into a given space of hexagons of pre-determined size, but with a resulting increase in the complexity of the software and sensitivity of the scanning system required in order to be able to recover that information. Thus, for practical purposes, a three optical property, black, gray and white, encoding system of optical properties is highly desirable. Also, the sizes of the hexagons and acquisition target may be varied widely.
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 pat20 tern.. Also, the relative amounts of encoded information devoted to the message as opposed to erfor correction, may also be varied within wide limits. xafiE&· ENcgp.mg 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 inven35 tion is not restricted to two different messages or levels of 3< priority. Many messages and levels of priority may ba created within the quantitative limits of a label of given size and number of cells.
For example, where the label is intended as a shipping label, the high priority message may constitute nine characters, representing the zip code of the recipient of the intended package, parcel or latter. 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 zip code. This determines the general destination of the package and allows various scanning and package control systems to ba 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 1'abel needs to b® processed, thus speeding up processing tine. This will occur, for example, when a parcel is on a conveyor and only the tip code needs to be determined to control which of several conveyor paths the parcel should take is the handling process.
Because it is of a lower priority, the loi^ 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 eapabili5 ties, in order to maximise 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 com10 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 label may manually input the data to a suitable computer terminal which is designed, in the manner described below, to activate a printer fo print a label with the high priority message and the low priority message suitably encoded in the hexagons of the label.
It is not essential to the invention that a high priority message > and a low priority message be created, but it is desirable in order to maximize the likelihood that the most important data fo 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 2S contrasting colors, the colors preferably being two of the colors utilized fo print the individual hexagons, find most preferably black and white to ensure maximum contrast.
The operator manually inputting this data will cause a suitably programmed computer to encode each character of the input message and use suitable field designators, in order to create, in the operated computer, a binary bit stream, representing the characters of the message and suitably encoded by field to designate the high priority and 'low priority messages and the relative position of each. This operation is carried out by the program TEXaXN.C" which may be found in the aittached Appendix, 3S and is designated 110 on Fig. 9. A computer with the required features may be a Compaq Qeskpro 306 (with a 16-MHz clock and an Intel 00337 math coprocessor chip).
Alternatively, the process may begin with the information to be encoded already contained in a binary bit stream, because, for example, it was received from a storage medium or otherwise created. Therefore, the message to be encoded can exist in a form which is manually (with electronic assistance) converted to a binary bit stream or which begins as a binary bit stream.
. Once the binary bit stream has been created or an errorprotected 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 hexa15 gen honeycomb of this invention. Fig. S i3 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. Bach row is numbered, and each column is numbered. The row numbers range from 1 to 33, and the columns range from 1 to 30. It can be seen that certain of the hexagons designated along the upper surface and right-hand surface of the region map, and within the geometric center of the' grid are designated by ·.
X’s. This indicates that these hexagons de not contain bit-mapped information. This is because the exterior X's represent partial hexagons at the edge of the label, thus causing each of these rows to each have one fewer hexagon. The interior hexagons designated by X’s represent spaces either occupied by the acquisition target or incomplete hexagons around the perimeter of the acquisition target, so that these interior hexagons indicated by X"ss are not bit-mapped.. All of the hexagons which are not Identified with Xe s are capable of recording Information. In accordance with the preferred embodiment, eaeh of these spaces will be occupied by a black (B), white (W) or gray (G) hexagon. As noted above, although various clustering and mapping techniques can be utilized, the application of this invention may us® clusters of 9 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, & 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 visualised in connection with Eig. 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 row to row. Thus, S 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, fa, c, d, e, f aad h·.
Hexagons g and i are used'to represent 1 bit each in such a way as to guarantee that each of them ia different from hexagon h.
Thus, thirteen bits of information are encoded in a complete 3 cell x 3 call cluster of nine contiguous hexagons.
For partial cluster® of 7 or β usable hexagonss Take eleven bits of information and map them into the set of the first seven usable hexagon®.
The eighth hexagon, if available, ia used to represent one bit.
For all other partial cells: Map three bits of information into as many pairs of hexagons a® possible.
Any remaining single hexagons are used to represent one bit.
Since mapping seven hexagons provides more combinations than eleven bits (i.e., 37 = 2187 vs. 211 = 2048), some combinations of the hexagons need to be rejected. The rejected combinations ar® chosen to be those that provide the fewest number of transitions. To implement this, look-υ.ρ 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 programmer. With reference to Fig. 9, the program for creating the look-up tables ΒΪΝΗΕΧ.LOT" 132 and HEX3IN.LUT 134 may be found in the attached Appendix, and is identified as MK HEX LUT 130.
IS Use of this bit allocation scheme allows 1292 bits of information to be encoded in a 33 row χ 30 column data array of contiguous hexagons.
The sequence in which the high priority information and low priority in,formation is located throughout'the cluster map is predetermined, depending upon.: (a) The site of the high priority message; (b) The six® of the low priority message; and (c) The optimum location for the high priority message in a protected place.
Utilising th© cluster asp 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 th® information -- both the high priority message' and th© low priority message — throughout the 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 attached Appendix. 9 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 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 desirabl® to utilise 36 high priority message information bits to encode a 9-digit zip code plus one additional alphanumeric character, which 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 priority message which is incorporated in the low priority message. In the example, 575 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 per20 mit recovery of the high priority message as opposed to the low priority message. It is to b© 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, 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 65non-systematic'5 code takes a specific message sequence and incorporates the error check sequence· with the message sequence so that the message is no longer distinct, but is, of course, recoverable. It ia within the purview of this invention to use either systematic or non-systematic coding for error protection.
The disclosure below ia of a systematic code. 0 As defined herein, the 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, BCH codes, Reed-Solomon codes and Hamming codes. In a preferred embodiment, Reed-Solomon codes ar® separately incorporated to protect the integrity of the high and low priority massages. Reed-Solomon codes are very efficient and most useful when multi-bit characters are being error-checked.
Reed-Solomon codes are well known and it is to be understood that this is simply & 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_g_ractice of Error Control Codes. Richard S. Blahut, Addison IS Wesley, 1983, at pages 174 .and 175.
By way of example, some relevant information about the Reed-Solomon cod© is set forth below. Specific characteristics of a Reed-Solomon code can be specified by the following parameters : m = number of bits in each symbol n ~ number of symbols in the block ~ 2m-l k =5 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 charae25 ter for further identification purposes requires 36 bits without error protection in the example described below. A Reed-Solomon cod® with the following parameters was chosen for th® high priority message. m ~ 6 (6 bit symbols) a - 2& - X - 63 t = 10 Therefore, k ~ a - 2t 43 Since only six S-fait symbols are required to represent a 36-foit message, the remaining 37 symbols (43-6) are padding symbols, which are issalied between the encoder and the decoder, * " 1 and need not ba stored on the label. Thus, the total number of bits required on the label for the high·priority message is (53 37) x 5 or 156 bits.
This error coding scheme will be able to correct a maxi5 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: ra = 8 (8 bit symbols) n = 2® - 1 = 255 t = 36 k = a - 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 20 . ’ ' 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 25 encoding of an additional S6 6-bit alphanumeric characters and has a maximum error correction capability of about 25.4%.
Utilising th® foregoing Reed-Solomon error protection encoding, the total number of 1292 bits of information available on the illustrative label are distributed as follows: high priority information bits 120 high priority check bits· 560 low» priority information bits (including 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 hexagons on the cluster map of Fig. 5. It will be appreciated that a wide variety of distribution patterns can be utilized, recognizing that the important criteria to be determined are.· (1) safe location of'the high priority message prox5 imate 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 th® illustrative example is contained in the attached- Appendix under the program ERRCOOE.C« 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 fables generated from prime polynomials, specifically for the high priority mes• f sage: 1 + x*; and for the low priority message: 1 * x3 + Xs + xf" + x". With reference to Fig. 9, an auxiliary program GF.C I 12S generates the look-up tables necessary for the Galois Field I arithmetic. Auxiliary program BGF.C" may be found within th© attached Appendix. The look-up tables are computed and stored in the file GF.LUT 127 for use during encoding polynomial g(x) for the Reed-Solomon following equation: and decoding. The generator cod® is determined by the g(x) ~ (x * a)(x ♦ &") ........ (ae * a2u) where a is the primitive element of the Galois Field.
The generator matrix for the Reed-Solomon code ia formed by performing a long division for each of the rows of the generator matrix. The kth row of th® generator matrix is given by the 3 remainder obtained from performing a long division of xn~k-i by 9(κ) · The computation of the generator polynomials g(x) as well as the generator matrices for both the high priority and low priority messages is implemented according to the auxiliary program MKRSLUT.C'' 125, which may be found in the attached Appendix. The look-up tables for the generator matrices are generated and stored in the file RS.LUT 128. io 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 satis15 factory results for printing three-color (black, gray, white) labels having QQ8 hexagons plus a centrally-located acquisition target. A printer with these capabilities is the Hewlett Packard Laser Jet Series II with 0.5 megabytes of memory and a 300 dot per inch graphics resolution. A 300 x 300 pixel grid having a density of 90,000 pixels per square inch produces about 90 pixels per hexagon in the preferred embodiment. Each pixel is assigned' a value of 0 or 1, representing a black or white pixel. This printer ‘is utilised to print a two-color data'array of black or whit© hexagons. It may also be used to print a three-color data array of black, white and gray hexagons if a half-toning algorithm is utilized to produce gray hexagons, as previously described.
Referring to Fig. 9, by means of a stored program MKMAPS.C, 18 140 a regions look-up tabla REGIONS .LUT 141 of 34 rows x 30 columns was created, which is analogous to Fig. 5, but which was adapted to designate selection of black or white for the acquisition target rings. Individual hexagons are coded for black, white or gray or as unusable. A separate look-up table HEX MAF.UJT 142 was created by a stored subroutine of the program MXMAPS.C*5 which specifies allegiance of each of the 300 x 300 pixels on the pixel grid to specific regions in the 4 REGIONS. LOT 141, i.e.. about 90 pixels per hexagon. Pixels belonging to the finder rings are coded for either black or white. within the to assign Acquisition target rings are printed by first generating a hexagonal pattern on each region row than generating the rings.
Regions partially or completely covered by the finder rings are rendered unusable in the REGIONS. LOT 141. The foregoing program KKffiAPS.C and subroutines may be found in the appended source code in the attached Appendix, pages 94 to 97.
The error protection encoded bit stream is mapped in accordance with a predetermined sequence into the 11 x 10 cluster array of hexagons. Still referring to Fig. 9, the sequence is specified by an order look-up table ORDER.LOT 151 generated by an auxiliary stored program entitled ORDER.C, 150 which may be found in the attached , Appendix, page T01, lines 1 to 47 and page 3°? lines 1 to 3. A stored program RELABEL.C ISO and found attached Appendix, was utilized values of 0, l, or 2 to the regions available for printing on the label, while leaving the regions with a value of 3 unchanged. Gray levels for each of the hexagons in a 3 cell by 3 cell cluster are assigned in conjunction with the stored program entitled. CELL CODE.C 170 found in the attached Appendix.
A. preference for storing the high priority message in an area proximate the acquisition target where it will b® 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 attached Appendix.
Xt can be seen that the use of black, gray and white permits a simple label printing procedure, because only black ink is necessary, when a standard half-toning algorithm is used, in a 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 two-color black-white approach.
Thus, when each pixel of the printer has been assigned a black or white value, the labels may be printed to create an encoded format, as illustrated in Fig. 3, in which some hexagons are white some are gray and some are black, and in which an acquisition target region, preferably of black and white concentric rings is formed at the geometric center of the label.
LABEL INTERPRETATION OR DECODING Having described how data is encoded in the label and printed, it is necessary to describe the subsequent label interpretation or decoding process. It will be appreciated that it is desirable, to perform the label interpretation function at very high speeds, on the order of a fraction of a second, in order to increase the efficiency at which the package manipulation (or other manipulation or label reading) process takas place.
There are two basic approaches that can be taken for capturing the image in the laibel reading process. The label can be read et relatively slow speeds, using a hand-held static fixedfocus scanner. Alternatively, an electro-optical sensor, having a servo-controlled focusing mechanism to permit dynamic scanning of rzipidlv moving packages of variable sizes and heights is highly desirable to achieve high speed operation. The decoding process and equipment described below was demonstrated in connection with a fixed-focus scanner. The process having the general capabilities described herein with respect to a static fixed-focus scanner is adaptable to a dynamic scanning system with 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 speed of about 100 inches per second or more and passing below a S fixed scanner location. The image processing function thus comprises the following steps. Fig. 7 provides an outline of the steps of the decoding process. '1. Illumination of the.kabel, 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 wide conveyor and packages of only several inches in width up to three feet in width (and similar heights) are not uncommon in package handling systems. Therefor®, the one square inch label may be located anywhere across the width of the conveyor. Packages ar® also likely to be located at skewed angles with respect to th® 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 respeet to the 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 rang® of package widths, heights and the angle of presentation of the labels, it is desirable to use a high-intensity light source, 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. Th® technique for sensing tha light preferably involves sensing light reflected from th® black, whit® and gray hexagons of tha label.
Tha illumination source must produce enough reflected light at the light sensor (for exampl® a CCD device, as described below) to permit th® light sensor to reliably distinguish among black, gray and white or whatever optical properties of th© hexa35 gons ar® being sensed. In a dynamic scanning system an array of 4 7 LED’s could be used to produce an illumination level of about 10 mW/cm2 in the label illumination area at the level of the label. Th® LED's may be in an area array, without using a focusing lens, or a linear array, with a cylindrical focusing lens. A laser light source, passed through a suitable optical system to provide a line source of illumination could also be used ih the practice of this invention.
The selection of the light source and the properties of the light source for th® application in question are within the purview of the skilled artisan. It is to be recalled that, since the label to be located is only one square inch in maximum dimension, located at heights of up to 3S inches on a 42 inch wide belt travelling at speeds up to, for example, 100 linear inches per second, it is very important to be able to illuminate the labels properly in order to identify and locate the labels quite promptly.
In the case of the static fixed-focus sensor utilized in the illustrative example, an illumination level of about 2 milliwatts/cm^ 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 th® illuminated area with an electronically operated season 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 s«s model number WV-CD 130, available from Panasonic Industrial Company, One Panasonic Way, Secaucus, New Jersey 07094, fitted with a 50 mm £1.3 C-mount TV lens including a 3 mm extension tube, available from 0.0. Industries, Inc. (Japan), 31 East Chestnut Street, East Rochester, New fork 14445 and identified under the brand name NAVITRON™. The earners was coupled to an linage capture board designated model number DT-2803-όΟ, available from Data Translation Inc., 100 Locke Drive, Marlboro, Massachusetts 01752. 4 8 Optical sensing may involve imaging the entire label, utilizing an area sensor such as the above-described camera and image capture board or, in the alternative, may be accomplished with a linear array sensor incorporating a charge coupled device (CCD) chip, wherein the second dimension of the label scanning is performed by the movement of the package (and label). A suitable CCD chip for this purpose is the Thomson-CSF THX 31510 CDZ, 4095 element high speed linear CCD image sensor, available from Thomson-CSF, Division Tubas Electroniques, 38 rue Vautheir S.P. 305 92102 Boulogne-Billancourt Cedex, France.
For dynamic systems involving the movement of labelbearing packages on a conveyor system, it is desirable to have a long optical path between the labels being sensed and the light sensor. The primary reason for creating a long optical path is to reduce the change in apparent size or magnification of the label as sensed by a remote light sensor. · For example, if the optical path is, say, four feet, th© image size for labels one inch above the conveyor will be very different from that for labels three feet above the conveyor. If a long optical path is used of, say, twenty feet, the image sizes of the same labels are almost the same. This allows the area being sensed, regardless of height, to fill all or substantially all of the area of the light sensor, to achieve consistently high image resolution. If an area sensor rather than a line sensor is used, the same principle would also apply. This may be accomplished by means of a long optical path as depicted in Fig. 6.
In. order to 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 as a sensor. Either of these system® 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 censing elements (e.g.. lenses and sensor) in relation to each other on a continuous basis, a® seen in Fig. 6.
Fig. 6 is a schematic view of a camera focusing and adjusting system operable in accordance with the invention for 9 adjusting the position of the camera light sensor in accordance with the height of the package being sensed. Fig. 6 demonstrates a view of a suitable lens 195, coil drive, height sensor and feedback loop in accordance with the invention. In Fig. 6, the 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 outpqt is fed to microprocessor 204 which in turn actuates coil driver 202 to move coil 200 on which CCD 198 or other suitable light sensor is mounted. A shaft 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 signal corresponding to the intensity of the reflective properties of the label as recorded by the individual pixels of the electrooptical sensor.
A suitable light source, as described above, may be mounted to a mounting surface above a conveyor to bathe an area 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 compact and therefore more rigid system.
The analog video signal output of the sensor is then filtered. The analog electrical signal is utilised in conjunction with an analog bandpass filter to detect the presence of an acquisition target oa the data array. The analog signal is then converted to a digital signal using a conventional analog-todigital 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 target by comparing the digital data representative thereof to G the digitized signal output of the analog-to-digitai converter, as more fully described below.
An example of an area sensor having a CCD chip with a plurality of detectors and which was used in accordance with the invention is the· previously described Panasonic WV-CD 130 color CCD television camera. The analog signal output of the sensor was communicated to the previously described Data Translation DT 2303-60 image capture board, including a 6 bit monochrome video A/D conversion for digitization and later operations. By means of a suitable stored subroutine the sequenced digital output of th® image capture board was saved in a memory device as an exact replica of the image recorded by the optical sensor. 3. Processing the Reflected Image The most important part of the invention is to process the optically sensed image in order to be able to recreate and orient with accuracy the original label configuration and the color (optical properties) of each hexagon. This is done by using the following steps, after which the known pattern by which the label was originally encoded and bit-mapped may be used to decode » the information contained in the label. (a) Locating the Target Center.
Prior to utilizing the above-described CCD television. camera and image capture board, as outlined in Fig. 10, an initialization program DTINIT.C" 250 was run fo put th® image capture board into a known ready state and to load the output color look-up fables, followed by the program DTLaVE.C 255 to put th© image capture board in live mode." The program DTCRAB.C* then causes the image capture board to digitize the scene into a 240 row by 256 column image memory, with samples stored as 6 bit values right justified in bytes. The foregoing programs may be found within the attached Appendix. Two auxiliary programs 1 DTSAVE.C and DTLOAD.C allow screen images to be transferred to and from a storage medium. Source code listings for the foregoing programs may be found within the -attached Appendix.
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 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 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 defects all of the energy in the output and the other measures the energy at the ring frequency. Whan the two outputs are com20 pared, the energy in the ring detector most closely approximates the energy in the ail energy detector when a scan through the acquisition target canter is being sensed. The acquisition » target center is located when this closest approximation occurs. Source code listings relating to the creation of a digital band25 pass filter and filtering process may be found in the attached Appendix under the File Name 18FIND.C However, in the dynamic preferred embodiment of the invention, the first filtering step would preferably use an analog bandpass filter er elee a sanpled analog bandpass filter, although a ’ digital filter is usable.
It is to ba 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 the scanner to assure correct alignment of the sensor. This is. 2 of course, much slower than the use of an automated, sensor and the use of the automated sensor is preferred in a high speed operation. If an automated sensor (not hand held) is used, locating the target is a required step of the process.
As an alternative to an analog filter described above, a digital bandpass filter may be constructed using the ParksMcCIellan algorithm supplied with the software package Digital Filter Designs Software for the IBM PC (Taylor and Stouraitis, Marcel Dekkar, Inc., New York, N.Y., 1987).
A one-dimensional digital band pass filter has been utilised in connection with the present invention to filter a normalised digital bit stream, as described below, through the following filtration sub-routines. The band being filtered is the expected ring frequency. The one-dimensional digital, band15 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 b® 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 normalised frequency, (where 400 line pairs per inch = 1) of 300/16 x *400 or 0.046875. A filter with a passband extending S% below this frequency and 15% above was chosen because label distortions typically result in image shrinkage and therefore an increased frequency. Stop bands from· 15% below the frequency down to 0 and from 25% above the ring frequency to 0.S (Nyquist limit) were constructed. The filter coefficients were stored in the file 18 IMPULSE. LuT 275, per Fig. 10, for later operations, deleting the first 62 coefficients, because the filter is symmetrical. A flow ehart is illustrated in Fig. Θ. Further reference way ba made to the source code listings in the attached Appendix, under the file name FIND.C", 280 .
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 the horizontal magnification of the image is 80 pixels per inch, every • 53 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 5 utilised. 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. When the smoothing filter output exceeded a predetermined threshold, an optional two-dimensional filtering step was employed to verify IS 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 on® dimensional filter. If the maxi20 mum two-dimensional correlation exceeds a predetermined threshold, then the final stage of two dimensional filtering, with the full 25 pixel by 25 pixel filter, was applied to a small square window around the maximum. If the best result of this filter exceeded A predetermined threshold, the center waa detected. If any of the thresholds ware not exceeded, the program partially discharged the smoothing filter and reverted to one dimensional scanning.
If one dimensional scanning completed without detecting the presence of the acquisition target, the program exited with an error return. For any further elaboration of the filtering process em30 ployed in the illustrative example, reference should be made to the source code listings in the ' attached Appendix » 4 (b) Normalization of Senggd_ Image Reflected light intensities recorded by the optical sensor employed may vary due to variations in illumination, print density, paper reflectivity, camera sensitivity’and other reasons 5 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 normalised by conventional procedures. Using techniques known in th© art, a stored normalisation 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 th® minimum and maximum reflected light intensities recorded for the data array. The sequenced digital output of the above-described scanner and image capture board eombinaIS tion was loaded fro® memory to the computer to be further operated upon by said stored normalization program.
Utilizing an aquation y = mx + b, where the minimum intensity substituted for x will yield a v^lue of y = 0 and a maximum intensity substituted for x will yield a value of y = 63, the recorded intensities of reflected light for each pixel ware adjusted so that the blackest black said 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 2S easier to process. Normalization was carried out using the stored program NORM.C found in the attached Appendix.
It will be appreciated that other, more sophisticated normalization procedures known in the art may be applied. (c) For subsequent computations, the stored replicated label image ia rescaled to create an image with equal horizontal and vertical magnification. Again, this is an optional step, but it facilitates the fast and accurate recovery of the encoded informa tion. The rescaling operation was performed to give the image a uniform horizontal and vertical sampling resolution of, for ex5 ample, 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 th® known horizontal and vertical magnification. Each point on the new uniform rescaled image is then extracted from an appropriate set of points on the image replicated in the storage medium. Bilinear interpolation is used to approximate the value of points at fractional addresses. The rescaling places the center of the label at a known position in memory. The rescaled image is stored for later use in the searching step. All subsequent process steps then assume that a rescaled label image is centered on a known position on the grid, but it should be noted that this does not indicate the orientation of th® label, which may still be skewed with respect to the sensor. Th® rescaling operation is carried out under the control of a stored subroutine found in th® source'code listings within the attached Appendix „ (d) Two-Dimensional Clock. Recovery The next sequence of steps of th® process are referred to collectively as two-dimensional clock recovery." Th® steps are performed by a suitable stored program and subroutines entitled CLOCK.C 290, depicted on Fig. 10, and found within the attached- Appendix. Thia operation is _ performed in two dimensions on the rescaled image to determine precisely th® position of eaeh hexagon on ths original data array The purpose of clock recovery is to determine the sampling locations and to correct for the effects of warping, curling or tilting of the label, since the label may not b® perfectly flat.
This is an important part of the process and its application is δ not limited to hexagonal encoded labels. If may be applied to other processes for decoding an encoded label comprising a regular, two-dimensional grid, such as squares, triangles, etc.
•One-dimensional clock recovery is a general concept 5 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.
If will be understood that the clock recovery term is somewhat confusing to the non-expert, since if does not relate to timing. (i) Edge Enhancement and Non-Linear Operation ‘The first step in accomplishing clock recovery may be performed by various non-linear mapping operations known in the art to create signal components at a specified clock frequency that ar© missing from the digitised image output from the optical sensor and image capture board. The purpose of non-linear mapping is to take the (preferably) normalized and rescaled image which exists at this point in the process and to form it into a two-dimensional non-linear map which enhances the transitions be20 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 mesas for which are known in the art, such as LaPlaee or Sob-al kernels, and then an absolute value is determined or squaring of the results is performed. These procedures may be found in the text Digital Image Processing, Rafael G. Gonzales and Paul Wintz, Addison Wesley, 1977.
In standard deviation mapping, the image with.undifferentiated cell-to-cell edges is stored in memory. A standard deviation map is: then created to locate the edges ox adjacent contrasting hexagons by determiaisg the standard deviations of 3x3 groups of pixel® (this is different from the 3 cell x 3 cell clusters), to determine the standard deviations of the pixel intensities. The standard deviation computations are performed to determine the regions of pixels having a fixed color (the 7 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 on® color to an 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 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 utilised for any of the previously described label embodiments, 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 adjscene polygonal cells lying at the vertices of a known, predetermined two-dimensional array.
When the optically readable labels of the instant invention are read15 with optical sensors of the types described herein,, the particular geometry or shape of. the individual encoding units or polygonal cells is not determined by the optical sensor. Instead, the sensor simply samples the optically read25 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 arsa that has been imaged.
These values are then stored in a storage medium for later processing. In other words, the electro-optical sensor records the average light intensity passpl® 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 optically readable labels of widely varying configurations, so 58 long as the centers of the polygonal encoding units lie at a predetermined spacing aad direction on a two-dimensional array.
In practice it has been found that alterations of the S hexagonal encoding cell-based system, as in the case of the present invention emp3.oying 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 IS two-dimensional arrays resulting in large interstitial spaces between polygons, the system p«rfosaas,cis will fall to an unacceptably 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 alter20 lag the sensing system, as for example by increasing the number of samples per unit area across the label surface, one could improve the signal recorded by the sensor and improve the information storage and retrieval characteristics of such partially contiguous and noncontiguous label configurations.
Such adjustments, in order to make such less desirable label configurations usable, would be within the abilities of one of ordinary skill in the art of electro-optics.
The process, therefore, allows a wide variability in terms of the label article, optical signal acquisition means and signal processing. Polygonal cells, of either regular or irregular form may be used as encoding units on the optically readable labels of the invention. Further, so long as the spacing and direction of the centers of the polygons are known in relation to adjacent polygonal cells, the polygonal encoding cells may lie on a predetermined array, other than a hexagonal array, and the polygons may be arranged contiguously, partially contiguously or even noaeontiguously on the optically readable label.
As explained in greater detail below, the nonlinear mapping techniques,' specifically the standard deviation mapping techniques disclosed herein in relation to the preferred embodiment, facilitate reconstruction of the missing transitions or edges between polygonal cells of like optical properties. Moreover, the same feature may overcome the lack of transitions between polygons and interstitial spaces between polygons of like optical properties. This ia 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 utilised In the preferred embodiment 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, sight addition operations would be needed. This may be cut in half by replacing each pixel of the image with the sum of itself and the pixels 0 immediately to its left and right. This requires two additions per pixel. Then, the same operation is performed on the new image, except the sum is computed for pixels immediately above and below. This requires two more additions for a total of four.
Xt 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 array but with missing transitions between original hexagons of th® same color. Th© specific standard deviation mapping techniques utilized in conjunction with the illustrative embodiment may be found within the source code listings in the attached Appendix . (ii) Windowing The next subroutine, called windowing, is optional. Windowing was used in the practice, of the invention to reduce th® intensity of borders which are not associated with hexagon outlines.
These borders oceur at two locations: the target rings and the uncontrolled Image ssurrounding the label. A weighting function is utilised to reduce the intensity of these areas. The details of how to use windowing as a precursor to a Fast Fourier Transform is within the purview of the skilled artisan. The windowing pro25 cedure utilised may b® found within the source code listings contained in the attached.·; Appendix at page 1,2) lines δ to 22. (ill) A two-dimensional Fast Fourier Transformation of the digital values corresponding to the (optionally) windowed standard deviation map is then performed under the control of a commercially-available stored program. In operation, a computer performs a Fast Fourier Transform of the image generated by the · prior step to yield a two-dimensional representation of the spac35 ing, direction and intensity of the interfaces of contrasting 1 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 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 tha DC component in the image. The six points surrounding the central point represent the spacing, direction and intensity of the edges between hexagons.
It will be recognised 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 IS also be computed by performing a Fast Fourier Transform of the digital data corresponding to the non-linearly mapped sensed label image. Thus, the spacing and directionality of the polygon borders will cause certain points in the transform domain to have high energy. The number of points of higher energy surrounding the center point at the 0,0 coordinate of the transform plane will depend on the geometry of the particular polygonal encoding cell used to make the optically readable label. As for hexagons, however, such points surrounding tha central point will represent the spacing, direction and intensity of the edges between polygons or the edges between polygons and interstitial spaces if the label configuration is either partially contiguous or noncontiguous in nature.
Since the image is real (not complex) valued, the Transform domain is point symmetric about the origin. Thus, only a half plane of the transform domain must be computed, thereby saving nearly a factor of two in computation time. Elimination of these computations also reduces the amount of effort required in the subsequent image filtering and Inverse Fast Fourier Transformation steps. The Fast Fourier Transform program utilized in connection with th® illustrative embodiment of a static fixed 2 focus system was the commercially-available subroutine R2DFFT from the 87 FFT-2 package from Microway, Inc. of Kingston, Massachusetts. (iv) Filtering the Image 5 .....
A filtering process is now required to reconstruct the complete outline of all of the hexagons in the image domain, utilising the transformed digital data. This is done by eliminating any transform domain points that do not correspond to the desired spacing and direction of hexagon boundaries identified in the standard deviation mapping step. Six prominent points in the transform domain arise because of the hexagonal honeycomb structure of the label. Only three points in the transform domain ar® actually identified, because the image is point symmetric about the origin, and the second three points may be inferred from the first three. In the preferred embodiment, filtering is performed in three steps to eliminate transitions from the standard deviation mapping step, which are too far apart, too close together, and/or in the wrong direction.
First, ‘high pass filtering is performed by zeroing all 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 corr.es~ 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 ar© spaced too close together. This operation combines with the first one to form a ring of remaining points. Creating this ring is equivalent to performing spatial bandpass filtering. The inner and outer radii 3 of the annulus are determined by the expected spacing of the hexagon. outlines. Since the hexagon diameter is expected to be 5 pixels In the example being described, and for a transform length of 256 pixels, the hexagonal vertices in the Transform domain should be 256/5 - 51.2 pixels away from the center. Accordingly, a ring with an inner radius of 45 pixels and an outer radius of 80 pixels corresponds to hexagon diameters of 3.2 to 5.69 pixels was used. A filter with a preference for passing higher frequencies was used because label deformations, such as warping and tilting, cause Image shrinkage.
After performing th® 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 re15 jacting undesired information in the Transform domain, a directional filtering step is employed. Any point at too great an angular distance from the prominent regions in the Transform domain is zeroed. This has the effect, in the image domain, of removing any edges that do not occur in one of th® three direc20 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 hex25 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 are eliminated. Six wedges of the ring re30· main. By this directional filtering step, any information of incorrect spacing or direction is 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.
S 4 Τϊι.® foregoing filtering steps are performed under the control of stored subroutines contained in the source code listings within the attached - Appendix.
The foregoing discussion of the filtration scheme employed for the preferred label embodiment comprising contiguously arranged hexagons requires modification when different predetermined two-dimensional arrays are utilised for the optically readable label. It will, nevertheless, be appreciated by one skilled in the art that only slight modifications to the filtration scheme ar© required to accommodate the different label configurations that have been previously described herein, and which are illustrated in the accompanying drawings.
IS Once the individual polygonal encoding cells are decided upon, it is predetermined that their respective boundaries will have certain angular spacings, and a given number of sides of given length. ' Next, it is necessary to determine the relationship of adjacent polygons, as for instance, whether they will t be contiguous, partially contiguous or noncontiguous. Also, the geometric array upon which the geometric .centers of the polygons will be arranged needs to be established. Since the foregoing label geometry ia predetermined a person of ordinary skill in the art cm construct the appropriate filtration scheme to filter the energy points in the transform domain, so that only the brightest points corresponding to the appropriate spacing aad direction of polygons boundaries is operated upon by the inverse Fast Fourier Transform subroutine.
Concerning the actual filters constructed, At will be appreciated that it is necessary to construct an appropriately dimensioned spatial bandpass filter based upon the predetermined spacing of the polygonal encoding cells. Then, it is desirable to construct a directional filter to filter out energy points ©5 other than the 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. Sy 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) Enyg&sg Esst-eQUiJleg .TrajisXp.rmation 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 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 S7FET-2 package from Kicroway, Inc. of Kingston, Massachusetts. Upon completion of the inverse Transform step, the outline of every hexagon is restored in th® 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.
Fewer edges give rise to lower magnitude spots·. The magnitude of the spots is a good measure of th® confidence level in the clock restoration at any given point. (e) Ha jp -Axla_JP!ftj&nirijanfeipa The hexagonal image has sow been recreated but its orientation seeds to be determined.
The hexagonal honeycomb pattern of the invention has three axes spaced 60 degress apart. The direction of these axes is established by th© brightest points in the transform domain after spatial bandpass filtering. It is now possible to ascertain which of these three axes is th® major axis. This step 6 6 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 on® 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'a 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 resto ration pattern energy interior to that square is determined from the digital energy data output from the inverse transform subrou15 tine. The correct trial is the one with the most energy. The angle of this major axis is then stored for the initialization step and other searching operations. At this juncture, it is not yet known whether the recorded angle is in the correct direction or 180 degrees away from the correct direction. The source code listing pertaining to the determination of the major axis may be found in the attached Appendix. It will be appreciated that all three label areas do not need to be determined in toto. since the energy ia the areas common to all three squares does not need to ba determined. (f) SesEsMiafi A stored program entitled "SEARCH.C 300, depicted oa Fig. 10, combines the Transformed and regenerated hexagon center information with the stored intensity levels of the original image a© 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 ioet while searching. The end result is to obtain & 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 6? attached Appendix . Four important information arrays are constructed during the first part of the SEARCH.C program. The array CVAL (clock value) stores a measure of th® quality of the recovered clock signal for each hexagon, while th® array GVAL stores the grey level value (0-63) at tha center of each hexagon. The remaining arrays IVAL and JVAL store the row and column locations of the center or each hexagon. (i) laixlaiiSAfeiPB. .s.teas From the major axis angle determined in step (e) and th® known spacing of the hexagons (5 pixels) in the example, the expected horisontal and vertical displacements from the center of one hexagon to the canters of the surrounding six hexagons ar© computed.
Following these computations, th© SEARCH.C program operates on the clock recovery signal, retrieved from memory and the rescaled label image, also retrieved from memory. The fundamental purpose of the initialization subroutine found in the attached Appendix 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 th® 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 rela30 tively near th© center of th© label. A strong, distinct signal is desired to assure that searching begins with a valid hexagon center, and it is desired that th© point be near the center of th© label so that its absolute location can -be determined without serious influence from warping or tilting. Th© measure of the 8 quality of a point in the 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 ar® scaled according to the expected row spacing (4.5 pixels) and column spacing (5 pixels) to arrive at th® insertion position on the hexagon matrix. The clock quality, grey levels and locations corresponding to the starting hexagon are then inserted in the respective arrays CVAL, GVAL, IVAL and JVAL. (ii) Kaia_S®SE£iuXiO2a 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 cones 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 aria, the search algorithm skirts around it rather than going through it. 3y 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 attached Appendix is responsible for searching th© neighbours of the best 9 quality clock value found in the main loop. The subroutine loops six times, once for each hexagonal neighbor of the hexagon then under consideration. First, the position of a neighbor is computed. If this neighbor is outside the label boundary, the loop iteration terminates. If not, the neighbor is checked to see if it has already been searched from another direction. The loop iteration will terminate if the neighbor has been searched, since the algorithm makes earlier searches more reliable than later ones. If the neighbor gets beyond this test, the expected po2Q sition of th® neighbor's center in the clock recovery pattern is computed. At this point, a gradient search for the highest magnitude clock signal is performed. The eight pixels surrounding the recovered position are searched to see if a higher clock value is found. If it is, then the bast neighboring point has its eight neighbors checked to see if an even better value is found. This gradient search provides a degree of adaptation which is imperative if warped and tilted labels are to be read. The subroutine then goes on to the next neighbor or returns when all neighbors have been checked. 2Q As mentioned above under step (d), as a result of the data transformation processes, the reconstructed grid now carries information regarding the geometric centers of the polygonal encoding cells. This grid has more energy in areas where more contrasting interfaces originally existed. The centers will lie on the predetermined two-dimensional array having a predetermined number of equally- or unequally-spaced axes, as the case may be. The information concerning the spatial relationship of the axes of the predetermined two-dimensional array may desirably be used . in the major axis orientation step. 3Q It will be appreciated, however, that the algorithm could be appropriately modified to have the decoding process determine the actual geometry of the two-dimensional array and from that determination proceed to determine the filtration scheme, the so-called major axip of the label (1.e the axis of the two-dimensional array that is parallel to two sides of a 7 0 square optically readable label as discussed herein) and provide the necessary coordinates for the searching subroutine.
Whether the geometry of the label is determined by such an optional step as described above or simply entered into the decoding process through appropriate modifications to the twodimensional clock recovery process, the variety of label configurations disclosed and discussed herein can be easily accommodated by one of ordinary skill in the art. It will be appreciated that the number of axes upon which the centers of the individual, adjacent polygonal encoding cells are arrayed and their respective angular orientation, can be substituted in the major axis determination step for the three axes of the hexagonal array of the preferred embodiment. Therefore the major axis of the predetermined two-dimensional array can be determined without performing the trial and error analysis described above in step (s).
Aa for the hexagonal array of. the preferred embodiment, the information from the major axis determination step and the known spacing of polygons iaay be used to compute the expected horizontal aad vertical displacements from the center of ©ne polygon to the centers of surrounding polygons. Following these computations and after .making the necessary adjustments to the search subroutine, the search, including the initialisation step and main search loop step can proceed for the particular label configuration that is being employed. If will be appreciated that such minor adjustments to the search routine SEARCH.C 300 in the appended source code listings are within the abilities of a person of ordinary skill in the art.
After the subroutine completes, the current center location. is marked so that it is not searched again. The effect is to delete thia position as a candidate for having its neighbors searched. For each loop iteration, fro® 0 to 6 new candidates ar® added and one candidate is deleted. An efficient implementation could use a data structure which keeps candidates in magnitude order as insert and delete operations are performed. On© such structure is called a priority queue (Reference: 2&SLJ2aaAaB 1 aad Analysis of Computer Algorithms, Aho, Hopcroft and Ullman, (Addison Wesley, 1974)). It is known, that a linear search algorithm requires order ns operations whereas an efficiently implemented priority queue using a balanced tree or heap structure requires order n log n operations. An. order n search algorithm based on bucket sorting could also be used, if recovered clock values are scaled and reduced to a small range of integers. (g) Histogram Generation and. Thresholding After the main search loop terminates, the locations of the centers of all hexagons have been determined and the gray values of the centers' of all hexagons, which have been stored, are completely filled in. The next step is to threshold the digitised grey level values in the range 0 - 63 to the discrete levels of, for example* black, grey, and white (for a black, white and grey label). This is done by building a histogram of the label image intensity values from the hexagon centers. Slicing levels can be determined by looking for dips in the histogram.
The specific subroutine utilized to construct the histogram and determine the slicing levels may be found in the appended source code listings in the attached i Appendix at page 130, lines XS to 52 and page 131 lines 1 to IS. (h) QaaragJ^tL-Cfigeag.t.l«>n and. EinaXJteianJarfciaB After thresholding to discrete levels, two distortions may still b® present. First, the array may ba off center. This can happen if the initial search step does not correctly determine the location of the best qualify clock signal relative to the label center. The second possibility is that the entire label has effectively been read upside down since the major axis angle has an ambiguity of ISO degrees.
A stored subroutine found within the attached Appendix performs the function of determining whether the label is off center. If the label has been positioned correctly, the coordinates of the 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 whieh would form a line passing closest to the label center. If a row above or below is closer than the hypothesized center row, then the appropriate shift up or down is made. If the left justification of short rows has been performed incorrectly, this is adjusted by shifting short rows aae position to the right.
Horizontal positioning errors and upside down reading 10 are checked using information embedded in the label known as coarse grid information. The information is distributed in 3 cell x 3 cell clusters of hexagons as described hereinabove.
Since the label may be, for example, on a 33 row by 30 column grid, these clusters form a 11 by 10 grid. The bottom center hexagon of each complete 3 cell x 3 cell cluster has a special property which is provided during encoding. There is a guaranteed transition on either side of this hexagon, as previously described in connection with Fig. 4. For example, if th© bottom center hexagon is black, the bottom left and bottom right .hexagons must be either gray or white. A stored subroutine found in the attached Appendix takes advantage of this transition position property to remove the final two possible distortions. First an array is created where each element of idle array indicates whether a transition took place between two horizontally adjacent hexagons. 2S 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 transitional, and this slid® position is retained. Next, the same hypothesis is checked under the assump30 tion that the. label was read upside down. This will happen if the major axis angle actually pointed right to left in relation to how the label was printed rather than left to right.
If the label was simply inverted, i.e.. interchanged higher rows with lower rows and higher columns with lower col35 urns, then the results of slidings should be inverted as well.
However, one important transformation must be performed to correctly invert the label. During reading the short (length 29) rows are left justified; thus, when the label is inverted these labels must be right justified. The adjustment is made, and it is this procedure which will make the results of the slide hypotheses other than a simple inversion. In fact, the best result from the slide tests will be better than any previous test if the label was actually read upside down.
Having determined whether or not the label was read 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, th® image processing functions are complete and the data decoding processes are started. 4. Decoding IS A stored program "RD.LABEL.Cfi 182 on rig. 9 found within the attached Appendix reads the file generated by the search program and generates a bit stream file with, in the preferred embodiment, 1292 bits. It uses a stored subroutine Cell Dee.C 1Θ3 on Fig. 9 and contained in-the attached Appendix to mask out unusable hexagons, and to apply decoding which is the inverse of the coding program.
The first step in the decoding process is to generate .a bit stream from the hexagon information, ‘ using a hexagon-to-bit mapping process which is the reverse of the bit-to-hexagon map__ ping process used in the encoding operation.
The bit (information) stream is then bifurcated by the program into a high priority message bit stream and a low priority message bit stream or as many bit streams as are used in encoding the label. 2q It is then necessary to apply error correction- to each bit stream using the error 'coding techniques which were used in the label encoding process. For example, if Reed-Solomon coding is used, error correction on the bit stream generated by the search program generates an output which is in the same format as previously described for the encoding input file. Error correction, may be performed In the following sequence (Reference: Theory . and Practice of Error.Control-Codes. described above.) 1. Corepute syndromes 2. Compute Error Locator Polynomial using Berlekzmp-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. Th* number of errors detected are also computed. If an uncerrectable number of errors is detected or an error is located in the implied padding (des15 cribed above), a flag is set. The specific error coding procedure utilised in the illustrative example may be found in the attached Appendix and.is designated as ERRDEC.C 184 on Fig. 9. . fiaitBirg By tracking the package (by identifying its location on the conveyor) the high priority Message, indicating the sip cod© of the package destination, can be used to activate suitable routing arms or conveyors to route the package to the proper truck, 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 & package, letter, part, machine or the like and cause a system to perform a package handling or manufacturing operation, for example, oa the 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 protect35 ing much of that information from being lost due to label tears and the like.
With reference to Fig. 9, to alternatively display the decoded message on a computer terminal, the-program TEXTOuT.C 185 may be employed. Program TEXTOUT.C may be found within the attached Appendix „ APPENDIX '«ικικβιήκικβήιβήβηκήικ^φφφκ#11*’·*»·———»**«ι«ι· Λυ«·ι»ι»ι« «»*«*«« β«ι« Ι*1»*1®1*1»»1»11«»»1·»1*1»****β1!»1»ΐΛ*Ι«Ι·!*·*11«!1ΚΙ·1ΙΜ»1*ΙΙ«1»*1·1Ι«»:ι»Ιβΐ««βΙ*1«βΙ1Μ1*!1«;ΜΙ·:ΐ·Ι1«1«**1»**Ι*.*1»!Μ1»1»»»ί1ΐΙ«β!··Ι / f* Htessae: '· Author: * IMSK * Impose ΙΉΧΏΝΧ Donald G. Chandler,,, Pa. Technology OK»ber 16, 1987 'Get ess? napst for label Modifications after November 15 release: wfedsde «£©suo.h> «jbaclsde #3BicSade ectypeJi» «iaetede wiaclsde #iaclnde #saclode •plschade <®aJa» «fcdefiae LiSYMS .#de£me KPCOPY «define UCHASS 7Ό CC(LPSY^K-.5SCOPY5*8}/5) essSsQ ( Sat file; iai S; iet charcat; char c; esslgaed iat cos; douofc dao" doable 3¾¾ Ipsp· static assigned char lpinfo(IJCHABS + 3£ Mass sasigBed char fepisfo(ft£ stis msigaed char SpjsecS^JSYMSJ: Mass ocsigaed char encats(2] » {©»©}; /* get sp code */ gsssgs prsatifCVeSater the ZSP CODE infonnatiea (sp «9 9 digits» ao hyphen): X EeiwrfrairjMp): if ((zip > 99&999Ά9.) E (sip <.O4) pcintff\n£s«alid Zipcode. Try again): 7? goto gctzip; } /* get class of service '/ gcscos pnasff’XaEster she Ctes of Sendee (0 - 9. A - 2£ "); cm - ge&chO; -------cos - tonpper(c0s); if (Cess < Ά’) I &os, > ’Z’)) if ((ess < Ό') ί (s« > V)) ( priatfC\s2av^d Class of Sendee. Try agria1); goto getcos; } priatfC%c\a’’,csssX if (eos <- *3’} ©os *2? -M - *0’; cos — Ά’; zap - csss * 2000000000. + zip; /* pack into sax bytes with six bats each */ ipzap - jap; for (i « 0; i < 6; s*-*) fepaasfi^a) - 64.0 * aaodf(zip / 64.0.&xsp); prsaatfC\»2fiter the lower priority axafonsationVO: for (a - 0; a < LFCHARS + 3; a++) ipiefop] - ’ j charcat - 0; wfcSs (charcat < UPCHARS) ί c « getcaQ; switca(c) ( case ft /* special keyboard character,, ignore */ .gssesO: , break; case & f* back space */ if (charcst > 0) if (feiafticasrcat - ip* 0x5s) ( patcharicX pasebof ’3c petefcar(c); lpiafo(—sbarcatj } break; case 13: /* eater */ IpfefoiefcaBcat-H·] - Θχ5«ς pBWbar(O); pnsebarClO); break; $sass 27'; /* escape, den® */ g©§© eadtow; «fefanlc /* accept if ia swage ·/ c - toapper(c); if (c > QxSf) break; if (c '—» Θχ5β) break; if (e < ©x2©) 'tes^ Spiafoichascnt-wj - c; bresXq eadjlow: /· pack 5 bit chars see© S bit sytaboJs (bytes} */ chanas « 0; for (i - 0; £ < (LPCHARS * 3) / 4; k~) c ippack[3 · a] - ((Ipiafc{charcatJ « 2} &. Oxfc) | ({iipisfeic&aTCffit + ί j » 4} & 0x3); lppacSc[3 · s + lj - ({Spiafeichas-cst + 3] « 4) & OsfO) | ((Spasfe(caarcat * 2]l » 2) & OxOf); Ippacfc{3 * i ♦ 23 - ((Spinf^dsarcot + 2] « 6) & OxcO) I ^piafejcharcai ·<· 3} & 0x3f); ch&rcat -4-= 4; } /* append High Priority Message to sy&sb-ob */ for (I - LPSYMS - EPOOPY; i < LPSYMS; m+) ippackg? -= 2X.0 * raodfJBprip / 256.0^Sprip); /* writ® oat resrafe */ fiSewritec fife - <^eaftesria^nr,O_WRONI.Y| O_CREAT| OJTRUNC | OJ33DMARY3JWRITE); wriaj(faHeJbpiafo,6);. write(fa3eJppackJ-PSl(MSX write da©s{fi3ie); } ΛΖ /"MkHcxLUT Goviad Shah 10/20/87 */ cte.de ti*iaclode '«isctede «ssys\saOs> *ssc5ssdc -Gotej*iEclude <£tdio±> waac’ade -e&dIifaJB> *HacSudc *iac8®dc -ccoaioJs> *defiae Trae 8 #dcfiac False 0 ^define kKoSias 32 static sat LUTSToHf2048£ static sat LUTHTo3{2i87J: /* 2 Hex to 3 bit L.UTs generated manually . Ref. Lab Book Page 32*/ static out ΪΛΠΒΒ32Ϊ8) - (044333.74); static int L,U7HB23f9] - (04433/4334): static sat SostYalae£2137]; static %ejec£FZagf2f37£ static aba* SsapdNoSiacJ; static ant BiaipcNoBins); static aaat GsayConat,Gsay4Couat.,RcjcctCoant; static int 3H£Vaisef7£ static & *pLUT»*pSo?t.inie.ofile; static iat static void HistcgtasXvosd); /*—-------------------------MA2N0 ( int JbadexJacxYxieic; » /*Geassaes 'the table for bissogtam mlsb.cS sortiag */ pSers — ScctVaJtae; for (£rtfcx - ©;iiadsx-c2IS7;£3d«++) ( RejoesF2»g(SadexJ« «Be; /*rascR«a£W«s5 aad fed the ssdavsdssai hex fevefe */ EexWee - fesdex; GsayGoaat - 0; for ¢405/75++} < BitValuefiJ - (HcxValue % 3); If (BitValuefi] —I) GrsyCount***; HcxValue ~ HexV*luc/3; } priasfC\a%04.4d .Index); for (i-·6;»—fti—) pruttfC%Ql.i /•Cosnpuse she son Index */ *pSort - Dif^0J>Diff(lJ2)+Diff(3.4H>iff(4^)* Diff(O J>Diff( 1,4RDiff(4.0)+Diff(2,5); if (*pSort < 4) Reje True; if (*pSors —« 4) ί psssifC\a%OLld ."pSort); for 0;i—) primfr%01.1(T.BssVsJlue{^)); BsaiiGrsyCo«sa£)++; if (GrayCousit >4 ) RejcxtFlagflndex] - True; if (GseyCotiat — 4) if ;RejectFl2g[Iudcx] « True;) I if (RcjccsF3ag(iadex}—True) (priasf(**);RejeciCount-M·;} ) praatfCVaNondber of rejected codes %d JlejeetGount); /*geaeraS‘ isaeogsasa fcr Shs son it dices */ EsssogsasO; prsatfC\a\sgjay kwsl <3isss3busioa\a"X for HsiegrasaQ; /* Create She Ban To Hex asd Hex to Baa LUTs ·/ j - ft for (sC if CRejecsriagfil —« True) j-w-; else LijTBTaW"j] - C LUTHT®Bp) - j-j; } fesr C»—ftj<2SMS;s·*-*) ρκή«2Γ\&*4.4<1 BToBfc%4.4d HToS^.4rXLUTBTomLLUTSrroB(iJ); far (>.2©48i<22S7»«·) ©fBe - opeofBiaSfexJasf'.O_WRONLTipjCKEATgO_TRUNqOJ3JNARY3_JWRnEX wise '(aaeXnTBTsHjsbsefCLtnre:i©H}k wise (sS!eXUTBH3X»seof write (ofi&XUTH323^23sai); ei<^s(oHfe); ) ιι—owa·™—; ·-g-iiiijg^n^^Mn—3i_i..i>_«i^ii^i^_^tnMai'-3B»~ir~«riw*i -~~ii r »t t Τ χ-~·ι·Μΐι *ιιυ ' vlm i*1·1 "'w m i™t i^iwwwia»iM*wi»ui«u·; hm^riir 1,1 static Hsu Diff(Bx£Noi.3jsNo2) a&t BieNoSJSaeNWfc ( si a; s - BkVataciBitNol) - 3itVaIu<3itNo2> raiisrs 3*2; } AM « / ' >—γ»,ι»γ—.—11—gr-p—;—;^ο· ι:·..^.:·:·η<τη·ιι·ιι··ιι·ί···-: . ιρ™. ·η·^· ιΜΐ· ·)ιμι«ι·ι·;·ιι i·· ~i- π u—.-ι·πι_ιΓυ[τ·ιι·η_ιη·Ί·<τ·^ηι·η_ n n r._n li'Tmn ]··ιι·ιι·Ίυΐιι. gi.-.ri. itsratic v©5d { iat float /*Fid tike factor */ Max «* 1¾ for if > Mas) Max «· Basp); Rssidsg&st >« Q; 5cs& <* SL0; If (Max > 'S0> Sssfe - JOS/te; for c RmsasigOimc Bi^pjc ^rfa ScaSedOsn^t« StsCte^BIsFS] *** 03; C©^t *· ScsfedCous&t; ΛΖ /· gf-h */ tsnssgned char GrMtisHadSMcbjjir.char^har); /^^ieldjndcs^etement*/ onsigned ebar GFMalichar.charsCharX /*fae3d,elesaej«:l(,e!leaaent2*/ essgfflsd char GHnves^caar,cte·); /*£iestte!esaenf*y assigned char GFDxXdbaur/daar,cbarX /•'fieli.Si^dsad^DiviMs·*/ /* · of Safe. symbols for Reed-Solomon Code; sodnding padding */ wdefane fcfeQ 43 #de£ase kid 183 /* Correction capability of the code */ #de£5ae fcffifl 10 *de£me ktl 36 #de£5ae Iconax 30 /max of 80 and tl */ /* Block length of she code */ #de£5©e fcaO 63 wdeSae ScsaS 255 /* Aetna! asmber of snfescxastbn symbols */ ttdesxae SdsfoSymbolsO 6 #de£sse klofoSymbolsl 70 f* Toss mnnaber of symbols .os the .label */ #de£ane kLabdSysnsO 26 *deOae fciabelSymsl 142 «ο» f* Gr.c Govjad Shah Goliad Shah 9/18/87 Program so generate Galois Held Tables for 26 and 2A8 Basies Range Entries Range L_2ndexToElexaeffli ........228 1-63 · 512 2-255 L_SfcsacsiTo;index 63 0-62 256 0-254 Polynosual * +χ-«-χΛ6 2+xA2+x3-t-xA4+sA8 Nose: The atwber of entries required in the Index to densent LuT is only 63/255: however the tables wish 54/512 entries are helpful for aauldpiyaag two elements.
The EsementTolndex LUTs return 63/255 if the input densest is 0 (disallowed) */ •saclade -cstdio Js> #Haelede =*EScsses «MsaetatSe #iadnde <£ca&Ja> static raasigned char L_isdToE2^2i5S2JX_HcTo2adi2I256£ ©sripssd char Π·οΞ0ί522ΙΞΤ©ϊ0·ρ551ΖΤ©Ξ2ί522^ΕΤοί2(255): isaiiGFO Z ί ._ cat irde; SHfe » opcarGfXUT".O_RDONLY g QJSSINARY): Kad(ira2e^L_JbidT©S.®siims5fiL_iiEdTeE2s)): R53sd(iFScX^jSfeTeXad^ic^jf(I.__E2sT®l3d)5: Psad^aFsteJTeBO^sisastsS^SToEOii; raad(2?Se^Te©j350f(]STexC))): rsadCSFaeJIbESjeasefCnbES^ re«SGFSeJBr®l3 .scasctiCSTaM )fc cScse^feX > /*'--------— esaagaed shasr Gr^4snadjE2e(rjsMs2sdKcSfc'ssat) sfflsxgaed ebe FsMJaidexJElcaasac < i? (Efasss® ·— 0) IS5CB2B(OX reftsa /* ·/ 4 assigned char FiddJSIe Ϊ JSlel; ( ((Elei —= 0) «I (Ete2 —0)) rsmna(O); retens (L_5sdToSa4F«SdIL„EteToSffid(rseldIElcl] + L_J51e A olnd(Field JEIe2]3); > j*-----------------;-------------------------------------------------------·/ unsigned char Griavesa»(F3eld^lesa«sat) ..... icasigned eter Fasld^Sassaeat; ( if (ΚβΜ — 0) retEus (LJbadTaSSeiOISS-L^EteToHsdiOIElcsaeat©; else «ana CI'^«L_E!eT©Snd[IiEtexaentJ3); > Z*~;---------------------------—.-------------------------------------------*/ unsigned char GrjJiv(HeldJDividend,D£visor) unsigned char FieliM>ivadeadJ>avis®r; < if ((Dividend«—· ©) 1 (Divisor r®EEts(O); if (Field — 0) Divisor « fiS-LJEieToIndJOIDivSsorJ Divisor - 255-DJEseToIndJSjpivasost rsssra (L^IadToElfi^FieMJL^EIeTeSnc^rseldJDsvadeadl 4- DivisorJX > <*—«» S /* MkRSLUT.c Govisd Shah ί0/28/87 Program co generate: G®Joh Field Tables for 2*6 and 2A8 RS Coding generator matrices Entries Range Entries Range L_IadexToElcmcnt 128 3-63 512 1-255 L_EIcmcntToindex 6-4 0-62 256 0-254 Polynomial l+x+xA6 Ι+χΑ2+χΑ3+χΑ4·+χΑ8 Note: The number of entries required in the Index to element LuT b'only 63/255’ ho^ewr the tables with .128/512 entries ore helpful for multiplying two elements.
The EIcmcntToindex Lu as return 63/255 if the input element is 0 (disallowed) */ *iscisde #saclradc #racMde *mcliadc /coasoJx> •sactade *iacisde #aacltadc »ft2SC®nde ^include <\Kps\eode\gF.b> unsigned char ΓΤοΞ0(5Ι2ϊ.ΕΤοϊ0[25634Γ©Ε3ί5ϊ2|.ΕΤοΠί256ϊ: unsigned char GMatOtklnfoSymlboSsOXZ^fctOKGMatlCklnfoSymbobip*^!]; mainQ ( · . static unsigned int aJ.orde.PoEyJtfoEfesseEts.OvcrHowMasM’TsxxtcPoiy; sta.dc «signed char L_iladToElei2IS32iL_ElcT©)m<2p56l: sense isSsar Field; static iasC a.kJWccdcdRowsst; static cssagaed ebaa- GP©Sy(2*fcS3aax + sstcic txesigoed «bar QIadsx.QC®eff; Bssigaed char DsvadcadpcaSJ; mfe is® Degree.Ro'w: /•Geaexa&s the Gaioas rasSd Look Up Tables ·/ /* Gatoss KeSd <2**m) ·/ 8-8 for (FaeW-O^jeid-c^HcW-H-) { if (Held — 0) ( NoElesseats - 63; OverKtowM2sfc - 0x40; RcasadFtoly - 0x43: /·ϊ+χ+χλ«*/' eb® ( Noxlesseaes - 255; OverFtowMask - 0x0100; PrisaePdly - 0x011I>,/*l+xA2+x*3+x*4+xAS*/ > /* Generate Bdex To Siemens LUT ·/ Poly - 2; fee (i-fta<*>2*KOjSl®as!ffis^+2;a++) ( L_Jfc,dT©Ei4""®»dIiJ« Poly; /*Mo&2ply fey Alpha, shafriag by ! */ Poly«-1; if ((Poly & CtasrTlowMasfc) !- 0) /* .Jaecapome she prime -poIysaswBia!*/ Poly * PrisasPcdy; > /* Gsseraas EJSeaaens Te ladex LUT */ L^EseI®ia4r5eldJ02 - MoElesaesis; fer (a«$ri<"NoStoaaesa«s:s++) { L_£teTeIndir5e3d#3 - 0; for (j-<^h^©Elesaes«s^++) ( if (LJfadlbBefrMli j — 5) ( if (L_E2«ToIad(FiridIiJ μ 0) prfatffvx**·*·***··^··^**-); > /* Copy mss */ for (i- ETalorg - LJSSeTaladEOIiS EToilpJ - LjSeIbisd(IIs£ ) 8 ? for (i»O;i<5S2;j++) ( ΓΓοΞΟί’] " LJIadToEIeiOIik ΓΓσΕϊ[ϋ] - LJndToElepiiT: «File - opitoCGfXUr.OJWKONLY | OjCRBAT | O^TRUNC | OJBINARY3JTWRITE); wriie(o?EjIe»L_lQ«SToEle^j2fflof(L__>ia ^MoFileJTaSO^sxeaf(nbEO)); *rice(o?alle^To3i0^!as»of(EToI0)); wriie(oHIe»n-oEl jswsofdToEi)); wsite(oe* de„2ToIl ,si2eoflQETo£l)): cIoseCoFOe): pna«fC\B GF(63) GF(256)’); priatf("\n · SndToEle ElcToInd LsdToElc ElcToInd); far (j-0;j<512;i++) ( prsatfCXE %3d %3XH "XI): if (a < 32) priarfC%3d %3XH '%3d %3XH-X__IndToEle[0Ii].
L_iadToE3eiOIa3X„ESeToisadiOXsIX_SteT©IadiOIH3): ebe peiasfC "); priatff %3d %3XH ^LJfadToSteniiK L_>dToBilea-iq): if <5<250) pristff%M %3XHX_EIsT®lBdnX?.3X_E»sToHad[us)); } ΜΐκηΒΐ»,ηκι*ηϊιφ(*·,ι<;ιφΐ!ίΐ[*ιφΐ!4!Λ3»(ΐ*ι*ΐΓ«ΐΒι«Μητ(ϊ[(φιηϊιφ«Β»'Λ(*ι«ι«ι»ι»ηίΒΐν«ιι«ήιβι«ιι*ι«ιι*4:«ι4{ΐβιιβ!ΛίΛ?ι*Λ;ίΚ!*'««Ί*ιάΐΛϋΒ'<ι«ι«ΐΜΐ w t BSeHe5W«flsiK«a-tflB«fl««e-{ W1i*n» /* Generate the Generator Matrices ·/ IsfeGFO; /* Gosapate s&e Generator PolyaosnaaS (χ4λΧχ«ιλ2Χχ·ι«α3)χ+βλ4)_—.—(x4-a/'2iC) Ref: Rage 13 of Ms book ·/ fbr (FSsSd-ftrieM «-lsFadM < ( t - fcsO; n - feaO; fe « fcfeQ; NeedtadQftows < SdafoSysnfeefeO; > efee ( t» fees; b - fesS; k - kkl; MecdedRows ·« klsfoSymbolsl; ) G?oly(01 - I; for {s1;2<-2*o-*-!·) O?oly(j] - 0; r printf(\n Generator Polynomial for RjS Code; GF(%d) t-%dja+l,t): priatfC\s. Coefis. of ___,^εΛ%ά^*έ)· */ for 0«ϊς5<.-.2*ο-Μ·) /*msldply by (x-vSiy*/ for GPolyfj] - (GPoly£i-iJ A GFMaHndBe(KeldJ,GPoly£jl)): GPolyfO) - GFMoHn } /* pristfC\a X for (ϊ"0ΰ<2*ϊζΐ+φ) priatf(*%2® ".GPoHyjjlX */ /*Cosape$e She generator snasix */ for (RowMS^ow C / for (ϊ"0;ί<3$ς!Η-ί·) Dsvideadft] <- ft Divsdeadfe-k+Row) « Ϊ; /*set x*(a-l-i) */ /*Pesfonn the long davssaon and fed remainder ·/ Degree - a-fc+Row; whale (Degree >» 2*t) C Qiadcx « Degree - 2*ξ /•Degree of the qnodest*/ QCoeff - Dsvsdend(Ssgree> /* priatfiC^sDeg.%a Qsndex%e QCoeff%a\0aJDegree,QIn */ for (ί-9^-ο«2*?ώ·Η·) C ' (DavidbmdfQIndex GFMt3%Pael^GPo!yil).QCdefOX j /*New xesaa&adar competed */' wiafe ((Divsfead[~~Degree) < 0) && (Degree >·. 3/*S3egree rsdased to fcss was 'fess of p-s^ysesssal */ /* ρΛκΓρχβ·» Kk %«\bJ&OwX for (I*fti<2*^«-*·} psasBdC%2o "JSvidsadis^ '7 f* Copy Ae remainder so fee G-Mtisix */ fe if GFSeld — 0) GMatOiRowIQ - Dfoi&adgfc ©fee GMaSlJRowJ») - Dsvideat^SJ; }/* AS rows de®e */ pisac£C\a Generator Matrix fe R_JS Code; GF(%d) $«%d cosap«eeet); ) /*B©fe fields doae */ @S oHle « opesCRSZUT-.O_WRONLY | O_CHEAT| O_TRUNC| O_BINARY.S_iWRITE); wvite(oFxle.GM&t0^xc9of(GMat0)X wnte(oFile,GMatl unoosofCGMatl)); cios^eFUs); ) /* ErrCode.c Govjnd Shall 9/23/87 Program so encode for error correction */ #iscihsde #jac2ode #5aciade >cys\siaiJ2> #hacH«dc #iaclodc -mdioJ&> #Hs:c3adc '»ls.clsde «icciode <\taps\code\gf3a> unsigned char GMatO[kIttfoSyiabolsOX2*ktO],GMatl(kInfoSymbolslI2<*ktl]; EaaissO C esssgaed char RawDatz0[Id&ioSymboIs04-2*ict0].RawDaGal[kisfoSyxnboIsl-t-2*ktl}; assigaed -giar *pCmrSysa; sffl£ ijjrafe: FILE *®osas3· BisSFO; fesasa SFafc - ©pe^’Texila.OBr^OjaDONLY QJSKNARY); rsadiS-afe, &Saw2^teOi2*k^3eSdiafoSysabolsO); rea<2Fife„ &RawDasalp*SetI! JJfclafoSyaioobI); ctose(aF2e); EreGjxSe(O,RawDasaOX ErrCodeC ΐ JUwDaits 1); sfeeass - foipeaCSrTCo-de.Cuf«,w+b1'); pCessSyni« &RaWOa^.O(kLabeISymsO-5 J; for (J*©;3 for G—o^j-egy·*-»·) ί fpaSeC*POsstSysa & S^ssaasaX •pCasxSyaa >s— 1; > •pOesSyra;— J pCesSya. « &Bxw]BaalgkLab®iSj?a^?."3 J fee (SM^dfeijdbeBvaKJpH-»·) C for (jMa<8d+*·) ( fputcf*pCorrSym & 1 .stream); "pCurrfJyaa »- 1; ) pCunSysa—: ί fcicss{sireaja); } r-—------baitKSO c iat sFslc; SFUe - apcaCRSXirr,O_SLDONLY j G_BXNARY); nead(IFalc,GMat0.sixeof(GMatO)); reed(sFsleTGMatl^exzeof(GMatl)); eteeCIPIle): } /*,_---—Mw—a-------------------—-/ ErrCode(F5eJ«SJtji.wData) emsigaed char Held* essagssd char itowDarsi); ( isx JiapciCoaaiXt.T'woT.C^ya&oiNo; caslgasd char CStSymbol; sf (Held «—ι 3) c £3,pstG9ss£ - JdafoSysabolsO; ί - Soft: S efee c • lapasCouas - SdafoSymbolsi; C-k£l; TwaT - 2*ζ for (OdSym&o!No«O^Z3^vsafeoIiNo<2*r:Ci(SysaboiNiH+) ( CfcSyssbol - C" fesr (a-Oji-dspaiCsmaH*) < if (Field -- 0 ) C k S;s b ο 1 A GFM®l(O.RawDa»(2-i-Tw)Tl,GMa!®1pIC^5’sa&«®'©i}: efes OSpabei; ''•«GFMoSCS JiawDate(irt-TwoTJ.GMaia[i5CkSysaboSNo5); > /*CSsecfc sysabei corapeeed*/ RxwDass^CSSyssboSNgj ™ CSSyabol; )/* ASI the check jyssbob ferns beea casapssasd */ ) ‘Z /TrLabcI-C Govind Shah 10/26/87 Reads input binary data from fate ERRCODE.OUT Loads RegioosXUT created by MkMaps Selects cells of 3x3 hexes from sac region snap in the sequence specified by OrderXUT Performs binary so 3 level ..hex. cos version ®ssag CellCode for each 3x3 cell Uses PrinsLabel to generate bat saap fSe for the label Also generates a file PRJLA3EL.OUT showing hex levels in 3,W„G. */ ^include «do Ji> «iae’nde ^include #ixscl:ude ^include ^include #incfade rftasseJs» #aachsde #incfosde '*sndtsde <\np$\eode\labe!Lh> int R,es3C5sMs,ppiRegio3Re>wsJkRegiosCefeJ; iaS BimDat3(fciJ©3iEsJ; raaan(ajrgcyugv) sat ®rgc; char *argv(t (‘ sat LAvailabSeRegsons; bit RessR®^«MCeW®; int BatsCoaverted; static int LUTOrdsrf wpt static iat Hasto{24J static las ©Hfesffife; HUS *scxasn; char OetChas; if (atei(argv(2iD — 75) Res « 75; else Res » 300; iastCdlCodeO; stream - f«g>eaC^srCbdbB.<>srAbk far (i-S;i BiaD&fc»iij| - fgete^ssreasa); fcteseCstreass); sFile - ©penfoiderJaiT.O_RDONLY ϊ OJBHNARYJ^IREADx i«ad(iFslcXUTOrder»440): stoseClFSHs); BitrCosvsrasd - 0; LoadHexMap(); AvaalabieRegions « LoadRegioaKfepCRsgaoaMap); - fe (©βΕΝο-^ϋβϊϊΝο/ΠθίΟβΕΝίΜ-ί’) ( i - €^Oide(35isQmvertsxlXinOrdeitCellNoIO],LIJTOrderiCeHNoIID; BiisCoeavested ·**- i; } /•Copy srcg’oa smp S© a data £3s */ streasa - f©jpssaCp!rlalx5Loar.',wX for (R®w-32;Row>-0;Row—) { for('CoS"«©;C^a<30;C^·*-!-) ( swlscs (RegIosMag}(Rov/|Coa!0 ( case £fc OoiCte « ’W^tasaft; case 1: OatQbar «*G*;breafc; ease > OssOar - ’B’jbreafe; deisKste OotCtar - ’X’i ) fpriH6f(sirea^'*% pdaiEfir%c\Os<2har5: } fpriBtf(screaaL^»fc psiasffA»^ } Prsa£LabeI(ResJReg3©saMap5; ρηΜφναΟΦ. size dismiss wbAs); for J^HastoJa}); prisasfCXaTosal biss i5acfflded^&d".BfeChiaven£d): } ΛΖ /*MkMaps.C Goviad Shah 50/26/87 Generate HexMapXUT and RegioasiUT.
HexMapXUT assigns a RegionRow/RegioaCol pair io each pixel in a 300x300 matrix, PsxeSs thai dfe sec belong t© any regions are iaisialissd so indicate a fixed whies region (RegiossXUTpSlOj). I: also maps she appropriate pixels for tihe finder rings to a b5ack- or white region.
Regaoas dat iadade stay pixel from tie finder rings, as well as the line-end regions in the short rows, are indicated as disallowed ia the RegidaMapiUT fey storing a ansaber higher than 2. ·/ ^include <άθϋ> tfsneitade #iacitos!e #sacS®de #isadtasde «fcdsde #inciade ’#anc3ode ttmeiode wdefee H 12 #de£a®e W lfi HLE *biKaap; satac cssr hags mapp00J[3043i2£ char Liaepoqpfc isS regies; int i, j, fc, IJbegaoaRowJlegionColJ^gCidoiCo!; > int X» K ins fed; int ofSe; 1st fev©> doable theta, rl. rwidth; doabte c, s; sat s; tsesagaed cfear byte; ssaric iat Bexpa^BjWl« { ©„0,0, S.1JS.O.QA 0,0XW3J3,©M 0,2.3,1,1.3.3.1.1.0. 1.5.1.1.1.1.1.1.1.1, 1,3.2.1,1.1.1.3.1.3. 1.2.1.1.1.1.1.1.1.1, S5 UXUXU.U, M.MJUJIJUJ.
O.UAU.JM ©AO.MXI.OAO, OMOJUXOJW /*1———3———a———m—a-rwae—————————C——W{—SH———— v ®aEia(srgc^trgv) iat argc; Chas* *a£rgvO; < „ „ Made iat RcgiosaMapffcRegaoasRowsIkRegiosaCoisJ; char far *p>J; iat AvaslableRegsoas; int NoRfogs; float BJsgWM.th; NoRrngs - 6; RiagWidta - 8.¾ /* iaidaii^ the pixel map so pssst S© white region RegionMapikRegifflffiReiws-llO] ss fixed at 0 (white) Rsgioa^fep-TKRegioiBRfflws-lIl] is fixed as 2 (black)*/ fpris&(Mderr.\slmtiaKrisg asap); for (s « 0; i < 300; 5++) for G " ©: j < 304; j++> (asapJsXjiJOJ « kS^gIosRows-ί; nwi»lSi3-G; ί for (ai-Cfc ««ekRegionRows; 5++) for 08¾ jefcRegsoeCoIs; j+t) RegaonMiapiaJjJ « 3; /*imitsais2e ®o cm usable ·/ RegioaMapfkRegaoaRows-j! J0j[ - 0; RegiojaWbp(ldtb^foaRows-5X13« 2; fjarsat^aakkKri’^ajDoss® hexagons); RegsoaRow - 0; /* do feagife 30 raws */ for (I - Ος 5 < 300; 5 *- IS) {RegsooCal - Ος for G - for saapfefejj-rfli] - RegaoaGol; ) RegiosaRow +- 2; RegsoaRow -. 1; /’ do feagth 29 rows */ for (s -9; i < 295; a ♦« IS) (RcgioaC©! - €ζ for 0 - 5.: j < 300 - 5; j 4- SO) ( for (k -> Ος k < 1¾ k++) for (S « 0; I < 10; i-H·) if (bsxpstfkJHj <— S) {&&ρ{34&Χΐ*ϊ$0] « RegioaRow; aaapft-tScXHXl] " RegaoaCol; RegsoaaMapiRegaoaaRowJRegaonCoSj - 0; RegioaCol++; > Regio&Raw ψ- 2; ) fpriatfCatdsrr^sDosag faoder eardefX for (theta - 0«; theta < 3.14155’ / 2ς theta *- .035) /*„005 worked™/ ( c « Siw(ihera > « sia(£&cta); for (r - 0; r < NoRiags; ( JRJaagCoSorGoI » fr A SjS /*0 for wfcfee, 3 for black */ if (r > 0) rw&atb - RsagWSdtb; efee 'rwidth - Ring Wth/24 for (ri - ©ς rl < rwdih; rl *« Λ) C x * J + (((r - J) * rwidtaj) 4- ri) * c; y - 3 + <«r - -5) * rwidsa) + rl) * s; pi - 4soai<350+xIl5Cky)n^ if (*pi 'pa-9*»- fcRegaoaRows-l; *pi RsagCoferOoi" l pi - &3sM150-xMS5?MrpX if <*pa l)j| * 3; •pi®» « fcRegfeaRows-Ί; *pl -> RiagCoterCe< pi« &aaa^S5&*xIS50-yI®£ if (*pl •pi - RiagOaforOal; pi - &sxap[158-xIl$HrX0£ if (*pi *pi - RiagCoSoiOofe 7 ) ) AvailabicRegioas — 0; for (iM)>dkRegioaRows>l^«-<-) for (j—0: j /*Gtipas sap dasa to regiaap.OBt / ofjfe - opexO««ra^-LVr.O_WRONLY | O_CREAT | O_BINARY^_SWRnZX for (i « G; s < 300; i-*-+) < for (j-0y<304y++) c LfoeGXOl - swpXjm LsaeOiSJ - «βρβΕΧίί; > dmsi-asSeX eSfe - opcantei»oasXUr,.0_.WRONLY [ O_CR£AT | ojsniARY^jrarairEfc 'wiiSe(cSsfewRegsO!B>«&pi^ssK3£'(RegaesMiip)X, dksseXeOeX /* Psss tae region sap ·/ for (s-kRegaaERcws-S^^'-Op—) C psias£T\s%2^d " JX for ^-C^ if {RegioaMaojpXj? < 3) priasffft!„H«T,(j%SO)): efes prsasfCW.’x’X 0_TRUNC | OJRUNC | ) prsaifTX® X for (i—Q;’>-d3tegs©aO*fe;i+-a!0) pd&ef(*%l.ld "J/W); > /*ΛΖ 8 /'’CellCcde.c Go^jad Shah 10/26/87 Converts binary bits frosa As Bin,De,las bitstream base 3 levels for she available hexes in the isdicaeed 3x3 cell. Returns uusbsr of bits ssed.
Roetssc exiled with pointer te * 3x3 cell RegionMap. and index to the binary bit ieeata; Binary to 3 level conversion is done ssiag BiaHexJLUT generated by MkHexLUT.
Number of bits ssed is a ftssacdosi of she ansaber of hexes available Isa she indicated csH (See ?»ge 2$ lab book). «pinchedc -cioJx> •iaclwde #iachade #iacfede -rfcasHa» wancitsdc «estdixSs> *iachsde -csadlibJa> wisefade ««saaBteuho· #iacfe»de «assaaoJ»· #sacfe,'de ,«3aa8&Js> «bcisde <\s|»:\C5de\fabelA&> ist IFSie; aat I,VTBiaHexpsW}XnT3B32iS> exesra int Regiosi<£^kRe®Io-sR,o'ws)[kRegbaCsas> extern sts BsaData(KM©Biis); GeCfcaCodcO 1 ( «Fate - opcsaCBsnHodLUT^OJE^^ reed (srsteXUTSiisestsxjwnsoi^lLUTBiaKexj): read (S^xU.nB£S2^2S©fa.OT13H32)k cteeeiiirate); > /*,. . , -n«™— - ~ ...... iss mO^Isd^CeERew/»^} /•Rctaxas nsunbar of bfe «aeveKsd te ibexes; pBtnDais? points » next bat-/ iat Iadcx»CdSSow,€2eBCat < iat Eb3v4MTses.Cb«C<»2SjjA.^35tbisHe»!Ss^2xedHi5xes3isCon‘^srsed: ist C^SI^xJRxw'RswJRawCpiEJSexV^ee^isaViiiaEe; /•^riarfna&des %d CeBtow: %d CeBOsfc %dJbdex.CiiBRow.CeaCoiX RnwOffnst " CeHRow*3; ColOffsei - CelsCol'U; /*rissd the number of allowed hexes */ AvallableHexes « 0; for (i-0p<3p-w-) forti-0u<3;j-K·) if (RegjooMapfRowOffset + ifCOlOffset + j] <- 2) AvailableHexes+t; /•prlsiff available: %d.Avai]abieHcxes): */ BaaVadtoe - 0; if (AvaalableHcxes >-* 7) ' for (Ι«0;ί<Π;1-Η·) BlnValue « ( (BsnValue «1)1 BmDasa[Iadex++J); HexValuc - LUTBioHcxiBioValueJ; CELL CASE —~= 7 If (AvailablcHcxcs — 9) ί for (i->0;i<6;i++) ( RawRow -. Ro'wOffsist + (2-1/3); HUwCoK - ColOffsei + (I%3); RegaonMaptRavrRowJRawCol] - Hex Value % 3; HcxYatee - HcxValue/3; ) RegionMag^RowOffseilGalOnset+l] - HexValue: EtegioaMap(RowOfise$gC0lOifses] - (HexValue + 1 + (BisDatapadex-w·])) % 3; RegsonMap(RowOffsetXColOffsec+2] - (HexValue + 1 + (SinDatapnde&w*])) % 3; re&Bns(13): I/* FsS eeOs cossuleted */ --------------------·/ CsSSsdex « 0; FaxedHexes « 0; BitsCosverted - 0; If (AvaaiableHexes >« 7) { while (FixedHexes < 7) ( RawRow « RewOffses + (2-CeIlandex/3): RawCoS - ColOffsei + (CeIMadex%3X If (RegioaMapfRawRowJRawCoIJ <- 2) C Rlegi(MiMap{RawRowIRawGol] « Hex Value % 3; HexValue - HcxValaae/3; FeedHexes+K > GsKEadsz-H·; > AvaabofeHexes — 7; BaesOsaverasS - 3 Ϊ; } /Oxavers pairs ef sexes sate 3 bis usisg LUl’BH32 */ wfeSs (A'saliabfcHexes > I) < «β 0 SsssVeltie « (BiaDataJIades-»-*·] « 2) I (BiaDaafisdez-M·] « 1) ( (BiaDaa(Xo.dex++J); HexVsluc - LUTBH32(BiaVatacfc /* pranCfCBiaVelue^d HexValued&dRBiaVahseJJexValue); */ FixedHexes - 0; while (FixedHexes < 2) ( RswRow « RgwOffse?, + (2-CelHadex/3); RawCOI- CoiOffsct * (CeUIadex%3); if (RegioaMaoplxwRowJRawCol] < 2) { Regio&Mapf&awRowpu-wCol] - Hex Value % 3: HcxValue - KexVahse/3; FixedHexes++; } CclUadex-H-; ) Avssla&feHexes — 2; BisCoaverted +- 3: } /*Covert she rsEasisisg hex, if at ail */ if (AvailableHexes <— I) { iraxedHexes « 0; white (FixedHexes < H) « EtawRow « StowOffset + (2-CeliXsdex/S); RawCoi - CoiOffsct + (CcSBdex%3); if (RegteeMspPbiwRowgRawColJ <« 2) ( RegteiaMapiRawRowJSawColJ - ((BmDafcapadex-H·]) « 1); FixedKexes4+; } Ccll&adex++; f* prinrfrVaRowOftttd CoKXfftd dRowftd dCoL-%d\ Etovd3ffmt,Go!Oi?setjlRow,dCol): */ > BitsOsBvesrted+i; ) recajra (BitsCfenverted); > A2 101 /*' Filename: * Author * Date: Purpose: ORDER.C Donald G. Chandler, PA Technology October 24, 1987 Generates the ORDER.LUT look up table Modifications after November 15 release: / «include «include <3ys\typc3.h> «include «include main() { static int ordeifll J10] ( 107, 88, §7, 86, 85, 84, 83, 82. 81. 110, 89, 40, 45, 44. 43, 42. 41. 40, 39, 106, 90, 11. 22. 10. 21, 9, 20, 8, 19, 105, 91. 23, 30. 57, 56, 55. 54, 29, 7, 104, 92, 12, 58, 69, 68, 67. 66, 33. 18. 103, 93. 24. 59, 70. 71, 72, 65, 52, 6. 102, 94, 25, 60, 61, 52, 63. 64. 51, 17. 101. 95. 26. 27. 47. 48, 49, 50, 28, 5, 100. 96, 1» 13, 2. 14, 3, 15. 4, 16, 99, 97, 31, 32, 33. 34, 35, 36, 37, 38. 98, 108. 73,, 74, 75. 76, 77, 78, 79, 80, 109 i; static int ordering Π 0J2]; int i, j; int file; for (I - 0; i < 11; 5++) for (j " 0; j < ϋθ; J—) ( ostScr3ut(o?dc7[i£j] - !Ji®] fc ®rderiat(orderI5Xjl| - ijl] - j: > file - opesC-WRONLY' i O_CREAT | Ο_ΒΧΝΑΒΥ,5_ΪΨ2ΠΤΞ): wrase(fa!le.®«SerlBS.440X cSeseifsls); ) O TRUNC | 1.» a /*L®bel.h */ «define kRcgiosRows 34 /’’extra row for regions fixed biaek and white */ «defies kRcgioaCois 30 «defiae kNoBits 1292 Λ.Σ i 0 3 /'Label Goliad Shah 10/17/87 Routines to generate bitmap for a label from RegioaMap.
Uses KexMapJLUT to Had the region for each pixel is a 300x300 matrix. */ «Include -qo.Ss> «include <3ys\types.h> «include «Include -stdioJo·· «include -ostdiib.h> «iactede -ctiraeJs> «include «include -caxathJ» «Include <\ups\deasiiy2\labsl.h> FILE *bitmap; static e&sr stage map(300J304g2J f* 304 to allow Integer sssabs? of bytes for each row ’/ char Ljae[3Q4E2t sat nsgsoa; rat i„ j. fc, LRcgloaRowRegSonCoI,RSagColorCdl; rat x, y; sat fed; rat $S.e Sat level; d^ebae theta, rl. rwidth; doable c. c rat s; assigned char byte; LoadHexMap{) ( fpriatf(stderr?\atedlsg fees sap); ©file - opca(^exraapJ6sr,O_RDONLY j O_31NARY); for (a — 0; i <,300; s-w·) ( «adCeOe.Lase^seefiLisie))’; for ( fflapiHLOM LsaejTigOJ; ewPXim - tawGSifc > cSoseiofaieX I 104 Γ—-. iat LoadRegionMsp(RegionMap) int RegionMapfkRcgiosRowsXkRegionCols]; { int AvailableRcgions; fpiriaEi(stdsse*\pJ.02,diag region snap); afils - opeaCrcgionsJffl^O^RDONLY | OJ3XNARY); i - rtssd(ofile,RegionMap,kRegionRows*kRegiosColsa,2); dsseioOle); fpnatnstderrAB^tioo'msp bytes read:%d"J); AvailableRcgioos « 0; for (I"0;s-skR«gIonRows for (j—0; j-ckRegioaCols; j++) if (RegionMap[iXj] — 0) AvailabteRegions++; fprintf (ssderCYoAvailablc regions^bd'^AvailablcRcgions); retum(AvailableRcgions); FransLabelCRcsJtegionMsp) int Res,R(^nM29[kRegiottRowsX)d%c^ionCob]; ( bitmap - fopeaCbsaaap.o«r»wb); fpsaatf(s!dets-.*\aP!otsis(g graphics to bitmap); &i2E(R,as): SgraphicsO: for (s - 299; I s—0; s—) ( WM3§); for (j - 0; j < 300; j 4- S) ί byte *, 0; for (k « 0; k < 8; k-M·) ( level - ftegaoaMap[inap(igj + kM01X«aap{iSj + kjlft if (level > 2) level - & •.switch (level) < ease & level - ®; break; case 1: a (((a ·* j ·*· k) % 5) — 0) .tevd - 1; ebe level - 0; break; / fcafif toalag for 'gray hexes*/ ease 2: level - 1; Break; ) bvac - byte * 2 + fcw% } lpfetbyte(byteX ) 105 lcndgraphics(); fejeetQ; ) l!sl?(res) iat res; ( ....... fpriatf(bataaap,"%c*t%dRJ'7jres); ) IgraphacsQ ί fpriatf(bxixasp,%c*rl A J27); iejectO { fprint?(bstnxap,%ca^7); > lesdgawhicsQ C fpriatf(bisa2ap.*!%cerS,^7); } Ip2©tbyte(byie) easlgned char byte; ( putc(byie.fo3toaao); I Bise(foyteco^st) iat bytecoumt; ( fpria'if(b2tmap,"%c‘*b%d1Vs,s275,by«ecoaai); /* Filesaxae: * Author; * Date; * Purpose; Dliwrr.c Donald G. Chandler, ?A Technology August 1, 1937 Initializes the DT2803 image capture board Modifications after November 15 release: wtectede <$tdioja> wisetede <\ups\density2\dt28032s> mainQ Γ* program DUNIT initializes the DT2803 by clearing it and then loading the DT28Q3 output color lookup 'table according to: 0 - 63 monochrome intensity values 0-63 64 - 327 red intensity values 0-63 X2S - 191 green intensity values 0 - 63 192 - 255 blue intensity values 0 - 63 { ant a, j; -unsigned -dear far *sp; /* check if 2JT2803 is present */ if ((iapCDTSTAT) Λ 0x70) 5- 0x60) < fprintf(s£desr,\aAaere is no DT2S03 iastalled at base 0χ2Ξΰ\α): exit(l); ) else prsntf(\2DT2S03 is present as 0x2x0"); cIs-28030; /* send she REAS·1 CONHGURAHON command */ wcomm(3X , priatfnnThe DT2803 device id is switch case Cc pristfC^ETse DT2803 device is sot configured for interrupts); break; case 3: praatfCVaThe DT2S03 device is configured for interrupt ERQ2*X break; case 2: praatficSnlfce DT2803 device is configured for interrupt ERQ3"); break; case 3; priatfC^aTae DT2803 device is, configured for interrupts IRQ2 sad ΚΕφ); break; defante fpiraatf'(sad®n-5,i\BDT2803 interrupt oaafiguratioa set cxpccted\s"); exit(lX break;. > ©7 pristf('"\n > he DT2803 memory buffer begins at %s»rdate() * OxlOOO); /* set ap color ibofep table 0 ·/ wconuoo(Oxl9X f* send write output lookup table command ’/ wdata(0); /* output lookup table 0 */ for (ϊ — 0; i < 256; i++) c wd»'as(» % 54); iswji®ca(I / ¢4) ί .......... case 0: wdaia(63X break; ease S; wd&is{4§); break; case 2: wds,®t(a2); break; ease 3: wdataQ); break; default: fprmtf(stdmT.VBU&expected case is dtinit\n); exit(I); break; } ) prmtfCAaSssusag SET INTERNAL TIMING command); wcosams(0xl2X prisaC\nmsisg DISPLAY ON command): wcosxass(Ox20); /· write a test patters Esse the video memory and check it */ sp - OxaOOOOOOO; for (a - ©; a < 240; #+·») for (j - 0; j < 256; j-H·) < •sp - j; SfCspS- j) ( fprsatfCXaMemory eKor is DT2S03 video memory location %x\a".i); «ώ0)ε } sp~-K ) /* sesrssaS exit */ pristfCXsTsstisg sad cofcr itooksp table 9 aasfelixadon compbtc\nX > ios f* Filename: * Author: * Date: * Purpose: DTUVE.C Donald G. Chandler, PA Technology August 1, 1987 Puts the DT2803 image capture board io live mode * Modifications after November 15 release: «include «include <\aps\density2\dt2803.h> saasoO /* program DTLF/E puts she Image capture board in live or pass-through mode */ I wcaum(OxXe); /* select aapat look ap table */ wdata(0); f* number 0 (Input Is range 0 - 63) */ wcosnwa(0xl3X /* set to external video synch */ w»sms(0x23); /* set pass-through mode ·/ I $ 9 Γ Filename: DTGRA3.C * Anther: Donald G. Chandler, ?A Technology * Dais; August 1, 2987 1«! * Modifacadoos after November 25 release: «I *7 «include «include <\^\density2\dt2S03Jx> program DTGRA3 grabs an image aad puts at on the display wcoaun(OxicX /* select input look up table */ wdat^CO); /* osmbs 0 (input in range 0 - 63) */ wcomm(0xl3X /* set io external video synch */ w * Author: * Date: * Purpose: DTSAVE.C Donald G. Chandler, PA Technology August 10, 1987 Saves the DT2803 image capture board image to a disk File Modificadous after November 15 release: UtMfUfcttW 1« l* φφ «!IW StUU φ φ Φ φφφφφίνφφφ lit Mint! φφφ nil ίϊ» Φ« ι»ιβΛιι·ιι«ΐβ1«ι»Λΐι»ΐ« compile with COMPACT model (MCCC) φφφφφφί«!φφφφι«ι1ΐι1ΐι«ΐφφφφι«ΐι«ιφι*!ι ,jfc! DfcoSi (*ίφ WiiR iWlitiWUlllil Hull *j ill ΑπΑιΑΛιΑΛΆΛ «iacSsde «esaSsoJ»· «andade «featU®· ^include csy$\iypes.3i> leS&ckadc -csysXstatJL·» winda.de -do Ja> wiadade <\aps\deasity2\dc2803±> f* EflfiSAVS saves aa image file onto a disk * fee araagc fate format is just 61440 cousecutivc bytes, aa exact * nspSSca of fee screen memory */ «assaCasgcycrgv) sat assgc· char *.wrgvQ; ( isi ©fife; ©fife ~ opea(asgvi J,0_WRONLY | O__BSNAR Y Ϊ Q_CREATJ_rWRnE); /* opea */ wrs8e(mile,0xl0(W01. * MEMSEG.61440X /* write direct from swreen nem */ Ϊ 1 Γ Fsleaasac * Author: * Date * Purpose: DTLOAD.C Donald G. Chandler, Pa Technology August 10, 19S7 Loads the DT23Q3 isaige cantsrs board from a disk file Modifications after November 15 release: φ»[·ιι#ΐΑιΑφιήφ(φ{φφι*ιιΑι*ΐΐ4ι<#ι*ιι*ιΑιΑζβ9(Αφι·Μ*Μ4ΐφφφφΐ4Κ*ιννΦι*Φ<*>η>ι*ΐ*ΐΦΦ<«ι>>·ιΦ compile with-GOMPACi model(Batch Site MCCC) A' wo^iotit*! winds υβΐυβί ΛίΑ'ΛΙίΑιΑίΛ ι*ιο|;φι*!υβΐ(·!οβ]φ ΙβιΑίφ Λ!Λ!ΑΚφιι#ΐΐφ!ΐ#ιι#ιϊιιϊπ #sacioQe #inctade «iaelude «eindEde «sys\ss'cis> tciadsde «3s©Jb> ^include <\sps\denssty2\dt2S03Js> /* DTLOAD loads an image file from a disk the image Site format as jest 61440 consecutive bytes, an exact * reptica of she screen memory */ saaaa(asgcyKgv) sat serge; char *argv0; { int sfiSe; ifife - opcn(a?gv(lJ.O_RDONLY § OJSHNA3.Y); /* opea the file */ read(s£3te.®xl0O©OL * MXMSSG,6S440J; /* read is directly onto screen */ ί ί 2 f* jedfeaiame: * Author: * Date * Purpose: NORM.C Donald G. Cfaadler, PA Technology August 30, B87 Normalises the image on the DT2803 screen Modifications after November 35 release #mctade -esadioJa» •iac’ade maia() ( static assign,ed char far M240P56J siadc mssgaed cSjsb· far «wotJ24©S256J caar far *sp; int T&sr„ ©»t rat i j; int p&el inf max, naira; Seat ης /*' copy ia «fee .screea data */ ’ gescresaOs): •f* ioop oe small essBered, tiods 7 far (row - 10; row < 23¾ row 4- 10) < f* d© far .graph 7 for (i - 0; i < 1¾ «-«·) for (ί·.- Οζ j < 5; j·*-*·) C ' •φ - «XlOO» * MEMSEG) + «239L - (row + I)) « g) * j: •sp- 127; > for («Λ - !<£ς col < 24¾ eol +— 16) ( ®aauc« 0; ϊώ « ΪΟΟ; /* fed. max »ad .sis. is, fager sssroeadisg fcfcdfc */ for (I - -1¾ i < 3¾ iw) for 0 - -1¾ 3 < 3¾ ί pixel - ia(row ♦ ijjooi + jj if (pixel > max) max - pixel; ST φχχβϊ < mis) mis - pixel; ί Ϊ 3 ) /* aorsssJizc centered block according Jo max aad min vaiues */ m « 255. / (1 4- (saax - sain}); for (j - ¢, a < 10; w-*·) for 0 Oi j < j-w) aserav * aJcoJ ·*· j] * (m * (iafrow *· ijeol + jj| - min)) / 4; > Z* copy data back to screen */ pu'tocr©sa(ost); Ι-ΛΓ1 I 4 Γ rdcasxae: * Author: * Date * Purpose: HND.C Donald G. Chandler, PA Technology October 24, 1987 Finds the center ©f labels and susrales the image Modifications after November IS release: «include «include -emathJ» «Include <\ups\density2\ge©2aeixy2s> «include <\ups\dcssity2\dt2£03Jh> Γ This program finds the center of a label.
(«I * Tse process has a rniultiaegs hierarchy.
«I * The fast stage scans through the Kisses looking for linear (1-D) * carretesios to exceed a threshold.
* * Tse second stage is invoked at any point where the first stage passes.
* This .sags does a asalS 2-D corrdatsoa.
* If this correbtios passes, a larger 2-D correlation is done.
* If this passes, the center feas beea ffscad. *7 «define FFLEN -«define 5TMAG «define FLSM «defee SLSN «3 /* length-of Saslf of symmetric prototype filter ·/ 400.0 /* psnsi© fates· designed for 400 pixels / and» */ /* l··© scad 2-D filter fesgths */ f* sbesi 2-D filter length */ unsigned char far sn(VKX3C3F!X5: j* input pixel array */ unsigned char far ooC^5®Q(HPDCJ; /* output pixel array */ static float odfslterPFLENJ ssafe «feat tdfiiterpFLENXFLENS » fett ijsax - 0; ist jseax - 0; fleas ia&rpZdO; fe®: fifessadft fet SterfdO; jajatyaQ ( /* read sa t&e praostyp® Star asd design 1-D and 2-D taltess */ pristiXTEDcsigfeg SsksTc 1 § /* read is She screes */ priatfQaReading is toe screen); ge&c?eea(£a); if (SaKsfflrld(odf2lser)) < pristfC\aNo valid center fonnd\n); es&O); ) saerk(aasaxJnxax,GREENX priaifCXsRescaUng); rsscaieQ; pBSscress(os5); s Boat BSterZditdfilserJlesJIes.jicestcr.jcesterJextestJextest^oior) Seas KSfitos^FLjSHXFLENJ; sat Sea^ jlen. ifesater. jeeaasa, iexteat, jextest. color; c sat 5, j5, fe, > feat sssx, sasaj' max - -4.85210; for (i « $©52®sr - iexsess s <-> iceaSer 4- aexsent; i-κ-) ( marfcCijceaser - jsxteat.color); ssarkOUeeaesr ·*· jexteas»eofe); for 0 feeater - jexteat; j <- jeeaser * jsxtest; ?·?-«-) { sbszs - 0; for (fc « 0; fc < ϋαβς k++) for (1« 0; 1 < jlen; 1++) $asa tdiiltexfkp] * in(i + k - ilea / 2j[j +1 - jlen / 2χ if (sasa > max) < . pax h sues; fcaax - s; feaaitx w Jr j!'*1*1· > > priistf^aMax «· %f\zaax); r®casx > sat fBssrldCe^a&r) Boas sdfSssrfKJS^ ( isst a, j, fc; a g float saa, smooth; smooth - Ος for ¢1 - 32; 1 < V?3K - 32; 2 2) ( eark(t32.GREENX E^fca,S?CC - 32,GREEN); for ϋ - 32; j < ΗΡΣΧ - 32: i+O ( areas - 0ς for (k - 0; k < FLEN; fcw·) sraoa +- odfilterikj * iafiXj + k - FLEN / 2£ ssocth « smooth * .95 + .05 * sum * ssa; if (smooth > 6.0) ( if (fil«cr2d(&tdfjaM(H-EN - SEEN) / 2£(FLEN -SEEN) / 2], SLEN^LEN.ij,5^0,SLUE) > 30.0) if ifilter2d(tdfilter,FLEN,FLENlimax,jmaxa^,RED) > 50.0) xesara(0X smooth. -> 3.¾ > } > msr&OX > feigs(cxSfaterwidfateef) Scat od£Bss Seas teOtssJO^iXFLSNJ ( HIE *ssreas; static float prifeer^H^Tfe fioat xpos, ypos, fpos, foaepos; fos ipos; sat ζ j; /* read ia the .prototype falter */ stream - fopeaf\\®P«\\iS£sis\\2fflpubej!3irsf); for(i - S; i < PFLSN; «·+) fstaasfistteasa,'’ %f ’^kpfiltesfaK /*' design 'fee 3-D faiter based oa bonae-aaS magaifaeatsoe */ for (Ϊ - ©u < ELEN; *«-} < £pas - f*M? - FUSN / 2) · (PFMAG / SMAG)k ipos - fjpos; foaepe® « fpe® - ίρβς odfUtesJa] - (3. - fxaepos) * pfStesfipos] ♦ ftaepos · pSim^ipas + !£ /* design she 2-D fuses· based oe hmsoaiad sad vertical magsaaficatiea */ for (i - 0; j < ELEN; h-0 ( ί ί 7 ypos - (j - ELEN / 2) * (PFMAG / VMAG); for G - 0; j < FLEN; j++) { xpos « G ~ FLEN / 2) * (PFMAG / HMAG); fpos - foypot(xpos,ypos); ipos - fpos; fsacpos - fpos - ipos; if {{apos + 1) > PFLSN) tdfiltetjilj] - 0ς else «dfilterfiXj] -(1.- fracpos) · pfilterfipos] + ' fracpos * pfilierppos + 1J; > ) } srcs«sJ®{) { float al, &2, bl, b2; static sat ixow(220j; static sat lcol[220J static float fws<220J; static float £eaHp20]; sat s, j; aat pixel; bl - VMAG / 1504 al - wax - bl * 1104 b2 - HMAG / 150ς a2 - jmax ~ b2 * 3104 for (s - 0; 5 < 220; 5++) ( frewy,] - al; srowjs) - irowpj frowpj — fctofflij - 3¾ scalp) - fcolp]; ieolpn] — IcGipiJ al +- bl; > &2+— &2; ί for (a - 0; a < 220; s++) for 0 - ft j < 220; j++) ( pixel - iatesp2d(f3r©w(iKfooI^Jjar®w(s],5iasl(ii3); caritp + IOJ + ISj^ixel); eo'<5 + Wj£| + IS] » pixel; float 5aterp2d(yi,x£»yxxS) fleas xf, yf; ist xs, yi; 1 8 { /* bilinear interpolation io 2 dimensions for positive x, y */ /* formula courtesy Goviad Shah ·/ int iO, 51,52, S3; /* sacaghboraag points */ /* get the £bsr pixels of interest */ - is{fy5Ixi5: al « + s2 - ia[yi + !Jxs ·* 1J.. « iajyi + 1I»£ /* reruns Interpolated value */ retura((ik»t) (50 + (51 - 10) * xf + (53 - 50) * yf * (10 - 51 4 12 - 13) * xf * yf)X it 9 p Fileaarae: CLOCK.C Author Doadd G. Chandler, PA Technology Date: October 20, 1987 Purpose: regenerates the hexagon clock from mcomplete hexagon edge information Modifications after November 15 release: */ waschsde #aacludc Wdefine MEMSEG QxaOOO *de£mc PS 3.1415926535 float huge real(2561258]; Hoax huge 2ΐιχ[256£258£ extent void far fortran r2dfft(); p provided by Micro way, lac */ extern void f&r fortran r2dift(); p me library sms2fftlib *'/ static Song far fftrowarg - 8; static Song far fftcolarg « 8; static float far ffsscale2rg - LO; static Song far ffsdimarg - 258; dotsbie £lfessr25'S{); jaai®(argc»argv) rat arse; char *argv£J; ( rat i„ j; fesg r. c, d2; .double angle; p Read in she image */ get256(real); P Form she rsancted deviation map */ »S256(rcaS^ttx); pa^5€(real); /* Waadow the map */ waj«iow256{real); pa£251.&ffscal«airg,i^fsdiearg5; P Resaovg cosnponeats of wrong freqnency or direction ·/ angle « fflter25^(scaE); 120 /* Inverse 2-D FFT */ r2dift(nsal,&fftrowarg,&fftcolarg,&fftscalesrg^kfftdimarg); Z* Determine major axis */ &aajor(rcaJL2ng!c); /* convert valleys to peaks */ for (1 - 0; 2 < 256; 24+). for G - 0; j < 256; j-+) if (jrcai[i][j] >« 0) rcalfiXj] - else rsaJpXiJ - -rmJfiXjJ put256(real); sd256 float huge M256I258X C iat i. j; /* square a into b */ for (· - 0; 5 < 256; 5++) for G " 0; j < 256; j++) M®] - * 4%' - n + 4® 4 > bfijj - η ·*- ΜΦ3 + MOi * *£ Z‘ do the column sums for a and b ·/ for (i « 0; j < 254; 1,44-) for 0 1; j < 255; j-w-) ( - 211] 4- * 2O + IO Mi - sja] 4- + Ms + 15¾ > /· square a into itself */ for (i > Cc i < 254; :,44) for G - G; j « 254; jw) f* osmpats standard deviation */ fee (» -> 254; ! > 0; i·—) a[i ♦ Ilf + J] - sqr^doubte) ((9. * Wi! " / 72.»S 121 /* zero out the edges */ for (i > 0; i < 256; a*+) afilO] -· 8(11255] - 40Jii] - <255^1 Ος wmd0w256(?eal) float huge reaI(256X258t; ( sat a, j float r; /* perform asdics based wiadowfog */ for (i - I; 3 < 255; a**) for G " 1; j « 255; j++) ( r - sqrt((doabfe) (j - 220) * (1 - 220) -(j~ Π8) * ϋ - X22S)); if (r > 227.) nsdplj] - 04 else if (r < 22.) realpxn « 0ς else if (r < 30.) real(’O ·- (r - 22.) / 8; else sealFIUJ J4 + .46 * cos(r * 2 * PI / 255); } gct256(array) float Stage 3rrayp56X25SJ ( isi sow, col; essagaed ehar far *sp; /* copy pixels frosa screes to aaesaory */ sp « (unsigned char far*) (GxlOOOOL * MEMSEG); for (row « 0ς row < 240; row++) for (col»« 0; col < 256; cob*) arraytrowjTeo'i!?! » *sp++; for (row « 240; row < 256: r©w++) for (col « 0;-col < 256; 00I++) array^rowjcss] - O4 > p®t256(array5 float fesge surcayi256I25S£ ( isst row, col; esssigaed saar for *sp; float Esax. scale; /* watoscale */ max - Ijc-IO; for (row - (¾ row < 256; row-»-*·) for (cel - 0; sol < 256; col·**) 122 if (sjrrs.y[ro^Xcol] > max) asr, - s7Txy{raw J[ea’-£ scale - 63.999 / saax; f* copy so screen */ sp « («assigned char far*) (OxlOOOOL * MEMSEG); for (raw - ft row < 256; tow-h·) for (col - ft col < 256; cok+) *sp++ - scale * Kraygrowgcol]; > ptsusag256(conip!tcx) float huge complex[256X129X2]; ( iat sasnow, row, ccft esEsagaed char far *sp; fte ssax, scale; fitosE r% f* vatxwss&t */ «sax 3.c-lQ; for (nw - ft sow < 25ft i»w+) for (col « 0; col < 12ft col++) if ((r2 · (complexJrewJcoIjO] · cesEplex(st5wXcolX0J + coraplexisowXcolil] * ββαφ^φ^Ι®^!1))) > mx) sas - .3¾ «cade > 63.999 / /* copy to screen */ .sp - (unsigned char fas*) (OxlOOOOL * .MoMSSGX for (nstow - ft sasow < 25ft wm) ( sow - (128 + bestow) % 25ft for (col « ft col -s 12ft c©l++) ( sp « (assigned char far*) ((MSMESEG * OxlOOOOL) + ((long) aosow « g) + ¢0¾ *sp -.scale * $qrg(eoasple4r«wlcoll03 * caraple4w>wlcoll©] + .coBssplexisowXcolXl] * ) > > double £2tcr256(cstt3plex) Boatt hags es-'2®,pa«xpS6I12#’X2> < art i, se, ji; double sagie, slope; doefcfe lew®, feigisO; dsefcfe lowi, iag&l; «feeble tewX feagsS; donbfe seax; doable sft sat nssx, csax; 122 puraaag256(cowiex).' f* remove the sOw fregueacy components */ for (i - 0; i < 45; 1++) ( jl « 25 + sqrt<45. * 45. - 5 * 5); for G - 0; j < ji; j++) eosaplex(i£jX0J - cosnptefiljlSJ coaaplex((256 - a) % 2S6Xftp] - cosaplex((256 - a) % 2S6Iftl] - 0ς ) putx3ag2S$(cffisspssx):...... f* remove the high frequency components ·/ for ( I - 0; < 129; a++) { if (· < SO) jl - J + scFSpO. * «0. - a · ifc ease jl - 0; for (j " jl; j < 129; j++) cosaplexpUJO] - CQrapSexpXjXS] » complex((2S6 - a) % 25δχΠ(0) - comp!e3tf(256 - i) % 2561«! J - 0.; ) pntmag256(eomplex); f* ifisd bright paint so detsmaise ssar axis srieatatioa */ sax - Ιλ-30; for (I - 0; a < SO; I++) for (j « 0; j < SO; j++) ί s2 - ©csspfcxga!)JO) * oaspicxjfaJjJOT; + asn^fexpISX»] * cospEesiiXjXH^ if (r2 > max) < max - r2; arsssx - % ) ) /* praatfCXaCaTOEXsCxasax) » (%r^sssax,e32sax)c*/ angle - asaa2((dcrab!le) Ksax.(d©iBbfe) cssax); /* esosapiaSe tapper and fewer boostd of slopes jf«r dsnsctaoaal fates */ ltow0 " aua(aaigle « Pi / IS.); fewl »> mCaagfe - ΡΪ / IS. + H / 3.^ Sow2 - tass(aagae - ϊί / JS. * Η / HghO — &3(xaigss + FI / IS.?; higfel « taua(ataag!e + FS / IS. ♦ W / 3 jfc K;g!h2 - aa(sagfe * M / IS. * FS / 12% Γ prantfrV»ngie - %£ (fewOjaghO) - Cfcf.%0; (few!Jbsghl? « 124 i - (25fi + am) % 250; if (j) stops - (deeble) (ssa) / (doable) (j)' else slope - I.e 10; if (bighO « tew©) ( if (((stops < tewO) ife& (stops > highO)) && ((slope < tow J,) I (stops > high!)) &&. ((slope. ksg&Z))) βΜηρϊ«4ξϋχ03 - «Μβφίβχίίΐϊχΐΐ - 04 } else if (MgaJ < towl) C if (((stop® < tow©) | (stops > tags©)) && ((stops < Jowl) ΑΛ (slope > high 1)) <·& ((stops < tow2) | (slops > hign2))) c©anp3edi£jl®j - coEaplexfaJjXlJ - 04 } else if (bigisX < tow2) ( if (((slope «5 fowO) g (slope > high©)) && ((stops < fowl) I (stops > high!)) <&& ((stops < fc»w2) AA -(slope > ihigM))} eemptodsJjJO] - cosaplex(iXjXlJ - ©4 > else S (((slope < g (stops » aigaO)) && tops < fowl) I (stops > hlgid)) *&& pe < fow2) g (stops > high2))) « sempfexiriJjXl] - O4 rstsrB(a=!gto)c majorCreaLaagfe) fioat hage rca^256l2SS£ doe’sto asgie; ’ ( . iat crib* iat i, j, ji, j2; iat ix. iy; fet ς deafefe £*agfcs eaagfc, 3s#xsagfo doafefe x, y„ dx, dv; doafcfe isxxsBia.,, /* perform three Kids to detcsmme major axis orieasataoa ·/ ίΐχω·τχΛ«.»ημ^-Μ» '’‘«ji for (trial - (5; txml < 3t trad**) ( magfe - «agte + Kid * H / 3ς /* f* compute dasectaoa to a comes· */ «angle - tangle + H / 4. + i * ΡΪ / 2ς f* compute x and y coordinates of a corns? "/ x * 125. + 106.066 * y - I20. + 106.066 * sMswsgM; /* ©osspsis beadiag tswasrfs next comer ·/ «angle — .75 * P£ /* compute x and y increment values */ dx - cosieangle) / 2ς dy - a5sa(cangte) / 2ς for (£ - 8¾ < < 300; Ϊ++) ( ix - x + 35; iy - y + JS; ;mark(HyJxJ27 + 64 · trial); if (realty Xix1| < Ls2) reallyJix^ +- 2.e2; x +— dx; y +- dy; } > f asm the absolute values of posats ia bounded area of real */ JE3 — for © - 12; a < 228; S++) ( . ' /* seas, fee leftmost boundary ·/ fer Q - 2Ας j < 236; j++J if (naffi > 1x2) (foalpia — 2x2; break;} /* seaa for rightmost boondaxy *’/ for® -235; s~ χ jH if (rea^iJjSJ > 1x2) (realSJju J —> 2x2; break;} for Q2 - x j2 <- ji; j2++) ( if res2p|j2] —2x2; arasa +- fafes((dettfel!e) reals3(j2p; ,/. : ' /* priaa("\aTjdaa %d a£ angle %£ fas sum - %T»trial,iangle^Kai); */ if (sura > emxsues) c asaxsasai — res; rsaxaagle - tangle; > > priaeET^H'^wxtngfe^ > int OTarifc/ow·^χΟ,νχΙαβ} /* Marfa * poiat e® tbs iicrees and retains fee existing value ·/ in; nw, cd, vsfae; ( unsigned char far *fa; int pixe% 126 sp - (uassgaed ehsx far*) ((MxMSEG * OxlOOOOL) + ((long) row « g) + coj) pixel - *sp; *sp - value; rctusa(psxei); 127 /* rslcssame: * Author * Date: * Purpose: SEARCH.C Donald G. Chandler, PA Technology October 27e 1987 Combines information from the clock regeneration and the hexagon image Modifications after November 15 release: * SEARCH should be compiled with MCCC κκ**ι**ιβά·ι*ιήΐΜ«|·ο{ιιήιη«ήιή<Β*ήι«ι*>|:Μ,8 «iacisde wiffldtade *saelade «sscteee <£ys\typcs±> *iaclude #isuc3ude #2BcSB «define ΡΪ 3.3415926535 ist cvalp5jjf32 J int svaii35S3t2£ sat j*aI{3SS32fc sat g'V32p5X32t int gvaHiav(35]i325: sat Essigsed char far ¢:1(2401256¾ uasigaed ciaar far grey(240g256X safe ist static 5»C cp&gTeJ; mats dar **rgvf> C jjoy κ®ζ ia£ A Sat flag; iat icnax, jseaaatj sat ifife; doable tfccta; /* compete tbe appropriate relative search directions and locatioas based ee tbe major axis angle */ p0at£C\aEaCter tbs major axis aagte 128 scanff* %lf *^&theta); theta « PI / X + theta; /* angle inpat is pexpendicular to axis */ dwscsiciss(Shesa); /* get tibe clock array */ getstaeeaCck); /* get the grey xsxsy */ aisle - opeaias^viSJ.O^RDONLY J OJSSNaRY); /* opes the file */ readpfiiewOxSOOOOL * MSMSEG.6I440); /* read it directly onto screes */ getseseeaferey): /* initialize the search arrays cval. gval. aval. asd jval */ isjitsearch(theta); /* saain search loop */ ioop: max - -5; feg - 1; ,/* «isseca, for fagest clock value ©a grid */ /* also check if entire grid s gopelassd */ for (s« 0; ί < 35; ·«+) for G - 0; j < 32; j*+) ( if (e^aSaXI], —«0) flag « 0; if '(cvaMXji > taax) ί raax m evalpIO; 3M23X - ζ jtaax - χ . 5 if (flag) goto faSgrid; evnlprasxjjmaxl« -cvaJiaaxgjisaxJ /* pdatfC\nOa grid (imaxjmax) - (%d»%d) located at (%d,%d), fiaaxjffisxJ^ilmaxjOmaxjJva^isax^jKaxl); */ » f* insert «dock, gsrey. «ad (m) *aJtaes of any neighbor no: prsvfeeiy Inserted */ f feop ·/ ge© bops foSgsid: gnSatOBtO: caaaasgridQ; > snscrt&j) inii, jc < tiase iat ipfassfo] * 129 sfedc int oddjplm(6J - (1.0,-1,-1,-1,0); static iat eveajplus[6) « {2.1,0,-1,0,1): 1st pos; iat ip„ jp; ins r, c is* Ti. cS; int max; sat saearch, csearch.;· P isarcses x hexagons neighbors */ P % ((5 + j) & 1) stark(ival(iJj),jvaliiJj)«GREEN); efee Esark(ivtd(iIj)JvBi[iljKRED); 7 ip - msl[ilj£ jp sssark(Ipjp»GREEN); P check for conditions which terminate iteration */ for (pos - 0; pos < 6.; POS++) c sp - s + iplcs(posj; if 0 Λ O jp j + oddjpl®s[pos]; else jp « j + evenjplu^posj if (Sp > 34) coatisus; if (ip < ©) coatiase; if (jp >30 offense; if (jp < 0) continue: if (cvelSspXipJ 0) ( P eoaspnte expected position of neighbor ·/ r « xpte[posj| + ival[i][j]; C " cpicsiposj + jt P do first step of gradient search */ rl - r; ci « c; max »* £ς · P pristffXnStart search for pos - %d at (%d,%d) - %djxe^,c,ck(rlcj);7 for (xseaxeh - r - I; «search <- r + 1; rsesrch-H-) for («search - c - I; «search <« c + 1; esearch-H-) if (cSdssearchgcsearchli > sssx) ( max - «S^Esescxhlcsearc&J; rl - rseaxgfe; c2 - «search; p d® scsasd step ef gradient search ·/ r - id; c i" ci; p printiX^nBest step S for pos - %d » (%d,%d) - %<Γ4»«βΛθ,οί<ΓΪοΒ;*/ for '(raearca - ri - i; Kssarch <- rl + 1; rsearch-H') for (cscascii, - cl - 1; «search < cl * J; esearch-H) j£ (ci^rsearca£csearc&j > saxj < max · c&frsearc&Iescarch]: 130 r « Sae&refa; c - csearch: ί /* pnntff\&3ess step 2 for pos « %d, grid(%d,%d) is (%d,%d) « %d p^JpG^r^ekMcl); */ /* opdaxe cval, gval, ivsi, sad jval */ - 1 + S * ekirlcj (cfc[r - Sic - 1] + cfcir - IJc] + ck[r - IJc + 2] + ck[rXc - S] + ckjrie + Ϊ] + ck(r + ijc - 11 + ck[r + ljc] + ckV * SJc + 11); i*al(spXip] -· κ jvalj[spljp]| - c; gva$ipgjp] - grctfrlc); hfetosgiSfisO < iat i, j; ias min, tow, Ugh; static sat /* ©sate-grey level histogram of-gval entries */ fee (1 « 0; a < 35; i*+) for 0 - 0; j < 32; j++) bHs^®Ih+; /* plot ·/ for (i « 0; S < 64; »♦+) pristfiW2d: J); far 0 " Θ; j < / 2; j++) priatfT’5: /* determine slicing levels */ gala - '10000; for (i - 3¾ i < 32; i-H·) if (banfsj < sasa) ( sejb feMijS ™ 5; ) rexs « 10COO; for (j - 3¾ s < 54; 1++) if (feseji] < sssa) ( min « fessi£ Γ &as */ for (S — C; I < 35; 1 for ϋ - 0; j < 3% j-H-) if (gvai[ixj] low) { mark(iva^iIj]jval(iJj3.GREEN); gvaljijj] -, 0; else if naaxk(ivaI(i]j]Jval(iJj]3ED); gvaslilin - S: else ( gvsjrjgj] - 2; ) prratoutQ £ aat a, j; static dsar bgwstringQ - *BG V; psraatfr\s\agrey wises): for (5 « Φ, i < 35; w+) ( praatfC\n%2±"JX forG-0; j<32;i+4) pdas£T%c .bSws£ring[gvaJJ'iJjJ3X S /* prsEtft\a\sai wines’): for (s - (¾ a < 35; 54+) < priatft\n%2dT^); fee (j - 0; j < 32; j+O priatff %3«Γ„Μ«ΧΠ); } prsatft\n\nj vaSsses); for © « to; a < 35; i+t·) < Fstfr\2%2e^ for (j - 0; j « 32; j4+) Emir %sr } ·/ Eriseaxh(t&eta) dosbfe theta; < iat i j. k. fc rat sues is: max, am, jmxc; doobic fiaas, Qeaax, max, tbs&uoax; 2 am ssstt, jsert; /* find location of largest point near center */ saax - 0; for (i - 9ό; s < 244; j++) for 0 - 204; j < 252; j+s·) ( «am - 0; ........ · for (k - ~I; k <- 1; k++) for (1 - -2; 1 -ο- ϊ; 2++) if (k | 1) — efc[i + kjj + 2£ else sum +- 8 * ckfi * kjj + 1J jf (suss. > max) ( issax « sum; w 3ς jbw: « j; priatfQaOa serosa (asaaxjmax) - (%d»%d)"Jmsxjmax); f* compute appraxiasaie p-edrisE os grid */ /* start by converting max location to poker relative to major axis */ .fisaas· «.sax - 1204 fjssax - jsaax - 228ς max « sqprt(faaax * faaeax + fjmax * fjmaxX fostsssss « fes - atao82(fiamx,f jmaxX issrt - 2 jJS + rrnsx · caa(iSaeOTX£6ax) / 43; jsert - 16. + saaax * cs^tiaes&ssax) / 5.0; psiaiaeerdag into grid at (Ij) -

Claims (5)

1. An optically readable article storing encoded information comprising a multiplicity of information-encoded polygons having the same shape and more than six sides, said polygons having one of at least two different optical properties, characterised in fh&t the said polygons are arranged with the geometric centres of adjacent polygons lying at the vertices of a predetermined twodimensional grid, and in that each polygon is substantially in the shape of a hexagon.
2. An article according to claim 1, characterised in that the grid is a hexagonal array.
3. . An article according to claim 2, characterised in that the hexagonal array has three axes spaced SO degrees apart.
4. An article according to claim 1, characterised in that the said optical properties are the colours black, white and grey. 5. An article according co claim 1, characterised in that the polygons are irregular polygons. 6. An article according to claim 1 or 2, characterised by further comprising an acquisition target in the form of a plurality of Concentric Rings (372,373,374,375,376) occupying an area on said article separate from the area occupied by said information-encoded polygons, each Concentric Ring having one of at least two different optical properties in alternating sequence. 7. An article according co claim 6, characterised in that the Concentric Rings are centrally located on said article. 155 An article according to any preceding claim, characterised in that the polygons (340) are totally contiguous . 9. An optically readable article storing encoded
5. Information, substantially as herein described with reference to the accompanying drawings.
IE960903A 1988-04-08 1989-04-07 Polygonal information encoding article IE80888B1 (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
IE112689A IE75212B1 (en) 1988-04-08 1989-04-07 Polygonal information decoding process and apparatus

Publications (2)

Publication Number Publication Date
IE960903L IE960903L (en) 1989-10-08
IE80888B1 true IE80888B1 (en) 1999-05-19

Family

ID=27270354

Family Applications (1)

Application Number Title Priority Date Filing Date
IE960903A IE80888B1 (en) 1988-04-08 1989-04-07 Polygonal information encoding article

Country Status (1)

Country Link
IE (1) IE80888B1 (en)

Also Published As

Publication number Publication date
IE960903L (en) 1989-10-08

Similar Documents

Publication Publication Date Title
EP0573129B1 (en) Polygonal information encoding article
EP0336769B1 (en) Hexagonal information encoding article, process and system
US4998010A (en) Polygonal information encoding article, process and system
EP0537284B1 (en) Low resolution target acquisition
US5223701A (en) System method and apparatus using multiple resolution machine readable symbols
US5153418A (en) Multiple resolution machine readable symbols
US7181066B1 (en) Method for locating bar codes and symbols in an image
EP0484132A2 (en) Multiple resolution machine readable symbols
EP0607298A1 (en) Identification system
IE80888B1 (en) Polygonal information encoding article
LV10820B (en) Polygonal information encouding article,process and system
DK175743B1 (en) Polygonal information encoding article, process and system - optically scans data array of information encoded polygons to retrieve information
NZ260173A (en) Optically readable label with information encoded polygons: optical and computer system for decoding
DK175729B1 (en) Hexagonal information encoding article, process - assigns optical properties to individual hexagons by ordering, hexagons in predetermined sequence

Legal Events

Date Code Title Description
MK9A Patent expired