Image processing method and apparatus

Abstract: In a color facsimile apparatus, a color image file, or the like, an encoding system suitable for a color image to be transmitted is promptly selected and the image data is transmitted. The apparatus has: the color image input unit 20 to read a color image; a plurality of color image encode units 22 and 24 including the white/black image encoding; the storage units 23 and 25 to store the encode data; the means 28 and 29 for decoding the encode data; the means 32 for displaying the decoded image; and the protocol means 27 which executes a communication protocoll to a transmission partner, thereby checking the decoding ability on the reception side.

Description: The invention relates to an image processing method and apparatus in, for instance, an image communicating apparatus, an image storing apparatus, or the like. It has been known to process colour image data by a binary data process in which colour data for each of the colours red, green, blue, cyan, magenta, yellow, white and black are handled as binary data. It has also been known to process colour image data by a multi-level data process in which 16,700,000 colours are represented by 8-bit data representing 256 gradations each of the colours red, green and blue. JP-A-63190474 discloses an image processing apparatus having, as in the preamble of claim 1 attached: input means for inputting colour image data; and colour image encoder means for encoding the input colour image data and for generating colour code data. In particular, in the apparatus of the above mentioned reference, two channels are provided, one for binary data processing and the other for multi-level data processing. The data stored in one or other channel is selected depending on the type of image represented by the input image data - e.g. either a character image or a pictorial image. The invention is made in consideration of the circumstances as mentioned above and it is an object of the invention to provide an image processing method and an apparatus which can efficiently transmit image data. To accomplish the above object, according to the invention defined by the attached claims, there is disclosed an image processing apparatus characterised by: extracting means for extracting monochrome image data from the colour image data input by said input means; monochrome image encoder means for encoding the monochrome image data and for generating monochrome code data, the encoding of said monochrome image encoder means being different from that of said colour image encoder means; storage means for storing said colour code data and said monochrome code data, said colour image data and said monochrome image data representing the same original image; and output means for selectively outputting said colour code data or said monochrome code data stored by said storage means. Although it is known to process colour image data by either or both of binary level or multi-level processing for colour transmission and reception, as aforesaid, a problem arises in a case where the receiver has only a monochrome image processing capability or else is set to perform monochrome image processing. In JP-A-61065663 the case is considered where the receiver is a printer loaded with colour film paper. When the image data transmitted is monochrome and not colour image data, it is detected that such data is unsuitable for colour printing, and transmission is interrupted. Transmission is also interrupted in a case where colour image data is transmitted from a transmitter and the receiver is loaded with monochrome film paper. In either case, wasteful consumption of film paper is avoided. However, no useful transmission can be performed in such cases. The above and other objects and features of the present invention will become apparent from the following detailed description and the appended claims with reference to the accompanying drawings of which: Figs. 1A and 1B are diagrams showing parts of an image processing apparatus embodying the present invention; Fig. 2 is a block diagram showing a binary colour image encoder unit; Fig. 3 is a block diagram of a prediction state determination circuit; Figs. 4A to 4C are diagrams showing reference pixel positions; Fig. 5 is a block diagram of a dynamic encoder; Fig. 6 is a block diagram of a prediction conversion circuit; Fig. 7 is a block diagram of an update circuit; Fig. 8 is a diagram showing encoding efficiency curves; Fig. 9 is a block diagram of an arithmetic encoder; Fig. 10 is a block diagram of a multilevel colour image encoder unit; Fig. 11 is a diagram showing the relation between the number MC of more priority symbols MPS and the index I; Fig. 12 is a diagram showing the input/output relation of an Ex-OR circuit; Fig. 13 is a table showing an index updating method; and Fig. 14 is a diagram to select an effective probability. In the preferred embodiment of the invention, which will be explained hereinbelow, it is possible to compress and transmit image data by an encoding system suitable for the image. The embodiment has first encoding means and second encoding means for encoding a colour image, wherein the colour image to be encoded is simultaneously encoded by both of the systems, thereby obtaining the encoded data. After that, the encoding system which is optimum for the encoded colour image is selected and the colour image is transmitted. After the colour image has been encoded by both of the systems, the encoding ability on the reception side is confirmed by a protocol and the proper encoded data is subsequently transmitted, so that the image can be promptly transmitted. Before the encoded data is transmitted, the user can also check the code length and select the code data to be transmitted. By decoding both of the codes on the transmission side, the degree of deterioration of the colour image can be also checked. The preferred embodiment of the invention will be described hereinbelow with reference to figures 1A and 1B. Reference numeral 20 denotes a colour image input unit. For instance, a colour image is scanned by a colour scanner and multilevel colour image signals each comprising eight bits of red (R), green (G), and blue (B) indicative of a full colour image are supplied to signal lines 101, 102, and 103, respectively. A host computer, or a video camera, for example, instead, can be used as the colour image input unit 20. Reference numerals 21, 22 and 23 denote a section to form a binary colour encoder channel. Reference numeral 21 denotes a binarisation unit to convert data or R, G, and B each consisting of eight bits into RGB data each consisting of one bit for each colour. Reference numeral 22 denotes a binary colour image encode unit to encode the binarised RGB data. The RGB signals 101, 102 and 103 supplied from the colour image input unit 20 are converted into RGB signals each consisting of one bit by the binarisation unit and, thereafter, they are compressed and encoded by the binary colour image encode unit, thereby forming a binary code bit stream 110. The code data is stored in a binary image encoded data storage unit 23 and is held until the image signal is transmitted. An auxiliary storage device, such as a hard disk, is used as the storage unit 23. The 8-bit output signals of R, G, and B colours from the colour image input unit 20 are also supplied to a multilevel colour image encode unit 24 and encoded. In the encode unit 24, they are compressed and encoded by a DCT conversion encoding in a state of the multilevel data and stored in a multilevel image encoded data storage unit 25. As mentioned above, both of the binary image code data and the multilevel image code data are simultaneously formed from the same colour image by the two kinds of encoder units 22 and 24. When the image is transmitted, either one of the two kinds of code data is selected. In the embodiment, from the encoded data stored in the binary image code data storage unit 23 and the multilevel image data storage unit 25, colour images are reconstructed by a binary colour image decoder unit 28 and a multilevel colour image decode unit 29, respectively. By displaying the decoded images on a display 31 by a control unit 30, the picture quality of the image, which is to be transmitted, can be known. At the same time, a communications control unit 27 executes a communication protocol to a transmission partner, thereby checking the decoding ability of the reception side. When the reception side has an ability enough to decode any of the binary image code data and the multilevel image code data, the operator can select and transmit either one of the images by an operation unit 32. When the reception side has a decoding ability of only either one of them, the image to be transmitted is indicated to the operator and, after that, it is sent from a communication processing unit 31 to a digital line (not shown) such as an ISDN or the like. The protocol is based on the well-known G4 protocol. As the processing method which is used in the binarisation unit 21, any one of the simple binarisation, dither process, and error diffusion process can be selected. Since those binarising processes are well known, their descriptions are omitted here. Fig. 2 is a block diagram of the binary colour image encode unit 22. An R signal 104, a G signal 105, and a B signal 106 as binarised outputs from the binarisation unit 21 (Fig.1) are supplied to a prediction state determination circuit 50. The prediction state determination circuit 50 generates a prediction state signal S116 comprising peripheral encoded pixels around a target pixel and also generates a 1-bit pixel signal X117 synchronised with the prediction state signal S116. Those two signals S116 and X117 are encoded in a dynamic arithmetic encode unit 51, so that the binary image code data 110 is generated. Fig. 3 is a block diagram of the prediction state determination circuit 50. Figs. 4A to 4C show pixel positions of respective colours which are referred for state prediction. That is, Fig. 4A shows the reference pixels of the first colour (R in the embodiment) to be encoded. Seven peripheral encoded pixels around the encode pixel indicated by "*" are referred to. Fig. 4B shows the reference pixels of the second colour (G in the embodiment) for encoding. Eight pixels comprising the seven pixels similar to those shown in Fig. 4A and the pixel at the same position as that of the first colour are referred to. Fig. 4C shows the reference pixels of the third colour (B in the embodiment). Nine pixels comprising the seven pixels similar to those shown in Fig. 4A and the pixels at the same positions as those of the first and second colours are referred to. In the construction shown in fig. 3, a state of each colour is determined by referring to a plurality of pixels located at the reference pixel positions of each colour shown in Figs. 4A to 4C. The operation of Fig. 3 will now be described hereinbelow. The binarised image signals 104, 105 and 106 of R, G and B each consisting of one bit are supplied to latches 67 to 69 and to line memories 61 to 63. The R, G and B data delayed by one line are held by the line memories 61 to 63. The data delayed every one pixel clock are held in latches 67a to 67h, 68a to 68h, and 69a to 69h, respectively. In the latch group 67, the data of the pixels on the preceding line of the encode line can be referred by the outputs in the latches 67a to 67d into which the outputs of the line memory 61 are supplied and by the output of the line memory 61. On the other hand, the two encoded pixels on the encode line can be referred by the outputs in the latches 67g and 67h. The data of those seven pixels assumes a reference pixel signal 210 for determination of the state of R as a first colour for encoding. Data 211 of R of the encode pixel is generated from the latch 67f in order to determine states of the other colours G and B. The latch groups 68 and 69 having substantially the same construction as the latch group 67 are provided for data G105 and B106. Data of seven pixels similar to that of the latch group 67 are generated as reference pixel signals 212 and 214 from the latch groups 68 and 69, respectively. Data 213 of G of the encode pixels is generated from the latch 68f in the latch group 68 in order to determine a state of B. A selector 64 switches the reference pixel signals in accordance with a colour indication signal 219 of two bits indicative of the color corresponding to the output of each colour data of R, G, and B. That is, when the colour indication signal 219 indicates R, the reference pixel signal 210 and a zero signal of two bits are selected. When the signal 219 indicates G, the reference pixel signal 212, R signal 211, and zero signal of one bit are selected. In the case of B, the reference pixel signal 214, R signal 211, and G signal 213 are selected. A selection signal 215 of nine bits and the colour indication signal 219 of two bits are combined to a signal of eleven bits by a packing circuit 65 and becomes the prediction state signal S116. Therefore, a state signal S 1 indicates the colour of the pixel to be encoded and the peripheral state and shows 2 7 states, 2 8 states, and 2 9 states for the colours R, G, and B, respectively. The pixel signals which are synchronized with the prediction states of the respective colours R, G, and B and which should be encoded are generated from R211, B213, and G216 and are selected by the selector 64 in accordance with the colour indication signal 219, so that the pixel signal X117 is generated. Fig. 5 is a block diagram of the dynamic arithmetic encoder unit 51 shown in Fig. 2. Prior to explaining Fig. 5, the arithmetic signal used in the embodiment will now be described. As is well known hitherto, an arithmetic code is based on a method whereby a code is formed by an arithmetic operation in a manner such that an input signal train becomes a code which is expressed by decimal binary number. Such a method is proposed in the literature by Langdon, Rissanen, et. al., "Compression of Black/White Images with Arithmetic Coding", IEEE Transaction Com. COM-29, 6, June, 1981, or the like. According to such a literature, when it is not assumed that the encoded input signal train is set to S and a probability of the appearance of a less priority symbol (LPS) is set to q and an operation register Augend is set to A(S) and a code register is set to C(S), the following arithmetic operations are executed for every input signal. A(S1) = A(S) x q ≃ A(S) x 2 -Q A(S0) = <A( S) - A(S1)> 1 where < > 1 denotes that the effective digit of one bit is truncated. C(S0) = C(S) C(S1) = C(S) + A(S0) In the case where the encoded data indicates a more priority symbol (MPS: 0 in the above example), A(S 0 ) and C(S 0 ) are used to encode the next data. In the case of the less priority symbol (LPS: 1 in the above example), A(S 1 ) and C(S 1 ) are used to encode the next data. The value of new A is increased by 2 S times (S is an integer of 0 or more) and is set to a value within a range of 0.5 ≦ A < 1.0. The above process corresponds to that the arithmetic register A is shifted S times in the hardware. The code register C is also shifted by the same number of times and the shifted-out signal becomes the code. The code is formed by repeating the above processes. On the other hand, by approximating an appearance probability q of LPS by the power of 2 (2 -Q : Q is a positive integer) as shown in the equation (1), the multiplying calculation is replaced to the shift arithmetic operation. To further preferably approximate, q is approximated by the polynomial of the power of 2 as shown in, for instance, the equation (5). An efficiency worst point is improved by such approximation. q ≃ 2 -Q1 + 2 -Q2 As for the arithmetic code, since the value of Q can be switched every encode data, a probability presuming section can be separated from the encoding. The embodiment uses a dynamic method whereby a probability is presumed while encoding as mentioned above. A block diagram of the dynamic arithmetic encode unit of Fig. 5 to perform the foregoing arithmetic encoding will now be described. The state signal S116 from the packing circuit 65 shown in Fig. 3 is supplied to a counter memory 73 and an encode condition memory 74. A more priority symbol MPS 308 as a symbol which can easily appear and an index I307 indicative of the encode condition including an appearance probability of the LPS of the arithmetic code, which will be explained hereinlater, are stored in the encode condition memory 74 every state which is expressed by the state signal S116. The MPS 308 read out from the memory 74 in accordance with the color and state of the image to be encoded is supplied to a prediction conversion circuit 77. The prediction conversion circuit 77 forms a YN signal 301 which is set to 0 when the serial pixel signal X117 from the selector 64 shown in Fig. 3 coincides with the MPS 308. The YN signal 301 is supplied to an update circuit 75. The update circuit 75 increases a count value in a corresponding state among the count values stored in the counter memory 73 when the YN signal is equal to 0. When a count value C306 stored in the counter memory 73 coincides with a set value MC305 from a count table ROM 72, the count value is updated in such a direction as to increase the index I307 (direction as to decrease the appearance probability q of the LPS) (in this case, the MPS is not inverted). The count table ROM 72 supplies the number MC305 of MPSs shown in Fig. 11 which has been predetermined in correspondence to an index I representing the appearance probability q of the LPS to he update circuit 75. The update circuit 75 updates the count value in such a direction as to reduce the index I307 (direction as to increase the appearance probability q of the LPS) when the MPS 308 and the pixel signal X117 are different, that is, when the YN signal from the prediction conversion circuit 77 is equal to 1. When the YN signal whose value is equal to 1 is given in the case where the index is equal to 1, a process to invert the MPS (0 → 1 or 1 → 0) is executed. Outputs I' 309 and MPS' 310 of the update circuit 75 denote the values of the index after updating and are again stored into the encode condition memory 74. An encode parameter determination circuit 76 sets an encode parameter Q311 of the arithmetic code into an arithmetic encoder 78 on the basis of the value of the index I307. The arithmetic encoder 78 arithmetically encodes the YN signal 301 from the prediction conversion circuit 77 by using the parameter Q311, thereby obtaining a code 302. A static encoding can be easily realized by a method whereby an initial value is preliminarily given to the encode condition memory 74 and I and MPS are not updated. Fig. 6 is a block diagram of the prediction conversion circuit 77. The serial pixel signal X117 and the MPS 308 are supplied to an EX-OR circuit 79. The EX-OR circuit 79 generates the YN signal 301 which is set to 0 when the serial pixel signal X117 and the MPS 308 coincide and which is set to 1 when they differ in accordance with logic expressions of Fig. 13. Fig. 7 is a block diagram of the update circuit 75. When the YN signal 301 is equal to 0, the count value C306 from the counter memory 73 is increased by +1 by an adder 81, so that a signal C' 312 is derived. The value of the signal C' 312 is compared with the MC305 from the count table ROM 72 by a comparator 83. When the value of C' coincides with the value of MC, an update signal UPA 313 is set to 1. The YN signal 301 becomes an update signal UPB 314. The signals UPA and UPB are supplied to an index change circuit 85. The OR of UPA and UPB is calculated by an OR circuit 87. An output signal 315 of the OR circuit 87 is used as a switching signal of a selector 82. The selector 82 selects a 0 signal 319 to reset the value of the counter memory 73 when the signal 315 is equal to 1. In the other cases, the selector 82 selects the output signal C' 312 of the adder 81. The selector 82 generates the selected signal as a counter update signal C" 316 and stores into the counter memory 73. Therefore, when the serial pixel signal X117 and the MPS 308 are different and when a state in which they coincide continues a predetermined number of times, the count value of the counter memory 73 is reset. A signal d317 (d = 1 as a standard value) to control the update slice levels of the index, UPA 313, UPB 314, and present index I307 from the encode condition memory 74 are supplied to the index change circuit 85. Fig. 13 is a table showing an index updating method in the index change circuit 85 (Fig. 13 shows two cases where the update slice levels are d = 1 and d = 2). The updated index I' is determined by referring to the table on the basis of the present index I, update slice condition d, UPA, and UPB. When I = 1 and UPB = 1 (the case where the serial pixel signal X117 and the MPS 308 are different), an EX signal 318 is set. When the EX signal 318 is equal to 1, an inverter 86 inverts the symbol of the present MPS 308 (0 → 1 or 1 → 0), thereby obtaining the update MPS' 310. When the EX signal is equal to 0, the MPS' is not changed. The updated I' 309 and the MPS' 310 are stored into the encode condition memory 74 and are used as an index I and an MPS for the next process. The updating method shown in Fig. 13 can be also constructed by a table using an ROM or the like or can be also realized by a logic construction using adders and subtracters. As mentioned above, when the MPSs of the number which is equal to a predetermined number of MPSs according to the value of the index I representing the appearance probability q of the LPS which has been approximated by the polynomial of the power of 2 are generated, the value of d is added to the value of index I, thereby reducing the appearance probability q of the LPS which is used in the arithmetic code. On the other hand, when LPSs are generated, d is subtracted from the index 1, thereby increasing the appearance probability q of LPS which is used in the arithmetic code. Further, when LPSs are generated in a state showing that the appearance probability q of LPS is equal to 0.5 (state in which the index I is equal to 1), the MPS is inverted. As mentioned above, by updating the index I and the MPS adaptively to the input image, the arithmetic encoding of a high encoding efficiency can be accomplished. Fig. 8 shows encoding efficiency curves of the arithmetic code which is used in the embodiment. The value of index I is shown by a small letter i hereinbelow. The curves are expressed by the equation (6) when it is assumed that the appearance probability of LPS is set to q and an approximate probability upon encoding is set to q ei . The indices I of 1, 2, 3, ... are sequentially given to the values of the appearance probabilities q of LPS in accordance with the order from the larger value to the smaller value. η = -qlog 2 q-(1-q)log 2 (1-q) -qlog 2 q ei -(1-q)log 2 (1-q ei ) In the equation (6), the numerator denotes an entropy and q ei is set to a value shown by the equation (7). q ei = q 1 + q 2 The values of q 1 and q 2 correspond to the values of the polynomial approximation of the power of 2 and are given by Table 4 as shown in, for example, (8) to (10). q e1 ' = 2 -1 q e2 ' = 2 -1 - 2 -4 q e3 ' = 2 -2 + 2 -3 In the above probabilities, q ei at a peak point at which an efficiency η is set to 1.0 is hereinafter called an effective probability. An intersection point of the efficiency curves is called a boundary probability q bi . It will be obviously understood that the efficiency is improved by a method of encoding by using the adjacent effective probabilities around the boundary probability as a center. In the embodiment, as shown in the equation (5), the effective probability q ei shown in Fig. 14 is selected from the probabilities which can be approximated by two terms. Q 1 , Q 2 , and Q 3 of Fig. 15 are parameters Qc 311 which are sent to the arithmetic encoder 78. That is, Q 1 and Q 2 denote shift amounts which are given to the shift register. The power of 2 is calculated by the shift operations. Q 3 indicates a coefficient of the second term and the switching between + and - is executed. The values of MC in Table 1 are determined in the following manner. That is, when the number of LPSs assumes N L and the number of MPSs assumes N M , the generation probability of LPS is given by the equation (11). q = N L N M +N L By solving the equation (11) with respect to N M , the equation (12) is derived. N M = N L (1/q-1) |x| denotes a process to raise the figures below decimal to a unit. By giving q bi shown in Fig. 10 to q in the equation (12), the number N Mi of more priority symbols (MPS) is calculated. Therefore, MC is calculated from the equation (13). MCi = N Mi+1 - N Mi The values of MC in Fig. 11 are obtained by calculating the equations (11), (12), and (13) by assuming that N L = 2. As mentioned above, the number N Mi of more priority symbols MPS corresponding to each index I is obtained on the basis of each boundary probability q bi as shown in Fig. 8. A difference between the numbers N M of more priority symbols of the adjacent indices is set to MC for each index I. The value of MC is compared with the number of more priority symbols MPS generated as mentioned above. When they coincide, such a state is determined to be a state in which the encoding using the adjacent index I is suitable, so that the index I is changed. Consequently, the index I is changed at a proper timing on the basis of the number of more priority symbols MPS generated and the encoding using the optimum index I can be adaptively accomplished. Fig. 9 is a block diagram of the arithmetic encoder 78. In the control signal Q311 (Fig. 14 ) determined by the encode parameter determination circuit 76, Q 1 is supplied to a shift register A 90, Q 2 is supplied to a shift register B 91, and Q 3 is supplied to a selector 92. Q 1 and Q 2 indicate by which number of bits an Augend signal As 323 is shifted to the right for the shift registers A and B. The results of the shift are generated as output signals 330 and 331. A complementary number of the signal 331 is obtained by an inverter 96. The selector 92 selects either the signal 331 or an output signal of the inverter 96 in accordance with a control signal Q 3 , so that an output signal 332 is derived. An adder 93 adds the signal 330 from the shift register A 90 and the signal 332 from the selector 92 and generates an A S1 signal 324. A subtracter 94 subtracts the A S1 signal 324 from the As signal 323, thereby obtaining an A S0 signal 325. A selector 95 selects either the A S0 signal 325 or the A S1 signal 324 by the YN signal 301. That is, the A S0 signal is selected when the YN signal is equal to 1. The A S1 signal is selected when the YN signal is equal to 0. Thus, the selected signal is generated as an A' signal 326. A shift circuit 89 executes a process to shift to the left until the MSB of the A' signal is equal to 1. An AS' signal 327 is derived by the shifting process. The shift signal 332 corresponding to the number of shifting processes is supplied to a code register 99. The bits of the number corresponding to the number of shifting processes are sequentially generated from the code register 99 in accordance with the order from the MSB, so that the code data 330 is derived. The code data 330 is processed by a bit processing method (not shown) in a manner such that the number of continuous bits 1 is set to a finite value. A content CR 328 of the code register 99 is added to the A S0 signal 325 by an adder 97 and a resultant data is supplied to a selector 98. The signal Cr 328 to which the A S0 signal 325 is not added is also supplied to the selector 98. From the selector 98, a CR' signal 329 is generated. The CR' signal 329 is set to CR when the YN signal 301 is equal to 1 and is set to CR + A S0 when the YN signal is equal to 0. The foregoing shifting process regarding the code register 99 is also executed for the CR' signal. The binary RGB colour encode data (code data 330 shown in Fig. 9) produced as mentioned above is stored into the binary image encoded data storage unit 23 through a data line 110 shown in Fig. 1A. Fig. 10 is a block diagram of the conversion unit 10 and the multilevel colour image encoder unit 24 shown in Fig. 1A. The gradation data 101, 102 and 103 of RGB each consisting of eight bits which are supplied from the colour image input unit 20 in Fig. 1A are converted into YUV signals by the luminance/chrominance conversion unit 10 by the following conversion equations: EY = 0.299*(R/255) + 0.587*(G/255) + 0.114*(B/255) EU = 0.713*(R/255 - EY) EV = 0.564*(B/255 - EY) Y = 219*EY + 16 U = 224*U + 128 V = 224*V + 128 (R, G, B: integers of 0 to 255, EY, EU, EV: standardized real number values of 0 to 1) The YUV signals are subjected to a two-dimensional discrete cosine transformation in a DCT circuit 11 and separated every spatial frequency component. The spatial frequency components are called DCT conversion coefficients. A converting equation of the discrete cosine transformation is shown below. cos(2i+1)uπ/16·cos(2j+1)vπ/16 A linear quantization is executed by a quantization every coefficient. In the quantization, different steps are executed every coefficient, thereby providing quantizing characteristics such that the low frequency side is fine and the high frequency side is coarse. The RGB data are subsequently divided into the DC component and the AC component by a Huffman encoder unit 13 and respective Huffman codes are allocated. A difference between the DC component and the DC component of the preceding block is calculated and a Huffman code is given for a differential value. As for the AC component, a Huffman code is allocated to the coefficient values of zero-run and non-zero of the coefficient of the AC component which has been zigzag scanned. After all of the coefficient values in the block have been completely transmitted, EOB (End of Block) is allocated to the last of the block data. The code data is stored in the multilevel image encoded data storage unit 25 through a data line 111 in Fig. 1A. As shown in Fig. lB, the colour image is read by the colour image input unit and is simultaneously encoded by three kinds of encoding systems. The encoded three kinds of data are stored in respective data storage units, and the optimum image data is selected. Two of the three encoding systems are the binary colour image encoding system and the multilevel colour image encoding system already described with reference to Fig. 1A. For instance, a black/white binary monochrome image encoding system is considered as the third encoding system. After the input colour image data RGB have been converted into the YUV data by the luminance/chrominance conversion unit 10 (having the same function as that of the conversion unit in Fig. 10), only the luminance Y data is binarised by a binarisation unit 37, thereby producing black/white binary image data. The black/white binary monochrome image data is encoded by a binary monochrome image encoder unit 38. The encoded data is stored in a binary monochrome image encoded data storage unit 39. Thus, the optimum image to be transmitted as mentioned above can be selected, as a binary monochrome image encoding system, an MH system, an MR system, or the like which is generally widely used can be used. On the other hand, the dynamic arithmetic encoding in the embodiment can be applied to a single colour (monochromatic colour; black/white). That is, it is sufficient to apply the circuit of R described in Fig. 3 to the black/white binary value. The monochrome binary encoding system is selected, for instance, in the case where the reception side has only an MH or MR decoding ability or the case of a black/white document or the like. As described above, colour image data is simultaneously encoded by a plurality of different encoding systems and temporarily stored in a storage device such as a disk or the like. Before the image is transmitted, each of the encoded data is decoded and checked by reference to a display or the like, so that the encoding system which is optimum for the input colour image can be promptly selected and the decoded colour or microchrome image data can be transmitted. On the other hand, the optimum encoding system also can be selected by confirming each encode data length before transmission. Further, in the case where the reception side as a partner side has a decoding ability of only one encoding system, the appropriate image data can be soon transmitted after confirmation of a protocol, so that there is no need to again encode. According to the embodiment of the invention, therefore, input colour image data can be promptly compressed and transmitted by the encoding system which is optimum for the image to be transmitted. The present invention is not limited to the foregoing preferred embodiment but other modifications and variations are possible within the scope of the appended claims of the invention.

