US20050007417A1 - Method for processing an image in a printer - Google Patents
Method for processing an image in a printer Download PDFInfo
- Publication number
- US20050007417A1 US20050007417A1 US10/674,973 US67497303A US2005007417A1 US 20050007417 A1 US20050007417 A1 US 20050007417A1 US 67497303 A US67497303 A US 67497303A US 2005007417 A1 US2005007417 A1 US 2005007417A1
- Authority
- US
- United States
- Prior art keywords
- color
- image
- primary
- difference value
- original image
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B41—PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
- B41J—TYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
- B41J2/00—Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed
- B41J2/005—Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed characterised by bringing liquid or particles selectively into contact with a printing material
- B41J2/01—Ink jet
- B41J2/21—Ink jet for multi-colour printing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/46—Colour picture communication systems
- H04N1/56—Processing of colour picture signals
Definitions
- the present invention relates to a method for processing an image in a printer, which can carry out a printing operation in two colors, and more particularly to a method for processing an image in a printer, which can effectively carry out a conversion operation by comparing quantities of light components for R, G and B associated with each pixel to be converted when a full color image is converted into a two-color image, and can decide conversion colors by applying a regular rule to all possible cases when the conversion colors are decided, such that an excellent conversion result can be achieved.
- an ECR Electronic Cash Register
- POS Point-Of-Sale
- printers include a dot printer for creating a shape of a character by electronically pushing an end of a wire bundle separately driven by an electromagnet and printing characters on a paper by striking an ink ribbon, and a thermal printer using a thermal paper for performing a printing operation by sensing heat generated from a head.
- the above-described printers can mostly perform only a monochrome (black or purple) printing operation.
- an improved dot printer, thermal printer and ink jet printer capable of performing a two-color printing operation have been developed.
- a recently used small-sized printer has extended a range of use from printing a receipt for verifying a transaction history to printing a predetermined company logo, a specific image for marketing promotion or a ticket. According to this trend, colorful prints are required.
- the conventional printer is limited by a size requirement and can carry out a printing operation in only one color or two colors, the conventional printer cannot print a full-color logo or advertisement image as it is. For this reason, research on techniques for performing a conversion to a one or two-color image so that the conventional small-sized printer can print a multi-color logo or image is ongoing.
- U.S. Pat. No. 5,740,333 discloses an image processing method and image processing apparatus which can convert an inputted color image to a two-color image so that the two-color image consisting of a specified color and a black color can be outputted by a copying machine, facsimile machine and printer.
- the inputted color image is separated into three colors of R (Red), G (Green) and B (Blue).
- a predetermined threshold value based on the specified color and two correction values are compared with quantities of light associated with the colors separated from the inputted color image, and one of the specified color and the black color is decided for each pixel of the inputted color image so that the inputted color image can be converted into the two-color image.
- the black color is basically used and the specified color is limited to a red or blue color. Since only two colors are compared at the color conversion operation, there is a problem in that the color conversion operation is limitedly carried out.
- U.S. Pat. Nos. 6,206,504 and 6,502,923 disclose a two-color ink jet apparatus and method in a POS (Point-Of-Sale) system.
- a primary color and alternative color are decided in advance.
- first, second and third color values separated from an inputted color image are compared with a given threshold value according to predetermined criteria. According to a result of the comparison, one of the primary color and alternative color to be outputted is decided, or no color is selected. As a result, an image consisting of a white color, primary color and alternative color is outputted.
- the present invention has been made in view of the above problems, and it is an object of the present invention to provide a method for processing an image in a printer, which can effectively carry out a conversion operation by comparing quantities of light components for R, G and B associated with a pixel to be converted when a full color image is converted into a two-color image, and can decide conversion colors by applying a regular rule to all possible cases when the conversion colors are decided, such that an excellent conversion result can be achieved.
- a method for processing an image in a printer capable of printing a two-color image comprising the steps of: setting a primary color and a secondary color as printable colors in the printer; receiving an original image; and producing color difference values associated with the primary color, the secondary color and a white color on an original image pixel-by-pixel basis, and converting a corresponding pixel color of the original image into the primary, secondary or white color associated with a smallest color difference value.
- the color converting step may comprise the steps of:
- the color converting step may comprise the steps of:
- the method may further comprise the step of: converting the received original image into a bitmap image before the color converting step is carried out.
- the color converting step may comprise the step of: deciding a conversion color according to priorities in order of the primary, secondary and white colors if two or more of the first, second and third color difference values correspond to the smallest color difference value as a result of the comparison.
- FIG. 1 is a flow chart illustrating an image processing method in a printer in accordance with the present invention
- FIG. 2 is a view illustrating a color circle
- FIG. 3 is a view illustrating an exemplary original image
- FIGS. 4 to 9 are views illustrating results of simulations where the original image shown in FIG. 3 is processed in accordance with the present invention.
- FIG. 10 is a schematic perspective view illustrating a POS (Point-Of-Sale) terminal to which the present invention is applicable.
- FIG. 11 is a block diagram illustrating a control structure of the POS terminal.
- FIG. 10 is a front perspective view illustrating a POS terminal 3 to which the image processing method in accordance with the present invention is applicable.
- the POS terminal 3 can include a main unit case 10 having a rectangular parallelepiped shape and a cash drawer contained therein.
- a manipulation keyboard 12 is mounted on a top surface in a front direction of the main unit case 10 , and can receive information associated with a product or purchaser from an operator.
- a display unit 13 for displaying an operation state and a printer 14 for printing a receipt can be appropriately installed behind the keyboard 12 .
- the POS terminal 3 further includes a bar code reader 20 for reading a linear bar code formed on a product and a card reader 18 for reading a card for credit-card transaction.
- the POS terminal 3 includes a display unit for a customer (not shown) so that a purchaser can confirm brief contents such as a payment amount, etc. before the purchaser pays money.
- the display unit for the customer can be installed behind the main unit case 10 .
- a speaker (not shown) also can be installed behind the main unit case 10 .
- the printer 14 is a two-color printer such as a small-sized ink-jet, thermal or dot printer.
- FIG. 11 is a block diagram illustrating the configuration of a control section of the POS terminal 3 .
- the control section includes a main controller 51 for activating and controlling the POS terminal 3 .
- the main controller 51 controls operations of elements of the POS terminal 3 that includes a display controller 52 , an acoustic controller 59 , a print data generator 53 , a printing controller 54 , a cash registration processor 55 , a storage controller 56 and a storage device 58 .
- the image processing method of the present invention described below is implemented by software. Under the control of the main controller 51 , the image processing method is mainly performed by the print data generator 53 .
- the print data generator 53 receives information of a receipt to be printed from the main controller 51 , and receives advertisement information (e.g., a predetermined logo or image) based on at least three colors stored in the storage device 58 through the storage controller 56 . Then, the print data generator 53 generates print data. Then, the print data generator 53 converts an inputted full-color image corresponding to the print data into a two-color image and then issues a printing command so that the printer 14 can carry out an appropriate printing operation.
- advertisement information e.g., a predetermined logo or image
- the printer 14 prints the print data transferred from the print data generator 53 on a predetermined paper.
- FIG. 1 is a flow chart illustrating the image processing method for converting a full color image into a two-color image.
- a primary color being a main color and a secondary color being a sub-color to be printed are set.
- the primary and secondary colors are colors capable of being printed by the printer 14 .
- the primary color is mainly used for printing a text, etc., and the secondary color is used for printing contents to be emphasized or additional contents.
- an original image to be printed is inputted.
- the original image is based on a three-color image and various image formats.
- the inputted image is appropriately converted into a predetermined format image at step 103 .
- the inputted original image is converted into a 24-bit true color bitmap image. Pixel values of the converted original image are referred to as Ro, Go and Bo. If the inputted original image is based on RGB values capable of being processed, the above step 103 can be omitted.
- a color forming a boundary is set, and is referred to as a boundary color.
- the boundary color does not correspond to a threshold value for determining whether or not a color must be converted, but becomes a criterion for designating a color of the original image to be converted into the secondary color.
- R (Red), G (Green) and B (Blue) being three primary colors arranged at 120° intervals, and mixed colors depending upon ratios of RGB components, form a color circle.
- the boundary color can be selected from the color circle.
- a value of Red is indicated by a reference rotation angle 0°. Rotation angles from the reference rotation angle 0° in a counter clock-wise direction are expressed as values of designated colors. For example, if a value of the boundary color is set as a rotation angle 180°, the boundary color becomes a cyan color.
- the rotation angle 0° or 360° corresponds to Red.
- a predetermined rotation angle set in the color circle shown in FIG. 2 is referred to as a boundary value, a color corresponding to the boundary value is a boundary color, and the boundary color is expressed as RGB values R th , G th and B th .
- the boundary color becomes a yellow color.
- the yellow color of the original image is converted into the secondary color, i.e., the red color.
- the boundary color is designated as the secondary color
- a result is the same as that where the boundary color is not designated.
- the step of designating the boundary color can be omitted if desired.
- an operation of converting RGB values R th , G th and B th of the boundary color into R 2 , G 2 and B 2 of the secondary color needs to be performed in a procedure of calculating color difference values described below.
- the boundary color is designated as described above, there are calculated color difference values associated with the primary color, the boundary color being a criterion for a conversion to the secondary color and a white color on an original image pixel-by-pixel basis.
- a corresponding pixel color of the original image is converted into a conversion color having the smallest color difference value among the three colors (including the primary, secondary and white colors).
- These operations are performed at steps 105 to 110 .
- the above steps 105 to 110 are performed for all pixels of the original image.
- the reason why the color difference value between the white color and the corresponding pixel color is calculated is because a paper to be printed is white, and colors viewed on a receipt actually printed by the POS terminal are the primary, secondary and white colors.
- a color difference value ⁇ Col1 between the corresponding pixel color and the primary color is produced.
- the color difference value ⁇ Col1 is calculated by the following Equation 1.
- ⁇ Col1
- Vcb denotes a weight value for the primary color, i.e., the black color, and can be arbitrarily set.
- the weight value for the primary color is used for deciding an amount of the color to be expressed as the primary color when the original image is converted into the two-color image. For example, as the weight value Vcb for the primary color becomes large, a ratio of the primary color becomes large in the converted image, and conversely a ratio of the secondary color becomes small in the converted image.
- R 1 , G 1 and B 1 denote RGB values of the primary color, respectively.
- the primary color is set as the black color, and RGB values of the black color are zero.
- ⁇ Col1 R+G+B ⁇ Vcb.
- a color difference value ⁇ Col2 between the corresponding pixel color and the secondary color is produced.
- the above-described color difference value ⁇ Col2 is calculated by the following Equation 2.
- ⁇ Col2
- R th , G th and B th denote color values of the boundary color set at the above step 104 .
- Vcs denotes a weight value for the secondary color, and can be arbitrarily decided. When the value of Vcs becomes large, the probability that the corresponding pixel color is converted into the secondary color becomes high. Conversely, when the value of Vcs becomes small, the probability that the corresponding pixel color is converted into the secondary color becomes low.
- a color difference value ⁇ Col3 between the white color and the corresponding pixel color is calculated by the following Equation 3.
- ⁇ Col3
- values of 255 are RGB values for the white color. At this time, where a ratio of the white color becomes large, an actual image cannot be appropriately expressed.
- a weight value is assigned in the case of the primary or secondary color, but is not assigned in the case of the white color.
- the three color-difference values ⁇ Col1, ⁇ Col2 and ⁇ Col3 are compared, and the smallest color difference value is identified.
- the conversion color i.e., the primary, secondary or white color, corresponding to the smallest color difference value is closest to the original-image pixel color.
- This embodiment uses the smallest color difference value.
- the largest color difference value can be optionally used. Where the largest color difference value is used, relations between the weight values for the primary and secondary colors and the ratios of the primary and secondary colors in the two-color image are opposite to those in the case where the smallest color difference value is used. In other words, as the weight value becomes smaller, the ratio of the primary or secondary color in the two-color image becomes larger.
- the weight values Vcb and Vcs for the primary and secondary colors are not assigned so that a two-color image closest to the original image can be printed.
- the corresponding pixel color is converted into the primary, secondary or white color corresponding to the smallest color difference value.
- the first color difference value ⁇ Col1 is the smallest color difference value
- the corresponding pixel color is converted into the primary color.
- the second color difference value ⁇ Col2 is the smallest color difference value
- the corresponding pixel color is converted into the secondary color.
- the third color difference value ⁇ Col3 is the smallest color difference value
- the corresponding pixel color is converted into the white color.
- priorities for the same smallest color difference values are designated in order of the primary, secondary and white colors. Conversion colors are decided according to the designated priorities. It is preferable that priorities for the conversion colors corresponding to the same smallest color difference values are designated in order of the primary, secondary and white colors. Where the same color difference values exist, the corresponding pixel color is converted into a conversion color having a higher priority.
- a printing command for allowing the printer 14 to print the two-color image as the converted image is issued at step 110 .
- the printing command is sent to the printing controller 54 shown in FIG. 11 .
- the printing controller 54 controls an operation of the printer 14 so that the printer 14 can appropriately print the two-color image.
- FIG. 3 shows the original image associated with the simulation results, and FIGS. 4 to 9 will be described with reference to the original image.
- FIG. 4 shows the case where the boundary value is set to the angle 360° (being the same as the angle 0° ) when the primary color is black and the secondary color is red.
- the boundary color is red.
- a color similar to the red color is converted into the red color being the boundary color.
- the weight values for the primary and secondary colors are not assigned.
- a conversion to the secondary color is performed in a criterion of the red color being the boundary color.
- green and blue-based colors are converted into the black color being the primary color
- cyan-based colors are converted into the white color.
- FIG. 5 shows the case where the weight value for the secondary color is assigned to the image shown in FIG. 4 .
- the boundary value is set to the angle 360° and the weight value Vcs for the secondary color is set to be large.
- the image shown in FIG. 5 is compared with that shown in FIG. 4 , it can be found that a color area converted into the secondary color in a criterion of the red color being the boundary color is wider in the image shown in FIG. 5 . If the weight value for the secondary color is set to be large, a ratio of the secondary color becomes large in the two-color image.
- FIG. 6 shows the case where the weight value for the primary color is assigned to the image shown in FIG. 4 .
- the boundary value is set to the angle 360° and the weight value Vcb for the primary color is set to be large.
- the image shown in FIG. 6 is compared with that shown in FIG. 4 , it can be found that an area of the black color being the primary color is wider and hence an area of the secondary color in a criterion of the red color being the boundary color is narrower in the image shown in FIG. 6 . If the weight value for the primary color is set to be large, a ratio of the primary color becomes large in the two-color image.
- FIG. 7 shows the case where the boundary value is set to the angle 180° when the primary color is black and the secondary color is red, and no weight value is assigned.
- the boundary color is cyan and cyan-based colors are converted into the secondary color (or Red) in a criterion of the cyan. Red-based colors are converted into the primary color, and yellow and magenta-based colors are converted into the white color.
- the conversion to the secondary color is carried out according to similarity to the boundary color in the criterion of the boundary color rather than similarity to the secondary color.
- FIG. 8 shows the case where the weight value for the secondary color is set to be large in the image shown in FIG. 7 .
- the primary, secondary and boundary colors are set to the black, red and cyan colors, and the weight value Vcs for the secondary color is set to be large.
- FIG. 9 shows the case where the weight value for the primary color is assigned to the image shown in FIG. 7 .
- the primary, secondary and boundary colors are set to the black, red and cyan colors, and the weight value Vcb for the primary color is set to be large.
- the weight value for the primary color and the weight value for the secondary color can be arbitrarily set, the conversions to various two-color images can be allowed.
- the present invention provides a method for processing an image in a printer, which can effectively carry out a conversion operation by comparing quantities of light components for R, G and B associated with each pixel to be converted when a full color image is converted into a two-color image, perform an image conversion operation as desired by a user by carrying out a calculation operation using difference values between quantities of original light components, a primary color and a secondary color and assigned weight values, and decide conversion colors by applying a regular rule to all possible cases when the conversion colors are decided, such that an excellent conversion result can be achieved.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Color Image Communication Systems (AREA)
- Facsimile Image Signal Circuits (AREA)
- Image Processing (AREA)
Abstract
Description
- 1. Field of the Invention
- The present invention relates to a method for processing an image in a printer, which can carry out a printing operation in two colors, and more particularly to a method for processing an image in a printer, which can effectively carry out a conversion operation by comparing quantities of light components for R, G and B associated with each pixel to be converted when a full color image is converted into a two-color image, and can decide conversion colors by applying a regular rule to all possible cases when the conversion colors are decided, such that an excellent conversion result can be achieved.
- 2. Description of the Related Art
- Conventionally, an ECR (Electric Cash Register) or POS (Point-Of-Sale) system is equipped with a small-sized printer for printing a receipt. In this case, widely used printers include a dot printer for creating a shape of a character by electronically pushing an end of a wire bundle separately driven by an electromagnet and printing characters on a paper by striking an ink ribbon, and a thermal printer using a thermal paper for performing a printing operation by sensing heat generated from a head. The above-described printers can mostly perform only a monochrome (black or purple) printing operation. Recently, an improved dot printer, thermal printer and ink jet printer capable of performing a two-color printing operation have been developed.
- Furthermore, a recently used small-sized printer has extended a range of use from printing a receipt for verifying a transaction history to printing a predetermined company logo, a specific image for marketing promotion or a ticket. According to this trend, colorful prints are required.
- However, since the conventional printer is limited by a size requirement and can carry out a printing operation in only one color or two colors, the conventional printer cannot print a full-color logo or advertisement image as it is. For this reason, research on techniques for performing a conversion to a one or two-color image so that the conventional small-sized printer can print a multi-color logo or image is ongoing.
- As one example, U.S. Pat. No. 5,740,333 discloses an image processing method and image processing apparatus which can convert an inputted color image to a two-color image so that the two-color image consisting of a specified color and a black color can be outputted by a copying machine, facsimile machine and printer. The inputted color image is separated into three colors of R (Red), G (Green) and B (Blue). In the above-described U.S. Pat. No. 5,740,333, a predetermined threshold value based on the specified color and two correction values are compared with quantities of light associated with the colors separated from the inputted color image, and one of the specified color and the black color is decided for each pixel of the inputted color image so that the inputted color image can be converted into the two-color image.
- In the method of the above-described U.S. Pat. No. 5,740,333, the black color is basically used and the specified color is limited to a red or blue color. Since only two colors are compared at the color conversion operation, there is a problem in that the color conversion operation is limitedly carried out.
- As other examples, U.S. Pat. Nos. 6,206,504 and 6,502,923 disclose a two-color ink jet apparatus and method in a POS (Point-Of-Sale) system. In the apparatus and method, a primary color and alternative color are decided in advance. Then, first, second and third color values separated from an inputted color image are compared with a given threshold value according to predetermined criteria. According to a result of the comparison, one of the primary color and alternative color to be outputted is decided, or no color is selected. As a result, an image consisting of a white color, primary color and alternative color is outputted.
- In the method of the above-described U.S. Pat. Nos. 6,206,504 and 6,502,923, there are problems in that different results for the same image can be produced since the criteria for deciding the primary color and alternative color are unclear and a boundary area in which two colors can meet all criteria is not defined.
- Therefore, the present invention has been made in view of the above problems, and it is an object of the present invention to provide a method for processing an image in a printer, which can effectively carry out a conversion operation by comparing quantities of light components for R, G and B associated with a pixel to be converted when a full color image is converted into a two-color image, and can decide conversion colors by applying a regular rule to all possible cases when the conversion colors are decided, such that an excellent conversion result can be achieved.
- In accordance with an aspect of the present invention, the above and other objects can be accomplished by the provision of a method for processing an image in a printer capable of printing a two-color image, comprising the steps of: setting a primary color and a secondary color as printable colors in the printer; receiving an original image; and producing color difference values associated with the primary color, the secondary color and a white color on an original image pixel-by-pixel basis, and converting a corresponding pixel color of the original image into the primary, secondary or white color associated with a smallest color difference value.
- Preferably, the color converting step may comprise the steps of:
- on the pixel-by-pixel basis, calculating a first color difference value ΔCol1 between the corresponding pixel color of the original image and the primary color according to the equation ΔCol1=|Ro−R1|+|Go−G1+|Bo−B1|−Vcb, calculating a second color difference value ΔCol2 between the corresponding pixel color of the original image and the secondary color according to the equation ΔCol2=|R2−Ro|+|G2−Go|+|B2−Bo|−Vcs, and calculating a third color difference value ΔCol3 between the corresponding pixel color of the original image and the white color according to the equation ΔCol3=|255−Ro|+|255−Go|+|255−Bo|, wherein Ro, Go and Bo are RGB values of the corresponding pixel color of the original image, R1, G1 and B1 are RGB values of the primary color, R2, G2 and B2 are RGB values of the secondary color, values of 255 are RGB values of the white color, Vcb is a weight value for the primary color, Vcs is a weight value for the secondary color, and the weight values Vcb and Vcs are arbitrarily set; and
- converting the corresponding pixel color into a conversion color associated with the smallest color difference value of the calculated color difference values ΔCol1, ΔCol2 and ΔCol3.
- Preferably, the color converting step may comprise the steps of:
- setting an arbitrary color to a boundary color;
- on the pixel-by-pixel basis, calculating a first color difference value ΔCol1 between the corresponding pixel color of the original image and the primary color according to the equation ΔCol1=|Ro−R1|+|Go−G1|+|Bo−B1|−Vcb, calculating a second color difference value ΔCol2 between the corresponding pixel color of the original image and the secondary color according to the equation ΔCol2=|Rth−Ro|+|Gth−Go|+|Bth−Bo|−Vcs , and calculating a third color difference value ΔCol3 between the corresponding pixel color of the original image and the white color according to the equation ΔCol3=|255−Ro|+|255−Go|+|255−Bo|, wherein Ro, Go and Bo are RGB values of the corresponding pixel color of the original image, R1, G1 and B1 are RGB values of the primary color, Rth, Gth and Bth are RGB values of the secondary color, values of 255 are RGB values of the white color, Vcb is a weight value for the primary color, Vcs is a weight value for the secondary color, and the weight values Vcb and Vcs are arbitrarily set;
- comparing the calculated color difference values and producing the smallest color difference color; and
- converting the corresponding pixel color into the primary color if the first color difference value ΔCol1 is smallest, converting the corresponding pixel color into the secondary color if the second color difference value ΔCol2 is smallest, and converting the corresponding pixel color into the white color if the third color difference value ΔCol3 is smallest.
- Preferably, the method may further comprise the step of: converting the received original image into a bitmap image before the color converting step is carried out.
- Preferably, the color converting step may comprise the step of: deciding a conversion color according to priorities in order of the primary, secondary and white colors if two or more of the first, second and third color difference values correspond to the smallest color difference value as a result of the comparison.
- Preferably, the weight value for the primary color may be set to be large if a ratio of the primary color is desired to be increased in the two-color image, and wherein the weight value for the secondary color may be set to be large if a ratio of the secondary color is desired to be increased in the two-color image.
- The above and other objects, features and other advantages of the present invention will be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:
-
FIG. 1 is a flow chart illustrating an image processing method in a printer in accordance with the present invention; -
FIG. 2 is a view illustrating a color circle; -
FIG. 3 is a view illustrating an exemplary original image; - FIGS. 4 to 9 are views illustrating results of simulations where the original image shown in
FIG. 3 is processed in accordance with the present invention; -
FIG. 10 is a schematic perspective view illustrating a POS (Point-Of-Sale) terminal to which the present invention is applicable; and -
FIG. 11 is a block diagram illustrating a control structure of the POS terminal. - Now, a preferred embodiment of an image processing method in a printer in accordance with the present invention will be described in detail with reference to the accompanying drawings. Here, a POS (Point-Of-Sale) printer will be explained as an example.
-
FIG. 10 is a front perspective view illustrating aPOS terminal 3 to which the image processing method in accordance with the present invention is applicable. ThePOS terminal 3 can include amain unit case 10 having a rectangular parallelepiped shape and a cash drawer contained therein. Amanipulation keyboard 12 is mounted on a top surface in a front direction of themain unit case 10, and can receive information associated with a product or purchaser from an operator. Adisplay unit 13 for displaying an operation state and aprinter 14 for printing a receipt can be appropriately installed behind thekeyboard 12. ThePOS terminal 3 further includes abar code reader 20 for reading a linear bar code formed on a product and acard reader 18 for reading a card for credit-card transaction. ThePOS terminal 3 includes a display unit for a customer (not shown) so that a purchaser can confirm brief contents such as a payment amount, etc. before the purchaser pays money. The display unit for the customer can be installed behind themain unit case 10. A speaker (not shown) also can be installed behind themain unit case 10. - Here, the
printer 14 is a two-color printer such as a small-sized ink-jet, thermal or dot printer. -
FIG. 11 is a block diagram illustrating the configuration of a control section of thePOS terminal 3. The control section includes amain controller 51 for activating and controlling thePOS terminal 3. Themain controller 51 controls operations of elements of thePOS terminal 3 that includes adisplay controller 52, anacoustic controller 59, aprint data generator 53, aprinting controller 54, acash registration processor 55, astorage controller 56 and astorage device 58. - Programmed software for a ROM (Read Only Memory) or RAM (Random Access Memory) not shown in
FIG. 11 is mounted in thePOS terminal 3 so that the programmed software can be executed by a microprocessor. - The image processing method of the present invention described below is implemented by software. Under the control of the
main controller 51, the image processing method is mainly performed by theprint data generator 53. - The
print data generator 53 receives information of a receipt to be printed from themain controller 51, and receives advertisement information (e.g., a predetermined logo or image) based on at least three colors stored in thestorage device 58 through thestorage controller 56. Then, theprint data generator 53 generates print data. Then, theprint data generator 53 converts an inputted full-color image corresponding to the print data into a two-color image and then issues a printing command so that theprinter 14 can carry out an appropriate printing operation. - Under the control of the
printing controller 54, theprinter 14 prints the print data transferred from theprint data generator 53 on a predetermined paper. - Next, the image processing method of the present invention performed by the
print data generator 53 will be described in detail with reference to FIGS. 1 to 9. -
FIG. 1 is a flow chart illustrating the image processing method for converting a full color image into a two-color image. - At
step 101 as an initialization step, a primary color being a main color and a secondary color being a sub-color to be printed are set. The primary and secondary colors are colors capable of being printed by theprinter 14. The primary color is mainly used for printing a text, etc., and the secondary color is used for printing contents to be emphasized or additional contents. - At
step 102, an original image to be printed is inputted. At this time, the original image is based on a three-color image and various image formats. - If the original image is inputted, the inputted image is appropriately converted into a predetermined format image at
step 103. The inputted original image is converted into a 24-bit true color bitmap image. Pixel values of the converted original image are referred to as Ro, Go and Bo. If the inputted original image is based on RGB values capable of being processed, theabove step 103 can be omitted. - At
step 104, a color forming a boundary is set, and is referred to as a boundary color. The boundary color does not correspond to a threshold value for determining whether or not a color must be converted, but becomes a criterion for designating a color of the original image to be converted into the secondary color. - As shown in
FIG. 2 , R (Red), G (Green) and B (Blue) being three primary colors arranged at 120° intervals, and mixed colors depending upon ratios of RGB components, form a color circle. The boundary color can be selected from the color circle. A value of Red is indicated by a reference rotation angle 0°. Rotation angles from the reference rotation angle 0° in a counter clock-wise direction are expressed as values of designated colors. For example, if a value of the boundary color is set as a rotation angle 180°, the boundary color becomes a cyan color. The rotation angle 0° or 360° corresponds to Red. A predetermined rotation angle set in the color circle shown inFIG. 2 is referred to as a boundary value, a color corresponding to the boundary value is a boundary color, and the boundary color is expressed as RGB values Rth, Gth and Bth. - For example, if the primary and secondary colors are designated as the black and red colors in two colors to be printed and the boundary value is a
rotation angle 60°, the boundary color becomes a yellow color. The yellow color of the original image is converted into the secondary color, i.e., the red color. - Where the boundary color is designated as the secondary color, a result is the same as that where the boundary color is not designated. In other words, the step of designating the boundary color can be omitted if desired. However, where the boundary-color designating step is omitted, an operation of converting RGB values Rth, Gth and Bth of the boundary color into R2, G2 and B2 of the secondary color needs to be performed in a procedure of calculating color difference values described below.
- If the boundary color is designated as described above, there are calculated color difference values associated with the primary color, the boundary color being a criterion for a conversion to the secondary color and a white color on an original image pixel-by-pixel basis. A corresponding pixel color of the original image is converted into a conversion color having the smallest color difference value among the three colors (including the primary, secondary and white colors). These operations are performed at
steps 105 to 110. Thus, theabove steps 105 to 110 are performed for all pixels of the original image. Furthermore, the reason why the color difference value between the white color and the corresponding pixel color is calculated is because a paper to be printed is white, and colors viewed on a receipt actually printed by the POS terminal are the primary, secondary and white colors. - A procedure on an original image pixel-by-pixel basis will be described in detail step by step.
- First, at
step 105, a color difference value ΔCol1 between the corresponding pixel color and the primary color is produced. The color difference value ΔCol1 is calculated by the following Equation 1.
ΔCol1=|R o −R 1 |+|G o −G 1 |+|B o −B 1 |−Vcb Equation 1 - In the above Equation 1, Vcb denotes a weight value for the primary color, i.e., the black color, and can be arbitrarily set. The weight value for the primary color is used for deciding an amount of the color to be expressed as the primary color when the original image is converted into the two-color image. For example, as the weight value Vcb for the primary color becomes large, a ratio of the primary color becomes large in the converted image, and conversely a ratio of the secondary color becomes small in the converted image. In other words, an operation of heightening the probability that a difference value between the original-image pixel color and the primary color becomes smaller than that between the original-image pixel color and the secondary or white color is carried out so that a ratio of the black color becomes larger in the two-color image. R1, G1 and B1 denote RGB values of the primary color, respectively.
- Typically, the primary color is set as the black color, and RGB values of the black color are zero. At this time, an equation of calculating the color difference value between the corresponding pixel color and the primary color is given by ΔCol1=R+G+B−Vcb.
- Then, at
step 106, a color difference value ΔCol2 between the corresponding pixel color and the secondary color is produced. The above-described color difference value ΔCol2 is calculated by the following Equation 2.
ΔCol2=|R th −R o |+|G th −G o |+|B th −B o |−Vcs Equation 2 - In the above Equation 2, Rth, Gth and Bth denote color values of the boundary color set at the
above step 104. Vcs denotes a weight value for the secondary color, and can be arbitrarily decided. When the value of Vcs becomes large, the probability that the corresponding pixel color is converted into the secondary color becomes high. Conversely, when the value of Vcs becomes small, the probability that the corresponding pixel color is converted into the secondary color becomes low. - The reason why color values of the corresponding pixel are compared with RGB values of the boundary color rather than RGB values of the secondary color is because the boundary color being the criterion color to be converted into the secondary color is designated and an original image color corresponding to the boundary color is converted into the secondary color. A color difference value between the boundary color to be actually converted and the corresponding pixel color is calculated.
- Then, at
step 107, a color difference value ΔCol3 between the white color and the corresponding pixel color is calculated by the followingEquation 3.
ΔCol3=|255−R o|+|255−G o|+|255−B o|Equation 3 - In the
above Equation 3, values of 255 are RGB values for the white color. At this time, where a ratio of the white color becomes large, an actual image cannot be appropriately expressed. A weight value is assigned in the case of the primary or secondary color, but is not assigned in the case of the white color. - Then, at
step 108, the three color-difference values ΔCol1, ΔCol2 and ΔCol3 are compared, and the smallest color difference value is identified. The conversion color, i.e., the primary, secondary or white color, corresponding to the smallest color difference value is closest to the original-image pixel color. This embodiment uses the smallest color difference value. However, the largest color difference value can be optionally used. Where the largest color difference value is used, relations between the weight values for the primary and secondary colors and the ratios of the primary and secondary colors in the two-color image are opposite to those in the case where the smallest color difference value is used. In other words, as the weight value becomes smaller, the ratio of the primary or secondary color in the two-color image becomes larger. - If desired, the weight values Vcb and Vcs for the primary and secondary colors are not assigned so that a two-color image closest to the original image can be printed.
- Then, at
step 109, the corresponding pixel color is converted into the primary, secondary or white color corresponding to the smallest color difference value. For example, where the first color difference value ΔCol1 is the smallest color difference value, the corresponding pixel color is converted into the primary color. Further, where the second color difference value ΔCol2 is the smallest color difference value, the corresponding pixel color is converted into the secondary color. Furthermore, where the third color difference value ΔCol3 is the smallest color difference value, the corresponding pixel color is converted into the white color. - Where two or more values of the color difference values ΔCol1, ΔCol2 and ΔCol3 correspond to the smallest color difference value, priorities for the same smallest color difference values are designated in order of the primary, secondary and white colors. Conversion colors are decided according to the designated priorities. It is preferable that priorities for the conversion colors corresponding to the same smallest color difference values are designated in order of the primary, secondary and white colors. Where the same color difference values exist, the corresponding pixel color is converted into a conversion color having a higher priority.
- Finally, if the original image is completely converted into the two-color image after the
above steps 105 to 109 are performed on a pixel-by-pixel basis, a printing command for allowing theprinter 14 to print the two-color image as the converted image is issued atstep 110. The printing command is sent to theprinting controller 54 shown inFIG. 11 . Theprinting controller 54 controls an operation of theprinter 14 so that theprinter 14 can appropriately print the two-color image. - A result of the conversion based on the image processing method in accordance with the present invention will be described with reference to the original image shown in
FIG. 3 and simulation results shown in FIGS. 4 to 9. -
FIG. 3 shows the original image associated with the simulation results, and FIGS. 4 to 9 will be described with reference to the original image. -
FIG. 4 shows the case where the boundary value is set to the angle 360° (being the same as the angle 0° ) when the primary color is black and the secondary color is red. In this case, the boundary color is red. A color similar to the red color is converted into the red color being the boundary color. At this time, the weight values for the primary and secondary colors are not assigned. In this case, it can be found that a conversion to the secondary color is performed in a criterion of the red color being the boundary color. Furthermore, it can be found that green and blue-based colors are converted into the black color being the primary color, and cyan-based colors are converted into the white color. -
FIG. 5 shows the case where the weight value for the secondary color is assigned to the image shown inFIG. 4 . - When the primary color is black and the secondary color is red, the boundary value is set to the angle 360° and the weight value Vcs for the secondary color is set to be large. When the image shown in
FIG. 5 is compared with that shown inFIG. 4 , it can be found that a color area converted into the secondary color in a criterion of the red color being the boundary color is wider in the image shown inFIG. 5 . If the weight value for the secondary color is set to be large, a ratio of the secondary color becomes large in the two-color image. -
FIG. 6 shows the case where the weight value for the primary color is assigned to the image shown inFIG. 4 . When the primary color is black and the secondary color is red, the boundary value is set to the angle 360° and the weight value Vcb for the primary color is set to be large. When the image shown inFIG. 6 is compared with that shown inFIG. 4 , it can be found that an area of the black color being the primary color is wider and hence an area of the secondary color in a criterion of the red color being the boundary color is narrower in the image shown inFIG. 6 . If the weight value for the primary color is set to be large, a ratio of the primary color becomes large in the two-color image. -
FIG. 7 shows the case where the boundary value is set to the angle 180° when the primary color is black and the secondary color is red, and no weight value is assigned. The boundary color is cyan and cyan-based colors are converted into the secondary color (or Red) in a criterion of the cyan. Red-based colors are converted into the primary color, and yellow and magenta-based colors are converted into the white color. In other words, the conversion to the secondary color is carried out according to similarity to the boundary color in the criterion of the boundary color rather than similarity to the secondary color. As a result, where various applications are applied to the conversion, various image conversions can be achieved. -
FIG. 8 shows the case where the weight value for the secondary color is set to be large in the image shown inFIG. 7 . The primary, secondary and boundary colors are set to the black, red and cyan colors, and the weight value Vcs for the secondary color is set to be large. When the image shown inFIG. 8 is compared with that shown inFIG. 7 , it can be found that a color area converted into the secondary color in a criterion of the cyan color being the boundary color is wider in the image shown inFIG. 8 as in a simulation result shown inFIG. 5 . -
FIG. 9 shows the case where the weight value for the primary color is assigned to the image shown inFIG. 7 . The primary, secondary and boundary colors are set to the black, red and cyan colors, and the weight value Vcb for the primary color is set to be large. When the image shown inFIG. 9 is compared with that shown inFIG. 7 , it can be found that a color area converted into the primary color is wider and hence a color area converted into the secondary color in a criterion of the cyan color being the boundary color is narrower in the image shown inFIG. 9 as in a simulation result shown inFIG. 6 . - As the boundary color, the weight value for the primary color and the weight value for the secondary color can be arbitrarily set, the conversions to various two-color images can be allowed.
- As apparent from the above description, the present invention provides a method for processing an image in a printer, which can effectively carry out a conversion operation by comparing quantities of light components for R, G and B associated with each pixel to be converted when a full color image is converted into a two-color image, perform an image conversion operation as desired by a user by carrying out a calculation operation using difference values between quantities of original light components, a primary color and a secondary color and assigned weight values, and decide conversion colors by applying a regular rule to all possible cases when the conversion colors are decided, such that an excellent conversion result can be achieved.
- Although the preferred embodiments of the present invention have been disclosed for illustrative purposes, those skilled in the art will appreciate that various modifications, additions and substitutions are possible, without departing from the scope and spirit of the invention as disclosed in the accompanying claims.
Claims (11)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR2003-46813 | 2003-07-10 | ||
KR10-2003-0046813A KR100496330B1 (en) | 2003-07-10 | 2003-07-10 | Image processing method for printer |
Publications (2)
Publication Number | Publication Date |
---|---|
US6840599B1 US6840599B1 (en) | 2005-01-11 |
US20050007417A1 true US20050007417A1 (en) | 2005-01-13 |
Family
ID=33550304
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US10/674,973 Expired - Fee Related US6840599B1 (en) | 2003-07-10 | 2003-09-29 | Method for processing an image in a printer |
Country Status (2)
Country | Link |
---|---|
US (1) | US6840599B1 (en) |
KR (1) | KR100496330B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8520262B2 (en) * | 2009-11-17 | 2013-08-27 | Infoprint Solutions Company, Llc | Post color conversion mechanism for gray/black text and graphics objects |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5740333A (en) * | 1994-04-27 | 1998-04-14 | Ricoh Company, Ltd. | Image processing method and image processing apparatus for converting an inputted color image into a two-color image |
US6206504B1 (en) * | 2000-04-07 | 2001-03-27 | Transact Technologies, Inc. | Method and apparatus for two-color ink jet point of sale (POS) printing |
US6502923B2 (en) * | 2000-04-07 | 2003-01-07 | Transact Technologies, Inc. | Method and apparatus for two-color ink jet point of sale (POS) printing |
-
2003
- 2003-07-10 KR KR10-2003-0046813A patent/KR100496330B1/en not_active IP Right Cessation
- 2003-09-29 US US10/674,973 patent/US6840599B1/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5740333A (en) * | 1994-04-27 | 1998-04-14 | Ricoh Company, Ltd. | Image processing method and image processing apparatus for converting an inputted color image into a two-color image |
US6206504B1 (en) * | 2000-04-07 | 2001-03-27 | Transact Technologies, Inc. | Method and apparatus for two-color ink jet point of sale (POS) printing |
US6502923B2 (en) * | 2000-04-07 | 2003-01-07 | Transact Technologies, Inc. | Method and apparatus for two-color ink jet point of sale (POS) printing |
US6523937B1 (en) * | 2000-04-07 | 2003-02-25 | Transact Technologies, Inc. | Method and apparatus for single pass two-color ink jet point of sale (POS) printing |
Also Published As
Publication number | Publication date |
---|---|
KR100496330B1 (en) | 2005-06-21 |
KR20050006845A (en) | 2005-01-17 |
US6840599B1 (en) | 2005-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101491075B (en) | Image processing device, and image processing method | |
JP5693487B2 (en) | Color printing technology | |
US7280258B2 (en) | Logo data generating system, logo data generating method, and data storage medium | |
US7401877B2 (en) | Printing mode for a printer | |
US20040105126A1 (en) | Method of printing, program for realizing the same, recording medium, apparatus for printing, printer driver, merchandise sales data processing device, and point-of-sale system | |
US7126618B2 (en) | Apparatus and method for printing image and information associated therewith | |
US6863373B2 (en) | Two-color point of sale printing | |
EP1467556B1 (en) | Method, apparatus and program for image processing capable of producing high-quality achromatic images | |
US8117134B2 (en) | Neutral pixel correction for proper marked color printing | |
US6206504B1 (en) | Method and apparatus for two-color ink jet point of sale (POS) printing | |
US20070154250A1 (en) | Six-sided printing method | |
US20170017440A1 (en) | System and method for producing clear colorant on imposed multi-pass pages | |
US10432826B2 (en) | Automatic suppression of unrecognized spot colors from a raster image | |
US6840599B1 (en) | Method for processing an image in a printer | |
JP7381211B2 (en) | Image processing device and image processing method | |
US10122893B2 (en) | Automatic post processing of spot color combinations for a constrained colorant set | |
US9064203B2 (en) | Printing controller for enabling printer to perform printing processing, has region specifying unit to specify region having specific image data, color determiner, and predetermined processor to apply density reduction of pixel | |
JP2002307789A (en) | Apparatus and method for forming logo data, and recording medium therefor | |
US11872833B2 (en) | Infrared effect preserved on copy | |
US10791241B1 (en) | Vector pattern macro gloss | |
CA2714865C (en) | Color printer technology | |
JP2006159648A (en) | Recording system, image processor, inkjet recorder and image processing method | |
EP1396808A1 (en) | Method and apparatus of printing payment transaction information, program, printer driver and point of sale system for realising the same | |
JP2002214862A (en) | Image forming device, image forming method and storage medium with image forming procedure stored | |
JPH11105316A (en) | Printer and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: KOREA PRINTING SYSTEMS CO., LTD., KOREA, REPUBLIC Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:CHO, YOUNG KYOO;REEL/FRAME:014572/0649 Effective date: 20030905 |
|
AS | Assignment |
Owner name: BIXOLON CO., LTD., KOREA, REPUBLIC OF Free format text: CHANGE OF NAME;ASSIGNOR:KOREA PRINTING SYSTEMS CO., LTD.;REEL/FRAME:017034/0611 Effective date: 20040515 |
|
FPAY | Fee payment |
Year of fee payment: 4 |
|
AS | Assignment |
Owner name: BIXOLON CO., LTD., KOREA, REPUBLIC OF Free format text: CHANGE OF ADDRESS NOTICE;ASSIGNOR:BIXOLON CO., LTD.;REEL/FRAME:027298/0790 Effective date: 20111130 |
|
FPAY | Fee payment |
Year of fee payment: 8 |
|
REMI | Maintenance fee reminder mailed | ||
LAPS | Lapse for failure to pay maintenance fees | ||
STCH | Information on status: patent discontinuation |
Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362 |
|
FP | Lapsed due to failure to pay maintenance fee |
Effective date: 20170111 |