Image recording apparatus and colour conversion method

Abstract: This invention has as its object to provide an image recording apparatus, which can omit a color processing calculation process for designated colors of an image when color processing results for all the colors, which may be designated upon image drawings, can be held, and can increase an image recording processing speed without impairing color reproducibility of an image. Upon conversion from color coordinate values in a color space for designating image colors of input image data from a host computer (2) into color coordinate values in a color space inherent to the recording apparatus, a CPU (1) registers, in a color processing table (7b), the color coordinate values in the color space inherent to the recording apparatus for all the colors input as image data, and performs color coordinate conversion by retrieving the color coordinate values held in the color processing table (7c) as much as possible upon execution of the color coordinate conversion in place of performing a color processing calculation in each conversion.

Description: The present invention relates to an image recording apparatus capable of performing image recording using a plurality of colors. In a conventional image recording apparatus for recording a plurality of color images, a color space (to be referred to as an "input color space" hereinafter) used upon designation of image colors does not always coincide with a color space (to be referred to as an "output color space" hereinafter) for actually recording an image. In many apparatuses, the two color spaces do not coincide with each other such that the input color space used upon designation of image colors is a color space of red, green, and blue (RGB color space; a reference light source is a C light source of the CIE) of the NTSC standards, and the output color space used in actual image recording is a color space of yellow, magenta, cyan, and black (YMCK color space) inherent to a recording apparatus. For this reason, in the image recording apparatus, the values in the output color space must be obtained by converting the designated values in the input color space so as to reproduce colors designated in the input color space. Conversion from the values in the input color space to the values in the output color space will be referred to as color processing hereinafter. Various color processing methods have been proposed and put into practical applications. Fig. 4 shows an example of conventional color processing. In the example shown in Fig. 4, the input color space is an RGB color space of the NTSC standards, and is converted into a YMCK color space inherent to the recording apparatus. A LOG converter 41 performs conversion using a logarithmic function, and a masking circuit 42 then performs linear conversion based on the values converted by the LOG converter 41. The linear conversion results are determined as the values in the YMCK color space. The conversion coefficient values used in the linear conversion in the masking circuit 42 are determined in consideration of ink characteristics, and the like of a recording apparatus of interest. Fig. 4 also shows masking formulas used in the conversion of the conventional masking circuit. As described above, the conventional image recording apparatus for recording an image having a plurality of colors converts colors designated in the input color space into values in the output color space, thereafter, generates patterns in units of output colors, and then performs recording. For this reason, a numerical value calculation amount in the color processing for reproducing the colors designated in the input color space is large, and a processing time required for this calculation prolongs a time required for image recording. In some prior arts, the color processing is simplified to decrease a calculation amount so as to shorten the color processing time. However, the colors of a recorded image considerably become different from the designated colors. The present invention has been made to solve the above-mentioned problems, and has as its object to provide an image recording apparatus, which can increase an image recording processing speed without impairing color reproducibility of an image by simplifying a color processing calculation process for designated colors of an image as much as possible. The invention provides a colour image processing apparatus comprising: input means for inputting colour image data; colour processing means for colour processing the input colour image data; means for generating a look-up table for use in colour processing the input colour image data; judgment means for judging, in accordance with the input colour image data, whether or not the look-up table is to be generated for use by the colour processing means in colour processing the input colour image data; and wherein if said judgment means judges that the table is to be generated, said colour processing means colour processes the input colour image data using the table, while if said judgment means judges that the table is not to be generated, said colour processing means colour processes the input colour image data by arithmetic operation. In such an arrangement, when input image data is converted into image data in a different colour space matching with a recording apparatus, the colour processing results held in the table are retrieved and used for any colours that can be designated as much as possible in place of a colour processing calculation. It is noted that EP-A-0321983 discloses use of an image processing apparatus in which a look-up table memory is provided in the data path and used always for colour space conversion. The look-up table memory can be re-loaded by a CPU in accordance with different prestored sets of conversion coefficients. It is noted that EP-A-0313789 discloses a method of representing three-dimensional colour data in a one-dimensional reference system. Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing an arrangement according to an embodiment of the present invention; Fig. 2 shows a format of an image command of this embodiment; Fig. 3 is a flow chart for explaining an image recording operation of this embodiment; and Fig. 4 is a diagram showing a conventional color processing procedure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The preferred embodiment of the present invention will be described in detail below with reference to the accompanying drawings. <Description of Apparatus Arrangement (Fig. 1)> Fig. 1 is a block diagram showing an arrangement according to an embodiment of the present invention. Fig. 1 exemplifies a case wherein this embodiment is applied to a printer for printing out data input from a host computer 2. In Fig. 1, reference numeral 1 denotes a printer main body of this embodiment, which generates binary pattern data from image data input in the format of an image command from the host computer 2, and prints the pattern data using a total of four color inks, i.e., yellow (Y), magenta (M), cyan (C), and black (K). The host computer 2 supplies print data to the printer 1 of this embodiment. Note that the print data means a command string consisting of an image command and a paper exhaust command. Fig. 2 shows the format of the image command used in this embodiment. In this embodiment, the printer, which processes only the image command and the paper exhaust command, and performs a print operation, will be described for the sake of simplicity. The printer 1 of this embodiment comprises the following constituting members. Reference numeral 3 denotes a CPU for controlling the printer main body according to a program (Fig. 3; to be described later) stored in a program ROM 5. Reference numeral 4 denotes a reception buffer for temporarily storing print data supplied from the host computer 2. Note that reception of the print data is processed in an interrupt routine (not shown). Reference numeral 5 denotes the ROM for storing a program having an algorithm shown in Fig. 3, which is used by the CPU 3 to control the printer main body. Reference numeral 6 denotes an area for holding various parameters used upon execution of color processing. The area 6 comprises a ROM. Reference numeral 6a denotes a masking coefficient used upon execution of masking processing as part of the color processing. Note that the masking processing of this embodiment is executed using the following formulas. Y = a 11 Y' + a 12 M' + a 13 C' M = a 21 Y' + a 22 M' + a 23 C' C = a 31 Y' + a 32 M' + a 33 C' where a 11 to a 33 are the masking coefficients. Reference numeral 7 denotes a RAM used by the CPU 3 to hold various data during an operation. The RAM 7 is allocated with a color processing work area 7a used in the color processing, a color processing table 7b for holding color processing results for all the colors, and a frame buffer 7c for holding binary print patterns. The frame buffer 7c is divided into four internal areas respectively corresponding to the four colors and holds Y, M, C, and K print patterns. Reference numeral 8 denotes a printer output section for printing the print patterns generated in the frame buffer 7c onto a print paper sheet. The printer output section 8 can reproduce and print an arbitrary color by printing image patterns in units of Y, M, C, and K colors to overlap each other. <Description of Print Processing Procedure (Fig. 3)> The image command of this embodiment designates colors of pixels as R, G, and B luminance data according to the NTSC standards. For this purpose, the R, G, and B pixel colors must be converted into Y, M, C, and K data. The print processing procedure of this embodiment including processing for converting R, G, and B pixel colors into Y, M, C, and K data will be described in detail below with reference to the flow chart shown in Fig. 3. The flow chart of Fig. 3 shows the control algorithm of the CPU 3 according to the program stored in the program ROM 5 in Fig. 1. In step S1, data received from the host computer 2 and held in the reception buffer 4 is read. In step S2, it is checked if the read data is an image command. If NO in step S2, the flow advances to step S3 to check if the read data is a paper exhaust command. If YES in step S3, the flow advances to step S4 to perform paper exhaust processing, and binary color patterns on the frame buffer 7c are cleared. Thereafter, the flow returns to step S1, and the control starts processing of the next command. If it is determined in step S3 that the read data is not the paper exhaust command, the flow advances to step S5 to perform error processing, and the flow returns to step S1 to process the next command. When execution of another processing command is permitted, execution processing of the permitted processing command is performed. If it is determined in step S2 that the read data is the image command, the flow advances to processing in step S6 and subsequent steps, and image drawing processing is performed. In step S6, a work area, which is required during image drawing (mainly in generation of binary patterns), is assured in the RAM 7. In step S7, the number of colors designated as pixel colors by the image data is calculated. The number of colors can be easily calculated based on the number of bits per image pixel given in the image command. For example, in the case of a binary image using one bit per pixel (a total of 3 bits for R, G, and B pixels), one pixel can designate one of colors for 3 bits, i.e., 8 different colors. In the case of a binary image using two bits per pixel (a total of 6 bits for R, G, and B pixels), one pixel can designate one of colors for 6 bits, i.e., 32 different colors. More specifically, the number of colors, which can be designated per pixel, is 8 when one pixel is expressed by 1 bit, and is 32 when one pixel is expressed by 2 bits. In step S8, the capacity of the color processing table necessary for holding the color processing results of all the colors obtained in step S7 is calculated. This calculation is attained by (the number of bytes of a color processing result per color) x (the total number of colors). In step S9, it is checked if an area (in the RAM) large enough to create the color processing table is assured. If it is determined in step S9 that the color processing table can be assured, the flow advances to step S10 to set a table mode flag in an ON state. The table mode flag is used in color conversion in step S15 (to be described later). The flow then advances to step S11 to assure the area 7a for the color processing table in the RAM 7. Subsequently, in step S12, the color processing results for all the colors (which results are obtained by converting R, G, and B image data for all the colors into Y, M, C, and K data) are registered in the color processing table. The flow advances to step S13. This color processing results are known to those who are skilled in the art, and a detailed description thereof will be omitted. On the other hand, if NO in step S9, the flow advances to step S17 to set the table mode flag in an OFF state. The flow then advances to step S13 and subsequent steps. In steps S13 to S15, processing for converting all the R, G, and B image data into Y, M, C, and K image data is performed. In step S13, it is checked if processing for all the image data is ended. If NO in step S13, the flow advances to step S14 to read image data for one pixel. In step S15, R, G, and B image data are converted into Y, M, C, and K image data. The flow then returns to step S13. In step S15, RGB-YMCK conversion of image data is performed in units of pixels. At this time, when the table mode flag is ON, the color processing results held in the color processing table 7b are retrieved, and the conversion is performed using the retrieved values without using actual conversion coefficients. On the other hand, when the table mode flag is OFF, since this means that no table for holding the color processing results is present, a color processing calculation is actually performed in step S15. Upon completion of conversion of all the image data to Y, M, C, and K data, the flow advances from step S13 to step S16, and the Y, M, C, and K image data obtained so far are binarized, thereby generating binary image patterns in correspondence with Y, M, C, and K colors. Note that the binary patterns are generated and held in the frame buffer 7c in Fig. 1. In the RGB-YMCK conversion in the above description, as for a method of generating K, the minimum value of Y, M, and C is used as K, and the value K is subtracted from the Y, M, and C values to generate new Y, M, C, and K values. As described above, according to this embodiment, when the color processing results for all the designated colors which may be encountered upon image drawing can be held, the color processing results for all the designated colors are calculated and held. The color processing results are used in processing of image data later, thereby decreasing the color processing calculation amount. Another Embodiment In the above embodiment, R, G, and B values used in, e.g., the NTSC method are used to express pixel colors of image data. However, pixel colors may be expressed by other R, G, and B values or L*, a*, and b* values in a uniform color space defined by the CIE. In the above embodiment, linear equations are used as the masking formulas. Alternatively, the masking formulas may include quadratic terms. More specifically, the present invention is not limited to a color processing calculation method (calculation formulas). In the above embodiment, a binarization method used for generating binary patterns is not described in detail. However, the present invention is not limited to a binarization method to be used. For example, various binarization methods such as binarization processing based on a dither method, an error diffusion method, and the like may be used. The present invention may be applied to a system consisting of a plurality of devices or to an apparatus consisting of one device. The present invention may also be applied to a case wherein the effect of the present invention is achieved by supplying a program to a system or apparatus, as a matter of course. As described above, according to the present invention, when the color processing results for all the colors, which may be designated upon image drawing, can be held, the color processing calculation process for the designated colors of an image can be omitted, and the image recording processing speed can be increased without impairing color reproducibility of an image. As many apparently widely different embodiments of the present invention can be made without departing from the scope thereof, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.

