TWO DIMENSIONAL CODING APPARATUS

Abstract: A two dimensional coding apparatus in use with a facsimile for two dimensionally coding an image signal, comprises an image memory (10) for storing an image signal and a two dimensional coder (12) for the modified READ coding the image signal in the image memory (10) for each block having a predetermined number of scanning lines. A code signal output from the two dimensional coder (12) is transmitted to a decoder (18) through a transmission line (14). When a transmission error code is detected by a decoder (22), the code signal of that block containing the error is retransmitted. A K factor generator (16) selects the block size (K factor) of the two dimensional coder (12) to be optimum according to an error rate, so as to minimize a bit length of the whole transmitted code signals including the retransmitted code signal.

Description: The present invention relates to an apparatus for two dimensionally coding an image signal. In an image signal processing system, such as a facsimile and an image signal filing system using an optical disc, a picture is dissolved into a great number of picture elements. These picture elements are sorted into black and white ones to obtain a binary image signal. To reduce an amount of the image signal to be processed, the binary image signal is subjected to the coding for reducing a redundancy of the image signal. The redundancy reduction coding is based on the nature of the picture that has a correlation. A typical example of the coding is a modified READ coding system, which has been employed in a so-called high speed facsimile of Group III Standard. This coding system is a two dimensional successive coding system constructed on the basis of the correlations in both vertical and horizontal directions of a picture. Specifically, in this coding system, the coding is based on positions of picture elements where their density (black or white) change. In other words, what is coded is not the picture elements per se, but such position data of the picture elements. In the image signal processing system based on the modified READ coding, if there is an error in a code signal, during its transmission, the influence by the transmission error is successively propagated to the successive scanning lines (horizontal scanning lines). To stop the propagation of the transmission error, the two dimensional coding operation is ceased at every K scanning line, and the one dimensional coding (modified Huffman coding) is executed in place of the former coding. The interval between the executions of the modified Huffman coding is defined as a K factor. The K factor is a parameter which must be selected by a designer in the modified READ coding. The modified Huffman coding system is a specific form of the modified READ system, viz., the modified READ system when K = 1. Therefore, as the K factor is large, a coding rate (a ratio of the number of bits of an image signal to that of a code signal) is higher in the two dimensional coding system. Actually, the transmission line inevitably contains a predetermined error rate. Therefore, as a coding block (K scanning line) is larger, the code error contained in the code signals of one block transmitted is larger. In Group III Standard, when the code error is detected, the code signal with the code error is not retransmitted. For this reason, in the modified READ system employed in the facsimile of Group III Standard, there is a limit in increasing the K factor when the code error caused during the transmission is considered. At present, the K factor is fixed at 2 in a standard resolution mode, and at 4 in a high resolution mode. Also, when the code signal with the code error is retransmitted, the K factor cannot be made large for the following reason. Generally, the retransmission is performed at every block. Then, when the K factor is too large, even if the code error is small, the number of bits of the code signal to be retransmitted is large, resulting in reduction of a virtual coding rate. The term "virtual coding rate" means a ratio of the number of bits of an image signal to that of the whole transmitted code signals including the retransmitted signals and is called "reduction rate" in this specification. As described above, in the conventional two dimensional coding system, the K factor is fixed at a small value, depending on an error rate of the transmission line and/or the type of a transmission system. In the recent communication cable which has been diversed and complicated, it is impossible to make the redundancy reduction rate large with such a small fixed value K factor. Similar problems with the facsimile are also true for the image signal processing system such as the image signal filing system. That is, in the image signal filing system, if the code error by the transmission is replaced by the writing error at the time of data writing to an optical disc, the image signal filing system has the problems as those in the facsimile. Prior art document "Review of the electrical Communication Laboratories," vol. 28, no 1/2, January/ February 1980, pages 115-130, Tokyo, SP; K. Kobayaski et al: "High-speed digital facsimile equipment development," discloses an apparatus in which a CCD image sensor is applied for a transmitter, and electrostatic recording using a printed multi-stylus electrode is introduced for a receiver. The coder and decoder are composed of a microprocessor and so made as to enable easy modification by sofware revision, if necessary. In this apparatus, block size is selected according to an error rate of data transmission. Further, prior art document "Patent Abstracts of Japan", vol. 5, no 197 (E-86) [869], December 15, 1981 (JP-A-56 116 362), describes an error retransmission data system in which a brides signal read in at a read-in section is made into compression coding data removed with redundancy at a coder, and one original's share video signal is stored in a memory section as a plurality of blocks in the unit of fixed length. This blocked data is added with control codes such as synchronizing code, block number and error check code to make transmission in the frame constitution. Decoding is made at a high speed MODEM5, and coding data is stored in the memory section as a plurality of blocks. In this case, the error of each block is checked, and if any error takes place, the number of the block is stored in a block number memory. After the end of the transmission of the entire data, the number is fed to the transmission side, and the coded data for the number only is retransmitted. It is an object of the present invention to provide a two dimensional coding apparatus in use for an image signal processing system such as a facsimile and an image signal filing system, which apparatus can effectively reduce and code the image signal so as to minimize an amount of data to be processed. To solve this object the present invention provides a two dimensional coding apparatus as stated in claim 1. This invention can be more fully understood from the following detailed description when taken in conjunction with the accompanying drawings, in which: Fig. 1 is a block diagram of an embodiment of a two dimensional coding apparatus according to the present invention, when the apparatus is applied for a facsimile; Fig. 2 shows a graph illustrating a relationship of K factor vs. redundancy reduction rate in the embodiment of Fig. 1; Fig. 3 shows a graph illustrating K factor vs. error rate in the Fig. 1 embodiment; and Fig. 4 is a block diagram of a second embodiment of a two dimensional coding apparatus according to the present invention, in which the apparatus is applied for an image signal filing system. Preferred embodiments of a two dimensional coding apparatus according to the present invention will be described referring to the accompanying drawings. In a first embodiment, a two dimensional coding apparatus according to the present invention is applied for a facsimile. Fig. 1 shows a block diagram of the first embodiment in which an image signal is transmitted from one facsimile to the other. An image signal representing a picture on a document as is read out by a photo-electric converting section or a line sensor (not shown) is stored into an image memory 10 (on the transmitting side). The image signal is a binary signal representing black and white picture elements. The image signal read out from the image memory 10 is supplied to a two dimensional coder 12. The two dimensional coder 12 codes the image signal by modified READ conversion for each block as defined by the K factor, and transmits it onto a transmission line 14 (such as telephone network and data network). Although the modified READ coding system is well known, it will be given in brief for a better understanding of the invention. In this coding system, density (black and white) changing positions on each horizontal scanning line of a picture is two dimensionally coded in a successive manner, referring to the code signal on the preceeding scanning line. The reference to the preceeding scanning line is ceased at every K scanning line, and at this time the density changing positions on the picture is one dimensionally coded. An EOL code is allocated to the end of the code signal of each scanning line. The last bit of the EOL code is "1" when the succeeding scanning line is one dimensionally coded, and is "0" when it is two dimensionally coded. Using the logic level of the last bit of the EOL code, the decoding side can decide whether the code signal of each scanning line is to be one or two dimensionally decoded. In this embodiment, a K factor in the modified READ coding is supplied from a K factor generator 16. The K factor generator 16 calculates by an operation later described, a K factor to provide the highest reduction rate according to a transmission error rate R of the transmission line 14. The K factor thus obtained is supplied to the two dimensional coder 12. The error rate R may manually be input to this apparatus. Alternately, it may automatically be set according to the type of the transmission line connected, such as telephone network or data network. In the general type telephone network, the error rate R depends on distance. In this case, it may be automatically set depending on the subscriber's number. The code signal transmitted through the transmission line 14 to the receiving facsimile, is input to a two dimensional decoder 18 where it is decoded into the original image signal. The decoded image signal is stored in an image memory 20, and then is visualized on paper by an image forming section (not shown). Connected to the two dimensional decoder 18 is an error detector 22 for detecting a code error which may occur during the transmission of the code signal. The error detection is performed on the basis of the number of picture elements contained in one scanning line. Specifically, the two dimensional decoder 18 counts the number of picture elements of each scanning line during the decoding of the transmitted signal. Upon detection of the last code EOL of each line, the result of the counting is supplied to the error detector 22. The error detector 22 compares the count with a reference number of picture elements according to the size of the document under transmission. When these are not equal to each other, the error detector 22 produces an error detection signal. The error detection signal is returned through the transmission line 14 to the transmitting facsimile and to a transmission controller 24. The transmission controller 24 controls the coding and transmission of the image signal, and controls the retransmission of the code signal including a transmission error. When all the image signal of a document has been transmitted, the transmission controller 24 again encodes and transmits any blocks of the image signal having the code error. The details of the K factor generator 16 will now be described. In the facsimile shown in Fig. 1, when an error rate R of the transmission line 14 is low, a probability of the retransmission is low. In this case, therefore, the reduction rate is high if the block size (K factor) is selected to be large. On the contrary, when the error rate R is high, a probability of the retransmission is high, and hence the reduction rate is high if the K factor is set at a small value. How to obtain an optimum value of the K factor will be given below. A code length (the number of bits) as given when one scanning line is one dimensionally coded, or modified Huffman coded, is normalized to be 1. A code length when it is two dimensionally coded, or modified READ coded, is assumed to be P. Under this condition, a code length of a code signal of one block (K lines) output from the two dimensionally coder, is 1 · 1 + P(K-1). As seen from this formula, when K = 1, this value, or the code length of this signal, is 1. Therefore, this value is defined as a coding rate ratio of the coding rate of two dimensional coding to that of one dimensional coding. This coding rate ratio indicates how effectively the image signal is encoded, viz., how short the code signal is. A coding rate ratio C PR for each scanning line is given by: The experimental result on the P by the inventor was 0.6. The coding rate ratio C PR (1 when K = 1) can be mathematically described with the block size K as in the following relation: This relation can be graphically expressed with a curve of a continuous curve in Fig. 2. This graph teaches that, when the code error due to the transmission of the code signal is neglected, the larger K is, the higher the reduction rate of the two dimensional coding. The encoded length of the image signal may be as little as 60 % of that in one dimensional coding. A probability P₁ of error occurence in the code signals in one block (K lines) as transmitted is given by: where R is an error rate of the transmission line, W is the length of the scanning line (the number of picture elements in a scanning line), and C P is a coding rate (code length/the number of picture elements). The probability P₁ also indicates a retransmission rate. The P₁ rectilinearly varies as shown by a continuous line in Fig. 2. Accordingly, a code length N₁ of the code signal retransmitted for each block is represented by: If the equation (4) is rewritten into another relation for one line, and the number of scanning lines per document is L, the retransmission code length N₂ for the entire document is given by: A ratio of the code length increased due to the retransmission to that of the original one block varies as shown by a curve of broken line in Fig. 2, against the K. Even if no error occurs, the code length N₃ of one document is LWC P . Therefore, the code length C L of the whole code signals including the retransmitted one is given by: In the equation (6), L and W are constants, and these may be deleted. Then, the coding rate ratio of the two dimensional coding for the entire document, in which the retransmission is considered, is as follows: The equation (7) can be graphically depicted as indicated by a one-dot-chain curve in Fig. 2. To obtain the block size K with the best coding rate ratio, the equation (7) is differentiated as follows: To find an optimum K factor, the right side of the equation (8) must be zero. The equation (9) teaches that the K factor to provide the highest redundancy reduction rate in the modified READ coding is determined by only the error rate R of the transmission line 14 and the width W of the document (the number of picture elements in one scanning line). In the equation (9), the document width W can be treated as a constant. Accordingly, in the circuit operation, when receiving an error rate R of the transmission line 14, the K factor generator 16 calculates a K factor using the equation (9), and supplies the K factor to the two dimensional coder 12. Alternatively, the K factors of width W and error rate R are previously calculated, and the calculated ones are stored in a memory, for example, ROM. In use, a necessary K factor is read out of the memory according to the width W and the error rate R at that time. The results of the calculation of the equation (9) are tabulated below. In the above table, "8/mm" means a horizontal resolution of 8 picture elements for a 1 mm interval. The contents of the table can be graphed as shown in Fig. 3. As seen from the foregoing description, according to the first embodiment, an optimum K factor considering an increase of the code length caused by retransmission of an error block can be automatically obtained according to an error rate R of the transmission line, and the image signal can be encoded with the highest redundancy reduction rate. A second embodiment of a two dimensional coding apparatus according to the present invention will be described, referring to Fig. 4. In the second embodiment, the two dimensional coding apparatus is applied for an image signal filing system. Same reference numerals are used for the same portions in Fig. 1. As in the first embodiment, the image signal read out from the image memory 10 is supplied to the two dimensional coder 12, and in the coder 12, it is modified READ coded using the K factor from the K factor generator 16. Subsequently, unlike the first embodiment, a code signal output from the two dimensional coder 12 are supplied to an optical disk device 40. Then, the codes are written into an optical disk (not shown) in the form of a train of pits and nonpits, for example. The codes are also stored into a code memory 42. The code read out of the optical disk device 40 is supplied to an error detector 44 for detecting an error code which may occur when the codes are written into the optical disk. The code read out from the optical disk device 40 is also supplied to the error detector 44. From the optical disk into which the code writing is completed, the code is immediately read out, and supplied to the error detector 44. The error detector 44 compares the reproduced code with the code read out from the code memory 42, and produces an error detection signal when these are not equal to each other. The error detection signal is returned to the record side, and to the data writing controller 46. The data writing controller 46 controls the rewriting of the code with the writing error as well as the writing of the image signal. Upon completion of writing of the image signal of one sheet of document, the data writing controller 46 again encodes and writes any blocks of the image signal including the error. The error rate R of the transmission line 14 in the first embodiment may be replaced by a writing error rate of the optical disk. Also in the second embodiment, a code length in the whole writing including a rewriting, can be minimized, thus leading to improvement of a redundancy reduction rate of the two dimensional coding apparatus. As described above, according to the present invention, there is provided a two dimensional coding apparatus which can reduce the amount of information to be processed by setting the K factor at a highest redundancy reduction rate considering an increase of the code length caused by retransmission or rewriting of an error block according to an error rate of the transmission line or the recording medium. It should be understood that the present invention is not limited to the above-mentioned embodiments, but may variously be changed and modified within the scope of the invention. For example, in the second embodiment, for the write error detection, the codes are compared with each other. Alternatively, the code read out of the optical disk device 40 is decoded and compared with the image signal output from the image memory 10. In this case, the code memory is unnecessary. While the modified READ coding system was employed for the two dimensional coding system in the above-mentioned embodiments, any other coding system varying the block size is also available.

