Image processing apparatus and method

Abstract: The invention is intended to prevent deterioration in image quality of an image comprising a mixture of a natural image area, a color character image area, etc. in a process of ADCT multi-value color image compression. In the ADCT process, input image data is separated in units of different image areas based on DCT coefficients after DCT. A quantization factor and a quantization table dedicated for natural images are used for the natural image area. For the color character image area, any suitable one of several quantization factors is selected depending on magnitude of an absolute value of the DCT coefficient, and a quantization table dedicated for character is used for quantization. With this arrangement, deterioration of the color character image, particularly, difference in deterioration of characters between different colors, can be prevented.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to an image processing method and apparatus for compressing image data in an adaptive manner to an input image. Related Background Art As one of techniques for compressing multi-value images, there has been proposed an ADCT (Adaptive Discrete Cosine Transform) compression method mainly applied to natural images. With this compression method, three primary (RGB) signals are converted into three components of Y, U and V. Of these components, the Y signal representing luminance is compressed at the same resolution, while the U, V signals representing chrominance components are compressed at the lowered resolution after sub sampling. In a step 1 of the compression, each component is subjected to DCT in units of 8 x 8 pixel blocks for conversion into a frequency space of 8 x 8 to thereby obtain DCT coefficients. In a step 2, quantization tables are respectively prepared for the luminance component (Y) and the chrominance components (U, V) so that the DCT coefficients are linearly quantized (divided) for each component using quantization values of 8 x 8 which are resulted by multi-plying quantization factors by respective elements of the 8 x 8 quantization table, thereby obtaining quantization coefficients. In a step 3, quantization coefficients are subjected to Huffman encoding. However, when an image comprising a natural image area, a color character image area and a CG image area in a mixed pattern, for example, is compressed by using the prior art compression method as stated above, there has accompanied a sever shortcoming that quality of the color character image and the CG image deteriorates. Also, it has not been conceived to separately perform quantization of the luminance data and the chrominance data in respective suitable manners. EP-A-0323363 describes a synchronisation method for the transmission of an asynchronous channel or series of pictures encoded by means of a variable length code. In this method, each of a brightness value, red color difference value and blue difference value are divided into blocks of picture elements, discrete cosine transformed and then weighted in accordance with a weighting coefficient determined by a classification device. The classification is determined on the basis of the luminance or brightness value. EP-A-0400756 describes a method and apparatus for digitally processing a high definition television augmentation signal to reduce the amount of power and bandwidth required. The augmentation signal comprises, for example, a luminance panel signal, two chrominance panel signals, a high frequency luminance signal and a line difference signal. These signals are separately processed and separately weighted in accordance with the activity of each block. According to one aspect of the present invention, there is provided an image processing apparatus in accordance with claim 1. The present invention also provides an image processing method in accordance with claim 17. An embodiment of the present invention provides an image encoding apparatus which is highly efficient and highly excellent in quality. An embodiment of the present invention provides an image encoding apparatus which is simple. An embodiment of the present invention provides an image encoding apparatus which is suitable to process the luminance data and the chrominance data in parallel. Embodiments of the present invention will now be described by way of example with reference to the accompanying drawings, in which: Fig. 1 is a block diagram of an embodiment of the present invention; Fig. 2 is a block diagram for calculating an image area separation parameter and quantization factors from pre-scan data; In the following embodiments of the present invention, even when an image comprises a mixture of a natural image area, a color character image area and a CG image area, these areas are separated from one another and encoded in respective adaptive manners to prevent deterioration of the color character image, especially eliminate differences in deterioration between different colors, for improving quality of the natural image, the color character image and the CG image. More specifically, input image data is separated in units of image areas such as a natural image area and a color character image area. A quantization factor and a quantization table dedicated for natural image are assigned to the natural image area. For the color character image area, any suitable one of several quantization factors can be selected depending on magnitude of an absolute value of the DCT coefficient, and a quantization table dedicated for character can be selected. This arrangement makes it possible to prevent deterioration of color characters in an image comprising a natural image area, a color character area, etc. in a mixed pattern, particularly, deterioration in image quality such as differences in deterioration of characters between different colors. The quantization factors and the image area separation parameter are determined by, for example, pre-scanning an image, making a frequency analysis, and calculating values suitable for each image to be processed. Fig. 1 shows an embodiment of the present invention. Image data of RGB inputted from an image scanner comprising CCDs or a host computer is converted in a color conversion unit 1 with the following linear matrix conversion formula; into image data of YUV. Y represents an luminance component and U, V represent chrominance components. Considering the fact that human eyes are more sensitive to the luminance component (Y) than to the chrominance components (U, V), the components U, V are sub-sampled in a sub sampling unit 2 for conversion into data with ratio of Y : U : V = 4 : 1 : 1 or 4 : 2 : 2. Then, the components Y, U, V are each subjected in a DCT unit 3 to frequency conversion in units of 8 x 8 pixel blocks. Thus-converted coefficients are called DCT coefficients. An image area separation unit 6 judges whether each 8 x 8 pixel block belongs to a natural image block or a character image block depending on frequency characteristics of three different DCT coefficients for Y, U, V. If it is judged as a natural image block, then a mode 0 is selected by a mode changeover switch 7 using a 2-bit select signal. If it is judged as a character image block, then to which one of modes 1, 2 and 3 the block belongs is judged depending on the magnitude of an absolute value of the DCT coefficients and the judged mode is selected in a like manner. In the mode 0, a quantization factor 8 for natural image and a quantization table 12 for natural image are used. In the modes 1, 2 and 3, a quantization factor (large) 9 for character, a quantization factor (medium) 10 for character and a quantization factor (small) 11 for character are used, respectively, along with a quantization table 13 for character. More specifically, by way of example, the image area separation unit determines the sum S of absolute values of AC components of the spatial frequency conversion coefficients, except DC components, within the block for each of the components Y, U, V, and compares the magnitude of the sum S with threshold values A, B, C (where A < B < C). It then sets the mode 0 if S < A, the mode 1 if A ≦ S < B, the mode 2 if B ≦ S < C, and the mode 3 if C ≦ S. In a quantization unit 4, the components Y, U, V are each quantized per 8 x 8 pixel block by using the quantization factor and the quantization table which correspond to the mode selected by the mode changeover switch 7. At this time, the 2-bit select signal indicating the mode used is encoded in an encode unit 14 into compressed mode data, followed by transmission to the decode side. The mode data is encoded by, for example, entropy encoding such as Modified Huffman (MH), Modified Read (MR) or Modified Modified Read (MMR) encoding. As a result, the quantization factor and the quantization table suitable for each of the natural image area and the character image area can be set. For the character image area, in particular, any suitable one of three different quantization factors can be selected depending on the magnitude of an absolute value of the DCT coefficients; i.e., the larger quantization factor is used for the block having the larger absolute value of the DCT coefficients and the smaller quantization factor is used for the block having the smaller absolute value of the DCT coefficients. By so setting, differences in deterioration of characters between different colors can be prevented. In a Huffman encode unit 5, the quantization coefficients quantized by the quantization unit 4 are subjected to Huffman encoding. Additionally, the quantization factor 8 for natural image, the quantization factor (large) 9 for character, the quantization factor (medium) 10 for character, the quantization factor (small) 11 for character, the quantization table 12 for natural image, and the quantization table 13 for character are transmitted to the decode side or stored beforehand in a RAM, ROM, etc. in the decode side. The compressed data may be expanded in an exactly reversed flow to the above one of signals by omitting the image area separation unit 6. However, the Huffman encode unit 5, the quantization unit 4, the DCT unit 3 and the encode unit 14 are replaced with a Huffman decode unit, a reverse quantization unit, a reverse DCT unit and a decode unit, respectively. The sub sampling unit 2 is required to convert the components in such a manner that with the sub sampling ratio being of 4 : 1 : 1, for example, Y1, Y2, Y3, Y4, Ul, V1,... become Y1, Y2, Y3, Y4, U1, U1, U1, U1, V1, V1, V1, V1,..., or that with the sub sampling ratio being of 4 : 2 : 2, for example, Y1, Y2, U1, V1,... become Y1, Y2, U1, U1, V1, V1,... The color conversion unit 1 is only required to perform reverse conversion of the above formula (1.0). The quantization factor 8 for natural image, the quantization factor (large) 9 for character, the quantization factor (medium) 10 for character, the quantization factor (small) 11 for character, the quantization table 12 for natural image, and the quantization table 13 for character can be used by being transmitted from the compression side. The reverse quantization is performed in the mode selected by the mode changeover switch 7 in response to the select signal obtained by decoding the mode data in the decode unit. As explained above, by separating an image into different types of image areas and selecting the quantization factor and the quantization table adaptively for each image area, the present invention is effective to prevent deterioration of a color character image and a CG image, particularly, differences in deterioration of color characters between different colors. While only two kinds of quantization factors for natural image and character are referred in the above embodiment, another quantization factor and quantization table for CG image may be added. Also, while only three kinds of quantization factors for character, i.e., large, medium and small, are employed in the above, the number of quantization factors for character may be four, five or more. Further, although the select signal is encoded in the encode unit 14, it may be directly transmitted as the mode data to the expansion side without being encoded. In the above embodiment, the quantization factors, the quantization tables and the image area separation unit 6 are prepared as having default values. However, since their optimum parameters are different per image, optimum values may be calculated by employing a system shown in a block diagram of Fig. 2 for use in the above apparatus. Fig. 2 will be explained below. Image data obtained by pre-scan is subjected to frequency conversion through the same color conversion unit 1, sub sampling unit 2 and DCT unit 3 as those in Fig. 1. The resultant DCT coefficients are analyzed by a frequency characteristic analysis unit 15, and the analyzed results are inputted to both an image area separation parameter calculation unit 16 and a quantization factor calculation unit 17 where an image area separation parameter, a quantization factor for natural image, and quantization factors (large, medium, small) for character are calculated. Here, the term "image area separation parameter" means a parameter necessary for separation into image areas. The encoded data are stored in a memory and then transmitted via a public line or decoded for display on a monitor to obtain a hard copy by a laser printer or a bubble jet printer (using a head disclosed in U.S. Patent No. 4,723,129).