Claims: A colour image processing apparatus comprising: input means (4, S14) for inputting colour image data; colour processing means (3, 6, 7) for colour processing the input colour image data; means for generating a look-up table for use in colour processing the input colour image data; judgment means for judging (S9), in accordance with the input colour image data, whether or not the look-up table (7b) is to be generated for use by the colour processing means in colour processing the input colour image data; and wherein if said judgment means judges that the table is to be generated, said colour processing means colour processes the input colour image data using the table, while if said judgment means judges that the table is not to be generated, said colour processing means colour processes the input colour image data by arithmetic operation. The apparatus according to claim 1, wherein said judgment means includes number of colour calculation means for calculating (S7) a number of colours which can be designated in the input colour image data. The apparatus according to claim 1 or 2, wherein said apparatus includes a memory (7) for holding data, and wherein said judgment means includes means for determining (S8, S9) whether or not a memory area (7b) for creating the table can be assigned within said memory (7). The apparatus according to claim 1, 2 or 3, wherein said colour processing means converts (S15) input RGB colour image data into output YMCK colour image data. The apparatus according to claim 1, 2, 3 or 4, wherein said judgment means indicates a judgment result by ON/OFF status of a flag (S10, S17). A colour image processing method comprising: an input step (S14) of inputting colour image data; and a colour processing step (S15) of colour processing the input colour image data, wherein at said colour processing step there is selected one of (i) a first mode in which a look-up table is generated for colour processing colour image data, in accordance with the total number of possible colours, and the input colour image data are colour processed using the table, and (ii) a second mode in which the input colour image data are colour processed by arithmetic operation. The method according to claim 6, including a calculation step (S7) of calculating the total number of colours which can be designated by the input colour image data. The method according to claim 6 or 7, wherein at said colour processing step, input RGB colour image data is converted into output YMCK colour image data.

Inventors: TANAKA FUMIHIRO, TANAKA, FUMIHIRO, Tanaka, Fumihiro, c/o Canon Kabushiki Kaisha
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: H04N1
IPC codes: G06T1, H04N1