Color signal correction circuit using a second-order correcting formula
BACKGROUND OF THE INVENTION 
     (1) Field of the Invention 
     The present invention relates to a color signal correction circuit used in an apparatus for processing a color signal, and particularly, relates to a color signal correction circuit which quickly corrects a color signal according to a second-order color correction formula. 
     (2) Description of the Related Art 
     In recent years, as Desk-Top Publishing (DTP) systems, multi-media systems, etc, have been widely used, low-level computers such as personal computers have been used to process color image data. Further, the number of color copiers and color facsimiles in use is increasing, therefore, demand for color image scanners and color printers will increase. 
     Color image scanners which output R, G and B signals each with more than 256 gradation levels respectively and color printers which can produce more than 16 million colors, by combining inks of Cyan, Magenta, Yellow and Black are now available. When color images are reproduced by using these apparatuses, color drifts are generated due to differences between the characteristics of the respective apparatuses. 
     For example, in a color image scanner, an original image is separated into three primary color images of R, G and B by using corresponding color filters, and an image converter such as a CCD converts the separated color images into digital electrical signals. Because the color characteristics of the color image scanners are determined by characteristics of lighting systems, the three primary color filters and the image converters, color image scanners have different characteristics. Therefore, if the color separation signal obtained in each apparatus is directly output, the output color separation signal does not have the desired characteristics. Consequently, in the color image scanner, an operation to correct the obtained color separation signals to color separation signals having the desired characteristics is necessary. 
     Also, the color reproduction characteristics of a color printer are determined by the characteristics of inks, dot areas and overlap conditions, and color printers have different characteristics. Therefore, if images are produced by directly using input color separation signals, the desired color image cannot be obtained. Consequently, in the color printer, an operation to correct the obtained color R, G and B separation signals to the color R, G and B or C, M, Y separation signals or C, M, Y and K having the desired characteristics is also necessary. 
     When a color image scanner exclusively connects to a color printer, color correction is necessary in order to change an original color image to a desired color image. 
     Although a strict color correction can be carried out using the Neugebaure formula, an easier color correction using a masking formula is generally carried out. In a large scale system used in making plate for a printing machine, a high speed computer having a high throughput is used to carry out the operation, and the color correction is carried out, using signals from a drum, type scanner according to the Neugebaure formula or the masking formula. However, the operation time is excessively long. Therefore, it is difficult to use such a high throughput computer in a small DTP system , etc. Further, a long operation time for the color correction becomes a problem because the computer can not be used only for the color correction. Therefore, a color correction circuit which can carry out a color correction operation in a short time is required even though the color correction will be limited in some points. 
     Two masking formulas of a linear (first-order) masking formula and a second-order masking formula are widely used. A linear masking formula is expressed by a formula (1), and a second-order masking formula is expressed in by a formula (2). ##EQU1## 
     The operation of the linear masking formula is easier than that of the second-order masking formula. However, the correction by the linear masking formula is not sufficient for all purposes. Therefore, when color correction of a high degree is necessary, a second-order masking formula is used. The present invention relates to a color correction circuit which carries out color correction by using a second-order masking formula. 
     When the calculations for the second-order masking formula are carried out only by software, the operating time becomes excessively very long. Therefore, several kinds of color correction circuits and color correction methods are proposed. 
     A color correction circuit having the shortest operating time is a memory circuit in which three color separation signals are input as look-up table address signals, and previously calculated correction values are stored in the look-up table. In this circuit, color correction values are directly obtained by applying three color separation signals. However, this circuit has a problem that the memory requirement of this circuit is very large. 
     For example, when each color separation signal is eight bit data which can express 256 gradation levels, and the color correction value stored in the circuit is also eight bit data, the memory capacity of the color correction circuit is 256×256×256×3 (colors)=48 Mbyte. As the capacity of memory devices has increased in recent years, a color correction circuit having such a memory capacity may be realized. However, such a color correction circuit must be expensive. Therefore, a type of color correction circuit in which the total memory capacity can be reduced although the operation time becomes a little longer is required. 
     For example, Japanese Unexamined Patent Publication (Kokai) 3-66288 discloses an image processing apparatus in which values of square terms of respective color separation signals are stored in a memory to which upper one or more bits of respective color separation signals are input as address signals, and correction values corresponding to lower eliminated bits are calculated by a interpolation method. 
     However, the above image processing apparatus has a problem that the operation time becomes long because the operation is carried out by the interpolation method. 
     Further, Japanese Unexamined Patent Publication (Kokai) 2-7671 discloses a color correction apparatus which includes latches for holding respective color separation signals; memories in which color separation signals are respectively input as address signals and values of square terms of respective color separation signals are stored; memories in which pairs of two color separation signals are respectively input as address signals and product values of respective pairs of two color separation signals are stored; a memory for storing correction indices; and an accumulator. In this apparatus, a correction value can be obtained by adding values output from respective memories in response to color separation signals by the accumulator. 
     In this color correction apparatus, the total capacity of the memories is reduced and the operation time is comparatively short. However, this apparatus has a problem that a many kinds of memories are provided, and the accumulator is complex because a number of the outputs added by the accumulator is large. 
     SUMMARY OF THE INVENTION 
     An object of the present invention is to realize a color correction circuit in which the total o capacity of the memories is further reduced and an operation time is also reduced in comparison with the prior art. 
     A color correction circuit according to the present invention corrects three digital color separation signals according to a second-order color correction formula. The color correction circuit includes three latches, a first memory, a second memory, a third memory and an adder. The three latches respectively hold the three digital color separation signals. The first memory receives first and second color separation signals of the three digital color separation signals and a color selection signal as address signals, and outputs the value of the sum of some terms previously calculated by the second-order color correction formula. The second memory receives second and third color separation signals of the three digital color separation signals and the color selection signal as address signals, and outputs the value of the sum of some terms previously calculated by the second-order color correction formula. The third memory receives third and first color separation signals of the three digital color separation signals and the color selection signal as address signals, and outputs the value of the sum of some terms previously calculated by the second-order color correction formula. The adder outputs the sum of the outputs of the first, second and third memories. The value of the term including the product of the first and second color separation signals in the second-order color correction formula is included in the value in the first memory. The value of the term including the product of the second and third color separation signals in the second-order color correction formula is included in the value in the second memory. The value of a term including the product of the third and first color separation signals in the second-order color correction formula is included in the value in the third memory. Values of linear terms and terms including square of respective color separation signals in the second order color correction formula are included in memories to which related color separation signals are input. 
     When correction values are previously calculated and stored in a memory which receives color separation signals as address signals, the total required capacity of the memories decreases according to a decrease in the maximum number of bits in the address signal stored in each memory. In order to make the operation time shorter and the operation circuit simpler, the correction value must be obtained only by adding values output from the memories. Because the second-order masking formula has three product terms for two color separation signals, three memories which respectively store three pairs of two color separation signals are necessary in order to obtain the correction value by only adding values output from the memories. Other values of linear terms and square terms of respective color separation signals in the second-order color correction formula can be stored in memories to which related color separation signals are input, further, these values of linear terms and square terms are added and stored in memories. Therefore, when these values are stored in a form that these values are previously added to the value of the product terms of the two color separation signals, memories for storing these values of linear terms and square terms can be omitted. Further, the adder becomes simpler and the operation time becomes shorter because the number of outputs from the memories are reduced. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention will be more clearly understood from the description as set forth below with reference to the accompanying drawings, wherein: 
     FIG. 1 is a block diagram showing a constitution of a color correction circuit of a first embodiment of the present invention; 
     FIGS. 2A through 2J are time charts showing operations of the color correction circuit of the first embodiment; 
     FIG. 3 is a block diagram showing a constitution of a color correction circuit of a second embodiment of present invention; 
     FIG. 4 is a block diagram showing a total constitution of a color image scanner to which the present invention applied; 
     FIG. 5 is a block diagram showing a constitution of an analog-to-digital converting circuit to convert an analog signal output from a color image sensor into a digital signal in the color image scanner of FIG. 4 
     FIG. 6 is a block diagram showing a constitution of an output circuit to output corrected image signals in the color image scanner of FIG. 4 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 is a block diagram showing a constitution of a color correction circuit of a first embodiment of the present invention. 
     In FIG. 1, reference numerals 11, 12 and 3 designate latches which hold three digital color separation signals r, g, b, input from outside the device, until corrected color separation signals are obtained. A first memory 21 which receives color separation signals r, g and a color selection signal. A second memory 22 which receives color separation signals g b and a color selection signal. A third memory 23 which receives color separation signals b, r and a color selection signal. The color selection signal can have one of three values of 1, 2 or 3. When the color separation signal is &#34;0&#34;, the corrected color separation signal is output. When the color separation signal is &#34;1&#34;, the corrected color separation signal G is output. When the color separation signal is &#34;2&#34;, the corrected color separation signal B is output. An adder 31 outputs a sum of the three values output from the first memory 21, the second memory 22 and the third memory 23. In the first embodiment, ROMs are used as the first, second and third memories. 
     Values of respective terms in the above-mentioned second-order masking formula are divided into three groups and sums of the respective groups are respectively stored in the first memory 21, the second memory 22 and the third memory 23 in look-up table forms. For example, in the first memory 2, the sum of the terms m 11  r, m 14  rg, m 17  r 2 , m 10  of the second-order masking formula is stored at an address corresponding to the values of the color separation signals r, g and the &#34;0&#34; color selection signal. Similarly, a sum of terms m 21  r, m 24  rg, m 27  r 2  is stored at an address corresponding to the values of the color separation signals r,g and the &#34;1&#34; color selection signal, and a sum of terms m 31  r, m 34  rg, m 37  r 2  is stored at an address corresponding to the values of the color separation signals r, g and the &#34;2&#34; color-selection signal. 
     Further, in the second memory 22, the sum of the terms m 12  g, m 15  gb, m 18  g 2  of the second-order masking formula is stored at an address corresponding to the values of the color separation signals g, b and the &#34;0&#34; color selection signal. Similarly, the sum of the terms m 22  g, m 25  gb, m 28  g 2  m 20  is stored at an address corresponding to the values of the color separation signals g,b and the &#34;1&#34; color selection signal, and the sum of the terms m 32  g, m 35  gb, m 38  g 2  is stored at an address corresponding to the values of the color separation signals g, b and the &#34;2&#34; color selection signal. Further, in the third memory 23, the sum of the terms m 13  b, m 16  br, m 19  b 2  of the second-order masking formula is stored at an address corresponding to the values of the color separation signals b, r and the &#34;0&#34; color selection signal. Similarly, the sum of the terms m 23  b, m 26  br, m 29  b 2  is stored at an address corresponding to the values of the color separation signals b, r and the &#34;1&#34; color selection signal, and the sum of the terms m 33  b, m 36  br, m 39  b 2 , m 30  is stored at an address corresponding to the values of the color separation signals b, r and the &#34;2&#34; color selection signal. 
     Consequently, for example, when the color selection signal is &#34;1&#34; and the color separation signals are r n , g n , b n , the first memory 21 outputs a value of m 21  r n  +m 24  r n  g n  +m 27  r n   2 , the second memory 22 outputs a value of m 22  g n  +m 25  g n  b n  +m 28  g n   2  +m 20 , the third memory 23 outputs a value of m 23  b n  +m 26  b n  r n  +m 29  b n   2 . The adder 31 adds these outputs, then, a green corrected value of the second-order masking formula. 
     While the latches hold the input color separation signals r, g and b, the correction values R, G and B can be obtained by sequentially changing the color selection signal. 
     FIGS. 2A through 2J are time charts showing these operations. 
     As shown in FIGS. 2A through 2J, while the color separation signals r, g, b are latched, memories output partial sums of terms m 10  through m 19 , and the correction value R is obtained by adding these outputs in the adder. Further, while the latched color separation signals r, g, b are held, the correction values G and B are obtained by sequentially changing the color selection signal to &#34;1&#34; and &#34;2&#34;. 
     In the first embodiment, values of linear terms and terms including square of respective color separation signals are added to the sums stored in the memories in a form described above, however, other forms can be made available. Namely, the respective values of linear terms and square terms can be added to sums output from memories to which related color separation signals are input. Further, each constant term can be added to every sum output from the memories. For example, in the first embodiment, terms m 11  r, m 17  r 2 , m 10  can be stored in a form that they can be added to the sum of terms m 13  b, m 16  br, m 19  b 2  stored in the third memory 23. 
     In the circuit of FIG. 1, when a number of data bits of each memory is eight, a total capacity of the three memories is 590 kbyte (2 16  ×3×3) because a number of bits for each color separation signal is eight and the color selection signal can be in three states. 
     As described above, when a memory receives three color separation signals as address signals, the required capacity of the memory is 48 Mbyte. Therefore, it is apparent that the required capacity is reduced in the first embodiment. Further, in comparison with a color correction apparatus disclosed in Japanese Unexamined Patent Publication (Kokai) 2-7671, memories to store values of square terms and a memory to store correction indices are eliminated, and the constitution of the adder becomes simpler and the operating speed of the adder becomes faster because the adder adds only three inputs. 
     In the first embodiment, the memories 21, 22, 23 to dividedly store the correction values of the masking formula are realized by Read Only Memories (ROMs) because the capacity of the ROM is generally larger than those of other memory devices and the cost per bit is lower than those of the other memory devices. However, because the total capacity of the memories is reduced according to the present invention, the circuit shown in FIG. 1 can be realized by using other memory devices such as Static Random Access Memories (SRAMs). When the circuit is realized by using the memory devices such as SRAMs which are rewritable, the contents of the memories are changable. 
     When apparatuses used in a system are changed or the reproduction color needs to be changed, values of the indices of the second-order color correction formula must be changed. When the memories are realized by the ROMs, the ROMs are replaced with other ones to change the values of indices of the formula, namely, the system using ROMs is not flexible. However, when rewritable memories are used, the system becomes flexible. A second embodiment is an example using SRAMs. 
     FIG. 3 is a block diagram showing the constitution of a color correction circuit of the second embodiment. 
     In FIG. 3, reference numerals 111,112 and 113 designate latches. 114, 15 and 116 designate selectors each of which switches address signals input to the memories between color separation signals output from the latches and address signals from a microcomputer. 121,122 and 123 designate SRAMs which dividedly store correction values for the masking formula. 131 and 132 designate adders. 120 designates a three state buffer. 
     In the second embodiment, the SRAMs are used as memories which store corrected values of the masking formula, therefore, contents of the SRAMs can be changed from outside via the selectors 11, 115, 116 and the three state buffer 10. In this way, the correction formula is always changable. The contents stored in the SRAMs 121,122, 123 are same as those in the first embodiment. 
     Further, in the second embodiment, only the upper five bits of the color separation signal G are input to the SRAM 121. Similarly, the upper five bits of the color separation signals B, R are respectively input to the SRAM 122, 123. Each color separation signal is normalized at &#34;1&#34;, therefore, the product of two color separation signals becomes smaller than the values of the respective color separation signals. As described in the first embodiment, the color separation signal G contributes a value stored in the first memory 121 only in a form of a product with the color separation signal R, namely, the contribution ratio of the color separation signal G is low in the first memory. Therefore, although three lower bits of the color separation signal G are eliminated, the accuracy of the operation is not reduced. In the same way, the eliminations of lower three bits of the color separation signals B, R input to the second and third memories do not reduce the accuracy of the operation. By eliminating the lower three bits of each color separation signal as shown in FIG. 3, the capacity of the memories can be reduced to 1/8 of the first embodiment. 
     Further, although the adder of the first embodiment has three inputs, two adder each of which has two inputs are used in the second embodiment. 
     The first and second embodiments are described above, however, there can be modifications to the present invention. For example, the constant terms of the masking formula are not added to values in the memories, but are stored in a register. Then, they are supplied in response to the color selection signal. 
     Further, the color separation signals are red, green and blue in the embodiments, however, they can be cyan, magenta and yellow. 
     In the following, an example is given in which a color correction circuit of the present invention is applied to a color image scanner. 
     FIG. 4 is a block diagram showing a color image scanner having a color correction circuit of the present invention. 
     In FIG. 4, reference numeral 1 designates a color image sensor which converts image light reflected from an original into electrical signals corresponding to three colors R, G and B. For example, the color image sensor can be realized by a CCD (Charge Coupled Device). An Analog-to-Digital (A-D) 2 conversion circuit converts the outputs of the color image sensor 1 into digital signals. A color correction circuit 3 corrects output image signals of the A-D conversion circuit 2 into signals having appropriate color characteristic. The color correction circuit 3 is either of the circuits of the first or second embodiments. A memory 4 is used to resolve a timing difference between a scan timing of the color image sensor 1 and an output timing of an interface. Reference numeral 115 designates a control circuit. A motor 6 which relatively moves the color image sensor 1 or the original. The color image sensor 1 reads the original synchronously. A lamp 7 for illuminating the original. The motor 6 and the lamp 7 are controlled by the control circuit 5. 
     FIG. 5 is a block diagram showing the constitution of the color image sensor 1 and the A-D conversion circuit 2 of FIG. 2. These devices are well-known, therefore, detailed explanations are omitted and only outlines are described. 
     The color image sensor 1 provides filters at a light receiving portion, and the filters respectively transmit red, green and blue light. The color image sensor 1 outputs analog color separation signals in proportion to intensities of respective colors of the reflected light. 
     The A-D conversion circuits 2 are respectively provided for the three color signals. In the A-D conversion circuit 2, an amplifier circuit AMP at a first stage converts the input signal to a signal having a voltage appropriate to an A-D converter. Reference voltages from a white level portion and a black level portion are input to reference voltage input terminals of the A-D converter. By these reference voltages, the A-D converter is adjusted so that maximum and minimum outputs of the A-D converter respectively correspond to outputs of when a white reference plate and a black reference plate are read. For example, when the output of the A-D converter is 8-bits, an output of hexadecimal FF corresponds to the white reference plate and an output of hexadecimal 00 H  corresponds to the black reference plate. In this way, non-uniformities of sensitivity of the color image sensor 1 are corrected. 
     FIG. 6 is a block diagram showing a constitution of a circuit which is used to synchronize generation and output of the corrected color signals. This circuit provides a buffer memory BM and a Direct Memory Access (DMA) Controller D.Con. 
     The color image sensor 1 sequentially outputs signals for a line in synchronization with a constant clock signal. On the contrary, a SCSI interface is a standard interface which carries out transfer by a hand-shake method. Therefore, the generation and the output of the corrected signals are not synchronous. Therefore, the buffer memory is necessary. 
     Particularly, when the movement of the color image sensor 1 is controlled by a through-up and through-down method, the buffer memory further improves the transfer efficiency. In this application example, writings into the buffer memory are always carried out in synchronization with the operation of the color image sensor 1, and outputting from the buffer memory is carried out using a cycle-steal mode. 
     As described above, according to the present invention, a color correction circuit which corrects color separation signals according to the second-order masking formula can be realized with a memory capacity less than those of prior art color correction circuits. Therefore, the color correction circuit can be provided in low price systems such as a color image scanner, a color printer, etc., and the color reproduction qualities of these systems can be improved.