1. Field of the Invention
This invention relates to image encoding, and in particular, it relates to the application of barcode in image encoding.
2. Description of the Related Art
Barcode is a form of machine-readable symbology for encoding data, and has been widely employed in a variety of application fields. Two-dimensional barcode (2d barcode), which is one mode of such symbology, can be used to encode text, numbers, images, and binary data streams in general, and has been used in identification cards, shipping labels, etc. One widely used 2d barcode standard is the PDF417 standard, and software and hardware products have been available to print and read such 2d barcode. Color barcode has also been proposed.
The present invention is directed to a method and apparatus using 2d barcode or other forms of machine-readable symbology to encode image data. An object of the present invention is to provide a method to use barcode locally to encode and overwrite sensitive or important areas of a document.
Additional or separate features and advantages of the invention will be set forth in the descriptions that follow and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
To achieve these and other objects, as embodied and broadly described, the present invention provides a method for processing a document, which includes: (a) selecting at least one area of a source document; (b) processing data representing the at least one area in the source document to generate at least one set of barcode data; and (c) replacing data representing the at least one area in the source document with the at least one set of barcode data to generate a processed document.
In another aspect, the present invention provides a method of restoring a processed document that contains at least one set of barcode data in at least one area, the at least one set of barcode data representing original document data in the at least one area, the method includes: (d) detecting and extracting the at least one set of barcode data in the processed document; (e) processing the extracted data to generate original document data in the at least one area; and (f) replacing the at least one set of barcode data with the original document data in the at least one area to generate a restored document.
The present invention is also directed to computer program product that causes a data processing apparatus to perform the above methods.
In yet another aspect, the present invention provides a data processing apparatus which includes: a scanning section for scanning a hard copy document to generate a source document; a user interface section including a display device for displaying a source document and an input device for selecting at least one area of the displayed document; and a control section for controlling the data processing apparatus, the control section including a data processing section for processing data in the at least one area of a source document to generate at least one set of barcode data, and replacing data in the at least one area of the source document with the at least one set of barcode data to generate a processed document. The data processing apparatus may also include a printing section for printing the processed document on a recording medium, and a communication interface section for connecting to an external device, wherein the control section transmits the processed document to the external device via the communication interface section.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are intended to provide further explanation of the invention as claimed.
An embodiment of the present invention processes a document by replacing one or more selected areas of the document, such as area(s) containing sensitive information like signature, fingerprint, picture, identification number, social security number or account number, etc., with at least one barcode that represents the information in the selected area(s) in an encoded form. When the processed document is printed or electronically displayed, the selective area(s) is replaced with the at least one barcode so the information in the area(s) cannot be visually discerned by a human observer. The intended recipient or reader of the document can decode it using a decoder to display the document, including the selected area(s), in the original form. As an example,
Such a selective image encoding and replacement method allows for more efficient storage of data in barcode by not encoding the less important or sensitive areas of the document. In many practical applications, a document is often based on a known template having certain content, size and shape, where only a fixed number of areas contain document-specific information (i.e. information unique to that document). Examples include forms, form documents, checks, etc. For such a document, it is often not necessary to encode an obscure the entire document in order to provide security and privacy protection.
A method of selective image encoding and replacement according to embodiments of the present invention is now described with reference to
The data processing apparatus then compresses the data in the selected area(s) of the source document (step S23), digitally signs the data (step S24, optional), encrypts the data (step S25, optional), and generates at least one set of barcode data from the data (step S26). The barcode data therefore represents the data in the selected area(s) of the source document. Optionally, desired metadata may be added to the barcode data for document control or other purposes. Note that the digital signature (S24) and encryption (S25) steps are optional, depending on the level of security desired. The compression step (S23) is also optional, but in the case where the selected area contains image data (such as in a scanned document), compression is preferably performed to reduce the amount of data to be encoded into barcode. If, on the other hand, the data in the selected area is pure text (such as in the case of a Word document containing an identification number to be obscured), then compression may not be necessary. In step S26, the barcode data is generated using any suitable method and pursuant to any suitable standard, either currently existing or may be developed in the future.
As used in this disclosure, the term “barcode” refers to 1d or 2d barcode, color barcode—or more generally, any machine-readable symbology that contains information—in the printed or displayed form. The term “barcode data” refers to data in electronic form that, when printed or displayed, depicts a barcode.
The barcode data generated in step S26 is then used to replace the data in the selected areas of the source document (step S27) to generate a processed document. Here, the term “processed document” refers to an electronic form of the document having been processed as described above. The processed document can then be printed, displayed, stored, and/or transmitted to another device.
In Step 27, replacing the data in the selected area(s) with barcode data may be accomplished in a variety of ways. The barcode data may be inserted in the document in place of the original data representing the selected area (which is deleted). Alternatively, the barcode data may be stored elsewhere in the processed document (with or without deleting the original data representing the selected area), with appropriate metadata that associates the barcode data with the selected area(s) so that when the processed data is printed or displayed, the barcode(s) is printed or displayed in the selected area(s) and the data in the source document is not printed or displayed in the area(s). Other methods of replacing the original data with barcode data may be used, so long as the barcode data is treated in such a way that when the processed document is printed or displayed, the barcode(s) is printed or displayed in the selected area(s).
Before the compressing step (S23), the data processing apparatus checks the data in the selected area(s) to ensure that the data is encodable in barcode. Before the replacing step (S27), the data processing apparatus checks the barcode data to determine whether the selected area(s) have sufficient sizes to print the barcode. These two steps (not shown in
A printed document containing replacement barcode(s) (barcode(s) that replaced area(s) of the original document) in selected area(s) may be restored to the original document by a decoding process illustrated in
One practical application of the selective image encoding and replacement method is a scanner/copier device that can produce a hard copy or an electronic copy of an original hard copy document with selected area(s) replaced by barcode(s). As shown in
Thus, the selective image encoding and replacement method can be embodied in a scanner/copier equipped with a display, an input device and control software that can produce a copy of an original document with selected area(s) replaced by barcode(s) in a stand-alone configuration. The selective image encoding and replacement method can also be embodied in a control program that causes a scanner/copier to produce a copy of an original document with selected area(s) replaced by barcode(s).
Another practical application of the selective image encoding and replacement method is a software program that allows a user to print a document with selected area(s) replaced by barcode(s). The document to be printed (the source document) may originate from any suitable source, include word processing applications, spreadsheet applications, graphics applications, email applications, web browser applications, scanners, digital cameras, etc. When the user prints an electronic document from a computer using such a program, the program displays an image of the document on the computer screen, and allows the user to select the area(s) to be barcoded. Alternatively, the program may automatically select the area(s) to be barcoded, as described earlier. As another alternative, the program may allow the user to make a selection using a displayed document, and store the selection to be used for printing subsequent documents that have the same layout. The program processes the data in the selected area(s) to generate barcode(s) that represents the data in the selected area(s), and causes the document to be printed in which the selected area(s) is replaced by barcode(s). Alternatively, in lieu of printing the document on a medium, the software program may store a processed document in electronic form which, when printed later, will have the selected area(s) replaced by barcode(s).
From the above descriptions, it can be seen that a feature of embodiments of the present invention is to only encode selected area(s) of a document as barcode(s), and to print the barcode(s) in the selected area(s) to replace the original image in the area(s). An advantage of replacing selected sensitive area(s) with barcode(s) is to protect the sensitive area(s) against casual tampering. While a plain copy of a document is easy to alter and re-copy, it is difficult to alter a sensitive area that has been barcoded unless the forger also uses a barcoding technique. If the data in the sensitive area was digitally signed and/or encrypted, a forger will not be able to alter it or not be able to alter it without being detected. Another advantage of encoding sensitive areas of a document is to prevent the sensitive information (identification number, signature, etc.) from being stolen by persons who have opportunities to see a hard copy of a document. For example, if the signature on the back of a credit card is encoded and printed as bar code, an unauthorized user will likely not be able to see the actual image of the signature and therefore not be able to forge the signature. A merchant will be able to see the signature image using a device equipped with an appropriate decoder. (Of course, the signature may also be embedded in the magnetic data on the credit card.)
Compared to encoding the entire document, the selective image encoding and replacement method is more efficient. Often a document contains mostly non-sensitive information, and encoding the entire document would be a waste of effort. Further to this, encoding the entire document would be useless or hard to use in a variety of application fields because the processed document loses human recognizable information at all.
Preferred embodiments of the present invention use 2d barcode to replace the images in the selected area. Other machine-readable symbologies may also be used. For example, one-dimensional barcode may be used, although such barcodes likely would not have sufficient data capacity to store the image data in the original document. For instance, in a case where an image of a social security number (SSN) is included in a source document in a form of image data, the SSN can be converted into character codes by subjecting the area of the SSN to character recognition. Because character coded SSN is usually smaller in capacity than the image of the SSN, one-dimensional barcode might be sufficient to represent such character coded SSN.
In the above descriptions, the term “source document” and “processed document” are used to refer to electronic forms of a document, i.e., electronic signals representing a document. It should be understood that the electronic form of a document may only exist transiently, and electronic signals representing different parts of the document may not exist simultaneously. For example, in a copier embodiment of the present invention, an implementation is possible where a portion (a physical page or part of a page) of the hard copy original image is scanned, one or more areas contained in that portion are selected (automatically or manually) and converted to barcode data, the portion of the image is printed with the selected areas replaced by barcode, and the data is discarded or partially discarded before the next portion of the original image is scanned and similarly processed. Such an implementation is encompassed within the scope of the present invention even though different portions of the source document or processed document exist only transiently at different times.
It will be apparent to those skilled in the art that various modification and variations can be made in the selective image encoding and replacement method and apparatus of the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention cover modifications and variations that come within the scope of the appended claims and their equivalents.