Claims: A two dimensional coding apparatus comprising: means (12) for two dimensionally coding an image signal for each predetermined block in a successive manner; code processing means (14, 40) for transmitting or storing a code signal output from said coding means (12); means (22, 42, 44) for detecting an error code in the transmitted code signal or the stored code signal, which is output by said code processing means, during transmission or storing, respectively, by said code processing means (14, 40); means (24, 46) for retransmitting or restoring, respectively, a code signal including a detected error code according to an output of said detecting means (22, 44); and means (16) for selecting a block size of said coding means (12) according to an error rate, characterized in that said selecting means (16) calculates a size of a block to be transmitted or stored subsequently to the current block according to the error rate determined according to the error code detected by said detecting means (22, 44) so as to provide the highest redundancy reduction rate in the coding, and thus minimizes the bit length of the whole transmitted and retransmitted code signals. An apparatus according to claim 1, characterized in that said block size selecting means (16) selects a block size so as to minimize an amount of transmitted or stored code signal and retransmitted or restored code signal, respectively. An apparatus according to claim 1, characterized in that said coding means (12) encodes an image signal by the modified READ coding system, and said block size is the number of the scanning lines (K factor). An apparatus according to claim 3, characterized in that said detecting means (22, 42, 44) detects a transmission or storing error, respectively, depending on whether or not the number of picture elements represented by codes on each scanning line is equal to a predetermined number of picture elements. An apparatus according to claim 1, characterized in that said retransmitting or restoring means (24, 46) retransmits or restores a code signal for each block, respectively. An apparatus according to claim 1, characterized in that said code processing means is a signal transmission line (14) connected to a decoder (18). An apparatus according to claim 1, characterized in that said code processing means is a memory device (40) for recording a code signal into a recording medium. An apparatus according to claim 7, characterized in that said detecting means (42,44) includes a code memory (42) for storing a code signal, and a comparator (44) for comparing a code signal reproduced from said recording medium with the corresponding code signal output from said code memory (42).

Inventors: MIZUTANI, MOTOHARU C/O PATENT DIVISION
Applicants: KABUSHIKI KAISHA TOSHIBA
Application year: 1985
Main classification: H04N1
IPC codes: H04N1