Claims: An image processing apparatus comprising: input means (20) for inputting colour image data; and colour image encoder means (22,24) for encoding the input colour image data and for generating colour code data; characterised by: extracting means (10) for extracting monochrome image data (Y) from the colour image data input by said input means; monochrome image encoder means (38) for encoding the monochrome image data and for generating monochrome code data, the encoding of said monochrome image encoder means being different from that of said colour image encoder means; storage means (23,25,39) for storing said colour code data and said monochrome code data, said colour image data and said monochrome image data representing the same original image; and output means (26,31) for selectively outputting said colour code data or said monochrome code data stored by said storage means (23,25,39). An apparatus according to claim 1, wherein it is arranged that the encoding by said colour image encoder means (22,24) and the encoding by said monochrome image encoder means (38) are executed in parallel. An apparatus according to claim 1, further comprising: colour image decoder means (28,29) for decoding the colour code data generated by said colour image encoder means (23,24); and monochrome image decoder means (-) for decoding the monochrome code data generated by said monochrome image encoder means (38). An apparatus according to claim 3, further comprising display means (32) for displaying an image which is represented by the colour code data decoded by said colour image decoder means (28,29), and an image which is represented by the monochrome code data decoded by said monochrome image decoder means (-). An apparatus according to claim 1, wherein the code data output by said output means (26,31) is selectable in accordance with the code data decoding capability of a reception-side device to which the code data is transmitted. An apparatus according to claim 5, having means of confirming the code data decoding capability of the reception-side device by a protocol exchange with the reception-side device. An apparatus according to claim 1, wherein the encoding by said colour image encoder means (24) is an encoding using a discrete cosine transform (DCT). An apparatus according to claim 1, wherein the encoding by said monochrome image encoder means (38) is an entropy encoding. An apparatus according to claim 1, wherein said colour image encoder means (22,24) is capable of performing an encoding for a binary colour image and an encoding for a multi-level colour image. An image processing method comprising: an input step (20) of inputting colour image data; and a colour image encoding step (22,24) of encoding the colour input image data and of generating colour code data; characterised by: an extracting step (10) of extracting monochrome image data (Y) from the colour image data input in said input step; a monochrome image encoding step (38) of encoding the monochrome image data and of generating monochrome code data, an encoding system in said monochrome image encode step being different from that in said colour image encode step; a storage step (23,25,39) of storing said colour code data and said monochrome code data, said colour image data and said monochrome image data representing the same original image; and an outputting step (26,31) of selectively outputting said colour code data or said monochrome code data stored in said storage step.

Inventors: YOSHIDA TADASHI, YOSHIDA, TADASHI, YOSHIDA, TADASHI, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: H04N1
IPC codes: H03M7, H04N1, G06T9, G09G3