Claims: An image processing apparatus comprising: means (1) for inputting a plurality of colour component data representing a colour image, the colour component data comprising luminance data and chrominance data; discriminating means (6) for discriminating a colour image characteristic of the colour image represented by the colour component data on the basis of the luminance data; first quantizing means (4) for quantizing the luminance data; second quantizing means (4) for quantizing the chrominance data; and control means (7) for controlling the first and second quantizing means (4) in accordance with the colour image characteristic discriminated by the discriminating means (6), characterised in that the discriminating means (6) is adapted to discriminate said colour image characteristic of the colour image on the basis of each of the colour component data. An apparatus according to claim 1, wherein the discriminating means (6) is arranged to discriminate the colour image characteristic by using a spatial frequency characteristic of the colour image represented by the colour component data. An apparatus according to claim 1, comprising means (3) for subjecting the colour component data to spatial frequency conversion to generate spatial frequency conversion coefficients of the plurality of colour component data. An apparatus according to claim 3, wherein the spatial frequency conversion means (3) is adapted to carry out a discrete cosine transform to obtain the spatial frequency conversion coefficients from the colour component data. An apparatus according to claim 3 or 4, wherein the discriminating means (6) is arranged to discriminate the colour image characteristic by using AC components of the spatial frequency conversion coefficients of the plurality of colour component data. An apparatus according to claim 5, wherein the discriminating means comprises means for summing the absolute values of AC components of the spatial frequency conversion coefficients for each of the plurality of colour component data and means for comparing the magnitude of the sum with a threshold value to determine the colour image characteristics. An apparatus according to claim 6, wherein the discriminating means is arranged to discriminate that the colour component data represents a natural image when the magnitude of the sum is less than a threshold value and to discriminate that the colour component data represents a character image when the sum is greater than or equal to a threshold value. An apparatus according to claim 7, wherein the discriminating means is arranged to discriminate between colour component data representing a character image having a sum less than a second threshold higher than the first threshold, colour component data representing a character image having a sum greater than or equal to the second threshold and less than a third threshold higher than the second threshold and colour component data representing a character image having a sum greater than or equal to the third threshold value. An apparatus according to any one of claims 6 to 8, wherein the first and second quantizing means comprise a plurality of quantization tables and the control means is arranged to select a quantization table and/or a quantization factor in accordance with the comparison of the magnitude of the sum of the absolute values of the AC components with the or each threshold value. An apparatus according to claims 1 to 5, wherein said first and second quantizing means (4) are arranged to quantize the luminance data and chrominance data by using a plurality of quantization tables, each of which has a different characteristic. An apparatus according to claim 10, wherein the plurality of quantization tables include a table for a natural image and a table for a character image. An apparatus according to claim 10 or 11, further comprising modifying means (8-11) for modifying the quantization table by using a quantization factor. An apparatus according to any one of the preceding claims, further comprising sub-sampling means (2) for sampling the colour component data with a predetermined ratio. An apparatus according to any one of the preceding claims, further comprising first encoding means (5) for encoding the luminance data and chrominance data quantized by said first and second quantizing means. An apparatus according to claim 14, wherein said first encoding means is arranged to perform a Huffman encoding. An apparatus according to claims 14 or 15, further comprising second encoding means (14) for encoding the discrimination result of said discriminating means. An apparatus according to any one of claims 1 to 15, further comprising transmitting means (20) for transmitting the luminance data and the chrominance data. An image processing method comprising: providing a plurality of colour component data representing a colour image, the colour component data comprising luminance data and chrominance data; discriminating a colour image characteristic of a colour image represented by the colour component data on the basis of the luminance data; quantizing the luminance data; quantizing the chrominance data; and controlling the quantizing of the luminance and chrominance data in accordance with the discriminated colour image characteristic, characterised by discriminating said colour image characteristic of the colour image on the basis of each of the plurality of colour component data.

Inventors: SAITO KAZUHIRO, SAITO, KAZUHIRO, Saito, Kazuhiro, c/o Canon Kabushiki Kaisha
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: H04N1
IPC codes: G06T1, H04N1, G06T9, H04N7, H04N11