PATENTSCOPE will be unavailable a few hours for maintenance reason on Tuesday 19.11.2019 at 4:00 PM CET
Search International and National Patent Collections
Some content of this application is unavailable at the moment.
If this situation persists, please contact us atFeedback&Contact
1. (AU1996077322) Aligning machine-readable codes to printer pixels
Note: Text based on automatic Optical Character Recognition processes. Please use the PDF version for legal matters
yield of the Invention
This invention relates to precise printing of one dimensional and two dimensional codes used for identification purposes and, more particularly, to a method for compensating and correcting for geometric distortions introduced by printers to ensure that the printed codes are accurate and machine readable.
Background of the Invention
Identification codes, such as one dimensional codes (Bar codes), and two dimensional codes (Datastrip codes), are widely used for purposes of identifying items, products, and/or individuals, as the codes are read by intelligent machines. However, such machine readable codes must be printed very accurately in order to ensure that the code(s) are uniformly and accurately read by the intelligent machine(s). Even small errors in the printing process can result in a code that is unreadable by a particular machine, thus making the coding process unusable for its intended purpose.
For example, two dimensional codes (2D codes), such as utilized by Datastrip Products Inc., must generally be precisely aligned to a particular printer's pixel array when printing the code to avoid geometric distortion of the code bitmap. The geometric distortions result from small scale factors applied in the horizontal and vertical dimensions by some printer drivers and printing applications (such as Windows print drivers, and Windows graphics applications). Slight scaling (e.g., 99.5% to 100.5%) is not uncommon in the bitmap printed from Windows. The scale factors cause the code bitmap to be expanded or shrunk by replicating or deleting rows and/or columns of dots in the bitmap. This destroys low-level, localized, geometric characteristics of such codes, making them harder to read, less reliable and possibly rendering the codes unreadable.
A significant problem with printing bitmap image» using commercially available eoftware in device-independent operating environment» such a» Microsoft Window» (TM) is that alight scale and/or rotation factor» are often applied to the printed output produced by this software. For most word processing and illustration purposes, these scale and/or rotation factors are unnoticeable, However, when attempting to print bitmap images of encoded data which require accurate geometric characteristics, the pixel shifts, and added or dropped rows of pixels distributed throughout the printed image as a result of slight scaling or rotation, can produce significant geometric distortions.
An example of attempts to correct for printer scale and/or rotation factors in word processing applications is shown in U.S. Patent No. 5,459,828, granted to Zack, et al on October 17, 1995. This patent teaches a method of producing a raster font from a contour font entailing the steps of deriving font metrics and character metrics of font characters in terms of arbitrary font units, scaling the font characters to a selected size and output resolution and altering the thickness of vertical and horizontal strokes of each character to a desired thickness. In essence, the thrust of the invention in the Zack et al patent is to modify the appearance of a particular character in order to make the character appear uniform to a reader.
In contrast, it is the object of the instant invention to very accurately print a particular machine readable code by correcting and compensating for distortions introduced by various printing machines.
Hereinafter, the term "interpretive printer" will be used to refer to a printer which executes a page description language within the printer itself, and the term "non-interpretive" printer will be used to describe a printer which merely prints an externally created image. An example of an interpretive printer is a Postscript (TM) printer (Postscript is a registered trademark of Adobe Systems, Inc.), such as the Apple LaserWriter, produced by Apple Computer, Inc., which executes a postscript language Interpreter within the printer. Page descriptions sent to the printer are actually Postscript language program* which, when interpreted by the language interpreter in the printer, cause* an image to be printed by the printer. An example of a non-interpretive printer i* the Hewlett Packard LaserJet Seriee IV, produced by Hewlett Packard, Inc.
gyaraarv, 9t.tfte..lnytpfeiga
The present invention provides techniques for printing bitmap images of encoded data using standard, commercially available application software such as drawing programs or word processing programs, such that the bitmap images are exactly registered to a target printer's pixel grid independent of any rotation or scaling which may have been applied by the application software. Hereinafter, such bitmap images will be referred to as having been "pixel-registered” with respect to the target printer.
It is a feature of the invention that predetermined images to be printed are scaled to fit a predetermined number of pixels as identified by the particular printer being used.
It is a further feature of the invention that the resolution of the target printer is known before transmitting the image to the target printer, and compensation is applied to correct for printer induced scaling and rotation factors.
These and other aspects of the invention will become apparent from the following description used to illustrate a preferred embodiment of the invention in conjunetion with the accompanying drawings in which:
Brief Description of the Figures
Figures 1A-1D illustrate the effect of scaling on a bitmap in accordance with the invention;
Figure 2 is a block diagram of a computer-based system for printing pixel-registered bitmap images of encoded data on a printer according to the invention;
Figure 3 is a flow diagram showing processes and data flow for a method of printing pixel-registered bitmap images of encoded data on an interpretive printer according to the invention; and
Figure 4 is a flow diagram showing processes and data flow for a method of printing pixel-registered bitmap images of encoded data on a non-interpretive printer according to the invention.
Detaile Description.o the.lnyentlon
Referring now to Figures 1A-1D, Figure 1A illustrates the bitmap for a particular two dimensional code, and Figure IB illustrates how that code should appear when printed. As shown, the bitmap in Figure 1A consists of a plurality of 3x3 arrays, where an array of all "l" bits results in a black square being printed, while an array of all **0" bits results in a white square, i.e., no printing in this area.
In contrast, Figure 1C illustrates a bitmap after scaling by application software located in the CPU or in the printer. Note how the bitmap has been distorted, which results in the printed image shown in Figure ID. These distortions can render the printer image unreadable by a machine, which is the problem solved by the instant invention.
Figure 2 shows a computer based system 100 for printing pixel-registered bitmap images, which includes a computer 140, application software 150 on the computer 140, image generation software 160 on the computer 140, print driver software 170 on the computer 140, and a printer 180. A user provides data for encoding 110 to be encoded into a bitmap image via the image generation software 160. other user data 120 may be provided in combination with the data for encoding 110 for processing by the application software 150. Print driver software 150 controls the flow and formatting of data generated by the image generation software 160, and the application software 160 to the printer 180. The user data 110, and other user data will usually reside on a storage device 130 connected to the computer 140.
Typically, a user will use the application software 160 (such as a word processor or drawing program) to process other user data 120. The result of this processing is a printed page. After processing of the data for encoding 110 by the image generation software, the user can combine the resultant image with the other user data 120, using an import facility of the application software. (Such import facilities are widely known to and understood by those of ordinary skill in the art, and will not be further elaborated upon herein). The combined output is then sent by the application software 150 via the print driver software 170 to the printer 180.
Figure 3 is a flow diagram 200, showing processes and data flow for a method of printing pixel-registered bitmap images on an interpretive printer. User data 210, provided by a user for encoding into a bitmap image, is encoded by an image generation process 230 according to a set of parameters (e.g., intended printer dot-per-inch rating, size and shape for image features, etc.). The image generation process 230 produces an image description 240 comprising a protective image shell 242, and an image portion 244. The protective image shell 242 is essentially a program in a page description language capable of being interpreted by an interpretive printer 280, for analyzing the printer's physical pixel array characteristics, and resizing and reorienting the image portion 244, as necessary to align exactly with an integer multiple of the printer's pixel resolution. That is, if the printer is a 300 dpi (dot per inch) printer, but has had a non-integer scale factor applied by an application program (e.g., 205%), then the protective image shell will detect the scaling and cause the image to be printed at the nearest integer scale factor (e.g., 200%), which does not shrink the image 244. The protective image shell 242 performs similarly with rotation factors, causing the image 244 to be printed at only integer multiple» of 90 degree*. Application software 260 processes additional user data 250, and imports the image description 240 for inclusion into printed output, oucput from the application software 260 output is passed to a print driver 262 which formate it into a page description 270 for a printer, A duplicate image description 272, substantially identical to the image description (240 above) is incorporated into the page description 270. The page description 270 is essentially a program to be executed by a page description language interpreter resident in the interpretive printer 280 to produce printed output.
Figure 4 is a flow diagram 300 showing process and data flow for a method of printing pixel-registered bitmap images of encoded data on a non-interpretive printer 390. User data 310 is provided by a user for encoding into a bitmap image by image generation software 320. Additional user data 330 is provided by the user for processing by application software 340, such as a word processing program or a drawing program, to produce printed output on the non-interpretive printer 390. The image generation program 320 creates an image description 350 comprising a set of image parameters 350A (e.g., intended size of the image pixels, orientation, etc.), and an image bitmap 350B representing an encoding of the user data 310. The application software 340 treats the image generation program 320 as in import filter for incorporating the user data 310 in bitmap encoded form into its printed output. However, in this case, the image description 350 produced by the image generation program 320 (acting as an import filter for the application software 340), is passed to a print driver 370 by a scale and rotate process 360, which performs much the same function as described hereinabove with respect to Figure 2 for the protective image shell 242. The scale and rotate process 360 queries the print driver 370 about physical printer characteristics and about print scaling and rotation setting made by the application software 340, and temporarily bypasses the settings made by the application software 340. The scale and rotate process then picks the nearest integer multiple of scaling to the scale setting made by the application software 360, at which the image bitmap 350B aligns exactly with a pixel resolution for the printer 390, and picks the nearest multiple of 90 degrees rotation to the rotation setting made by the application software 340, and sends the image bitmap to the print driver 370 at that setting. After sending the image bitmap 350B to the print driver 370, the scale and rotation settings made by the application software are restored. The print driver 370 produces a page image 380 formatted for printing by the non-lnterpretive printer 390.
The methods shown and described hereinabove with respect to Figures 3 and 4, produce substantially identical end results. The primary difference between the methods, is that the method of Figure 3 performs image registration by appending a registration program to the image description for execution within an interpretive printer by a page description language interpreter, while the method of Figure 4 performs the registration process inside the computer (e.g., 140, Figure 2) prior to transmission to the printer.
A specific example of Postscript code for the protective image shell is set forth below. More particularly, the basic scheme of the following code is broken into two parts. The first part tests the printer's resolution and determines some basic parameters about the currently selected print coordinate system, determining whether or not there has been unacceptable rotation or shearing of the coordinate system. If there has, the first part "crashes" (stops), causing a second error printout part of the code to execute (via the "stopped" directive between the two portions). The error printout part prints an image resembling the shape and orientation that the image would have had if it had been printed in the current coordinate system (but does not print the actual strip), and dumps a list of relevant values determined by the first part.
The first part of the code uses a progress variable (Progress) to indicate where a failure has occurred. If the progress variable is equal to 6, then there is no error. If it , then its value indicates how far the first part t before detecting a problem.
ry notes are embedded in the code below in the ript comments, which begin with a percent (%)
t of first part of protective image shell. Fails omplete if a problem is detected. Leaves a trace e (Progress) behind to indicate how far through first process the problem occurred.
Set the progress indicator to zero.
gress O def
Define newline function to be used in printing the datastrip image such that if the progress variable is equal to 6, then the strip image is data on the stack (i.e., strip image data) is printed normally using a newline procedure (nl). If not, then the data on the stack is popped off the stack and ignored.
{Progress 6 eq {nl} {pop} ifelse} def
Set a variable 'DPI' equal to the expected printer DPI. This value is inserted by the program which appends this code to the image data.
300 def
Transform the point (1 inch, 0 inches) via the printer's default matrix to determine the printer's actual resolution in DPI. (Note: In the default coordinate system is expressed in "points 1·where 72 points is exactly equal to 1 inch.
0.  matrix defaultmatrix dtransform dup
Determine the actual printer DPI resolution by examining the result of the foregoing transformation. Requires two tests, since the printer can be in either portrait or landscape mode. Whichever test (x or y) yields a non-zero value provides the result.
ual DPI exch abs def
O. eg {/AetualDPI exch abs def} {pop} ifelse
Determines a useful value equivalent to 8 points in the printer's native resolution.
tPoint 8. 72. div AetualDPI mul def
Initialize an error message to "*No Error*”.
pErrMsg (*No Error*) def
Define functions for selecting the maximum or minimum of two values on the Postscript stack. {
/mxop2 exch def dup
/mxopl exch def
myop2 gt myop2 exch {pop mxopl} if}def
{
/mnop2 exch def dup
/mnopl exch def
mnop2 It nop2 exch {pop mnopl} if} def
Define a function for extracting the sign of a numeric value on the Postscript stack.
{dup 0. ne {dup abs div} if cvi} def 
Define a function for extracting a scale factor by comparing the value on the Postscript stack to the requested (expected) DPI rating.
leFactor
(dup 0. ne
{dup Sign exch DPI div 0.98 abs cvi 1 Max mul} {cvi}
ifelse} def
Define an error processing function which copies an error message on the Postscript stack into "StripErrMsg" and executes the "stop" directive, aborting the first part of the code.
ipError {/StripErrMsg exch def stop} def
Funetion to test for a (0, 0) value on the Postscript stack.
Check {O. eq exch 0. eq and} def
Funetion to replace a value with zero if it is less than 1/50th of another value.
sh {
/Thop2 exch def dup Thop2 exch div abs 0.02 It {0.} {Thop2} ifelse} def
Funetion which takes an (x, y) point and uses the Thresh function to zero out either the x or y portion if it is less than 1/50th of the other.
lch {
/Sqop2 exch def dup
/Sqopl exch def abs
Sqop2 abs gt 
l Sqop2 Thresh} {Sqop2 Sqopl Thresh exch} ifels
Funetion which returns "true” if axis shearing has occurred.
rErrCheck {0. eq {) .eq} {0. ne} ifelse} def
Transform the point (o, 0) to determine the current coordinate system's origin.
ransform
/udyO exch cvi def
/udxO exc cvi def
determine response of the current coordinate system to pure "x" offsets and pure "y" offsets, using 1 inch (72 points) as the test value.
.  dtransform
/xyDPI exch def
/xxDPI exch def
dtransform
/yyDPI exch def
yxDPI exch def
o problems in initial setup. Bump the progress ndicator.
ess 1 def
est the coordinate system for zero width, zero ength, and collapsed axes. Execute the error rocedure "StripError" if a problem is detected.
xyDPI ZeroCheck {(Zero Width) StripError} if yyDPI ZeroCheck {(Zero Length) StripError} if yxDPI ZeroCheck {(XAxis Collapse) StripError} if yyDPI Zerocheck {(YAxis Collapse) strip Error}
Got through the basic coordinate system testing. Bump the progress indicator.
2  def
Now "squelch" the coordinate system to remove any insignificant (i.e., less than 2%) rotation or shear factors.
xyDPI Squelch
/xySql· exch def
/xxSql exch def
yyDPI Squelch
/yySql exch def
/yxSql exch def
yx Sql Squelch
/yxSql exch def
/xxSql exch def
yySql Squelch
yySql exch def
xySql exch def
rough the squelch processes. Bump the progress tor.
def
est for unacceptable coordinate system shear or otation. Execute the StripError procedure if a roblem is found.
xySql ShearErrCheck
(Shear/Rot. xx-xy) StripError} if
yySql ShearErrCheck
(Shear/Rot. yx-yy) StripError} if
yxSql  ShearErrCheck 
{(Shear/Rot. xx-yx) stripError} if
xySql yySql ShearErrCheck
{(Shear/Rot. xy-yy) StripError} if
Passed the shear and rotation tests. Bump the progress indicator.
ress 4 def
%    extract scale factors from the "squelched" values
/xxS xxSql ShearFactor def
/xyS xySql ScaleFactor def
/yxS yxSql ScaleFactor def
yys yySql ScaleFactor def
ot through the scale factor processing. Bump the rogress indicator.
ess 5 def
Define a coordinate system matrix in terms of integer scale factors for use when printing subsequent image data.
rix [xxS xyS yxS yys udxO udyO] def
Convert from 72 dpi (user space) to device space, (i.e., the value "1" now refers to one pixel (or integer multiple thereof, depending upon the scale factors in SSMatrix. By using this matrix for subsequent strip printing, the image data (which is defined in terms of printer pixels), is forced to be printed in perfect alignment with the printer's coordinate system at an integer scale factor.
SSMatrix  setmatrix 
Everything went OK. Set the progress indicator to 6 and complete the first part of the code normally (i.e,, without a "crash” or stop directive).
gress 6 def
whether the first part of the code completed ally. If not, execute the second part — error essing.
Restore and save the original coordinate system (and graphic environment).
tore
e
Create a horizontal scale factor based upon the width of the image data. (The value for istrpwid is inserted by the program which appends this code to the image data).
wid 72 div 1 scale
Create a pictorial representation of a strip outline in the current coordinate system, to show graphically how the strip would have been rotated, sheared, or scaled if it had been printed in this orientation.
etlinewidth
newpath
O O oveto
0 - 144 lineto
72  - 144 lineto 
720 lineto
closepath
stroke
Select Helvetica 8 point for printing error info
vetica findfont S scalefont setfont
% Finish off the pictorial strip
% representation.
18 0 moveto
36 0 rlineto
0 -7 rlineto
-36 O rlineto
closepath stroke
Define text line height for message printing (9 points).
estep -9 def
Define left edge for text (5 points from left edge of strip).
edge 5 def
Set initial position for message printing,
dge linestep 2 mul moveto
Define a special "newline" function (SEnl) for "showing" a line of text on the stack, then stepping to the next line position.
{show grestore O linestep rmoveto gsave} def  % The following messages are printed
%    unconditionally.
(****ERROR*****) SEnl
(ReqstdDPI *) show DPI 20 string cvs SEnl (AetualDPI·) show AetualDPI 20 string cvs SEnl (xxDPl») show xxDPl 20 string cvs SEnl
(xyDPI-) show xyDPI 20 string cvs SEnl
(yxDPl-) show yxDPI 20 string cvs SEnl
(yyDPI-) show yyDPI 20 string cvs SEnl
The following messages are printed if the progress indicator is at least 3.
rogress 3 ge {
show xxSql 20 string cvs SEnl
show xySql 20 string cvs SEnl
show yxSql 20 string cvs SEnl
show yySql 20 string cvs SEnl} if
The following messages are printed if the progress indicator is at least 5.
rogress 5 ge {
(xxs=) show xxS 20 string cvs SEnl
(xys=) show xyS 20 string cvs SEnl
(yxS=) show yxS 20 string cvs SEnl
(yyS“) show yys 20 string cvs SEnl} if
Print the text description of what went wrong, followed by the value of the progress indicator.
tripErrMag SEnl
Progress ^) show Progress 20 string cvs show
restore
It will be appreciated that changes and modifications are likely to occur to those skilled in the art, and it is intended in the appended claims to cover all those changes and modifications which fall within the spirit and scope of the present invention.
1, A printer processor implemented method for printing predetermined images on a selected printer having reproduction characteristics known and available, the method including the steps of:
obtaining for the printer processor the known reproduction characteristics of said selected printer,
analyzing, by said printer processor, physical pixel array characteristics of said printer based on said known reproduction characteristics; and
resizing and reorienting said predetermined image as required to align exactly said predetermined image with an integer multiple of said printer's physical pixel array characteristics.
insufficientOCRQuality for page 21
100
PRINTER 280
Figure T