Image processing apparatus

Abstract: An image processing apparatus and method in which an image signal including run-length encoded orthogonal transform coefficients is decoded and transmission errors in the coefficients are concealed by outputting substitute pixel data. Transmission errors are detected by counting the number of orthogonal transform coefficients, inclusive of those of 0-value included in each run, for a predetermined number of pixel block or blocks and by comparing the count obtained with a preset count.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus equipped with image decoding means which has a function of expanding compressed image data, for example. Related Background Art Conventionally, there is known a technique for transmitting image data after performing a frequency transform (transformation) of image data for each block to make data compression. In particular, by separating frequency components into a high-frequency component and a low-frequency component and encoding those components separately from each other, compression efficiency of images is increased. However, the above prior art has had a disadvantage that if an error occurs during transmission of encoded data, an image signal including false image data is reproduced and image quality deteriorates remarkably. In the case of using a variable-length code in encoding the above high-frequency component, it may sometimes happen that even the number of data is not reproduced accurately and a quite gross deterioration of image quality such as missing of image data occurs. Meanwhile, in the field of transmitting images in the digital form, there have also conventionally been proposed a variety of encoding methods for cutting down the quantity of information before transmitting images because the quantity of information is very large. Among them, there is known a method of carrying out an orthogonal transform, quantizing a coefficient after the transform, and forming a variable-length code. With the above-mentioned prior art including no error detecting means, however, if an error occurs in a transmission path, such an error cannot be corrected, leading to a gross deterioration of image quality. Especially, in the event of exceeding a dynamic range capable of decoding and reproducing when encoded data after transmission is decoded, for example, image quality deteriorates. Moreover, in an image transmission system of the type that a moving image signal is digitized and image data is transmitted via transmission paths such as optical fibers or communication satellites and recording media such as magnetic tapes, an error correcting code (ECC) for detecting and correcting a transmission error is utilized to correct the transmission error in the reception side (or the reproduction side) based on the error correcting code. That error which cannot be corrected by using the error correcting code is subjected to interpolation processing to form an approximate value from surrounding pixels. In order to avoid a deterioration of image quality caused by the interpolation processing, it is required that the surrounding pixels utilized for the interpolation are free from errors. When adopting highly efficient encoding (image compression) which has been widely used in recent years, the surrounding pixels capable of being utilized for the interpolation are restricted. In a DPCM (difference pulse code modulation) method that reset is made for each line, for example, if an uncorrectable error occurs, the original data cannot be reproduced by using the line inclusive of the error. Accordingly, only those pixels which are included in the upper and lower lines can be utilized for interpolation in this case. Further, in an encoding method that uses an orthogonal transform such as a discrete cosine transform (DCT), if an uncorrectable error occurs, all the pixels included in a transmission block (e.g., 8 pixels vertical x 8 pixels horizontal) cannot be used to reproduce the original signal. As a result, a deterioration of image quality cannot be prevented even by the interpolation using the upper and lower lines. Thus, even in an attempt of performing the interpolation in the same frame, no effect may be expected depending on the coding methods. Additionally, in the field of transmitting information such as images and voices in the digital form, there have been proposed various encoding methods for cutting down the amount of data transmitted. One known run-length coding method is to encode data by combining the number of successive 0s and a value other than 0 into a set. On the other hand, a forecast difference encoding method or a difference pulse code modulation (hereinafter referred to as DPCM) encoding method is also known which compresses information by utilizing correlation between sample values close to each other. There is further known an encoding method that the above two methods are combined with each other. Fig. 2 is a block diagram showing the encoding method in a combination of the two methods. Image data of 8 bits inputted through an input terminal 611 is applied to a DPCM encoder 613 for DPCM encoding into 4 bits. Specifically, the DPCM encoder 613 assigns DPCM codes of 4 bits to respective difference values as shown in Table 1 below. Range of Difference Values DPCM Code Representative Value of Difference - 255 ∼ - 94 15 - 140 - 93 ∼ - 70 13 - 80 - 69 ∼ - 50 11 - 58 - 49 ∼ - 34 9 - 40 - 33 ∼ - 22 7 - 27 - 21 ∼ - 13 5 - 17 - 12 ∼ - 6 3 - 8 - 5 ∼ - 2 1 - 3 - 1 ∼ 1 0 0 2 ∼ 5 2 3 6 ∼ 11 4 8 12 ∼ 20 6 15 21 ∼ 35 8 27 36 ∼ 53 10 44 54 ∼ 93 12 70 94 ∼ 255 14 150 An image generally has correlation between sample values close to each other such that many difference signals occur as 0 and many DPCM codes occur as 0. The DPCM codes encoded into 4 bits are outputted to a run-length encoder 615. As shown in Fig. 3A, the run-length encoder 615 combines the DPCM code other than 0 and the number of successive 0s (hereinafter referred to as a 0 run-length) before the DPCM code into a set for each DPCM code of 4 bits. At this time, by limiting the 0 run-length to 16 at maximum, the run-length codes can be each expressed in 8 bits. The 8-bit run-length codes thus encoded by the run-length encoder 615 are added with a reset synch bit in a transmission format unit 617 as shown in Fig. 3B and then delivered to an output terminal. The reset synch bit is added, for example, after processing of each line. Fig. 1 is a block diagram showing a configuration of a decoder device in cooperation with the encoding section of Fig. 2. The run-length code and the reset synch bit both transmitted through a transmission path are applied to an input terminal 621, and a run-length decoder 623 decodes the DPCM code by inserting 0s in the number corresponding to the 0 run-length before each DPCM code until arrival of the reset synch bit. The data decoded to the DPCM code is outputted to a DPCM decoder 625 for decoding to image data of 8 bits, which are then delivered to an output terminal 627. With the above conventional method, however, if an error occurs in a transmission path, such an error cannot be corrected and image quality deteriorates remarkably because of including no error detecting means. As mentioned before, in the field of transmitting information such as images and voices in the digital form, there have been proposed various encoding methods for cutting down the amount of data transmitted. One known run-length coding method is to encode data by combining the number of successive 0s and a value other than 0 into a set. On the other hand, a transform encoding method is also known which performs an orthogonal transform of pixels to be transmitted and quantizes transmitted data. There is further known an encoding method that the above two methods are combined with each other. With the above conventional methods, however, if an error occurs in a transmission path, such an error cannot be corrected and image quality deteriorates remarkably because of including no error detecting means. Meanwhile, U.S. Patent No. 5,023,919 has been proposed with an intention to correct or avoid a deterioration on the side decoding compressed data, but has not yet succeeded in sufficiently solving the problem. US 4,903,269 describes a DPCM decoder wherein the pixels of a line are counted in order to detect transmission errors. SUMMARY OF THE INVENTION An object of the present invention is to improve a decoding method of encoded data which is encoded by run-length encoding. To achieve the above object, in accordance with the present invention, there is disclosed an image processing apparatus and method according to claims 1 and 5. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a conventional decoding device. Fig. 2 is a block diagram of a conventional encoding device. Figs. 3A and 3B are diagrams for explaining operation of Fig. 2. Fig. 4 is a block diagram showing a configuration of a preferred embodiment of the present invention. Fig. 5 is a block diagram of an encoding device. Figs. 6A and 6B are diagrams for explaining operation of Fig. 5. Figs. 7, 8 and 9 are diagrams for explaining operation of Fig. 5. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT Fig. 5 is a block diagram showing an encoding method which combines twos, i.e., the orthogonal transform encoding method and the run-length encoding method, with each other. Image data applied to an input terminal 711 is divided into blocks by a block formation unit 713 such that a raster series of Fig. 6A is turned into a plurality of blocks as shown in Fig. 6B. In this case, each block comprises 8 pixels horizontal and 8 pixels vertical. The pixel data in each block are transformed by a transform encoder 715. The transform encoder 715 employs a transform encoding method called a discrete cosine transform (DCT) encoding. Generally, as shown in Fig. 7, the coefficients obtained through the DCT transform of the image data exhibit low resolution in the oblique direction and has the smaller magnitude at the higher frequency component. Those coefficients obtained through the DCT transform are quantized by a quantizer 717. The quantized transform coefficients are scanned by a zig-zag scanner 717 in zig-zag fashion as shown in Fig. 8 for the reason that the probability of the occurrence of 0 is increased at the higher frequency component. Such zig-zag scan results in successive appearance of 0s. The zig-zag scanned data is applied to a run-length encoder 721 to form a set of the number of 0s and the coefficients other than 0. Upon the completion of processing of one block, an EOB code is outputted. An entropy encoder 723 assigns a short code to those codes having high occurrence probability and a long code to those codes having low occurrence probability, followed by delivery to a transmission format unit 725. The transmission format unit 725 delivers the data from an output terminal 727 after adding a synch bit for every several blocks as shown in Fig. 9. Fig. 4 is a block diagram showing a configuration of a decoding device in cooperation with the encoding device of Fig. 5. The data transmitted through a transmission path is applied to an input terminal 731 and decoded by an entropy decoder 733 to a run-length code. The run-length decoder 751 performs run-length decoding and outputs the decoded data to an inverse zig-zag scanner 737 and, simultaneously, outputs the sum of the number of 0s in a run and the number of 1s other than 0, i.e., the number of transform coefficients, to a counter 753. The counter 753 counts the number of transform coefficients for each predetermined period of time. Assuming now that the predetermined period of time is one block, a processing unit setter 755 sets 64 equal to the number of transform coefficients. A comparator 757 compares a value inputted from the processing unit setter 755 with a value inputted from the counter 753. If both the values are in match with each other, then it is judged that the data has been transmitted without errors. If both the values are not in match with each other, then it is judged that an error has occurred. Either judgment result is outputted to a delay unit 759. The delay unit 759 delays the judgment result by the amount to be paid off by proceeding through an inverse zig-zag scanner 737, an inverse quantizer 739 and an inverse transform encoder 741. On the other hand, the inverse transform encoder 741 outputs the inversely transformed pixel data to one terminal a of a switch 763 and also to a frame memory 761. The frame memory 761 the pixel data, which are delayed by a time period of one frame therethrough, to the other terminal b of the switch 763. Depending on the judgment result outputted from the delay unit 759, the switch 763 selects the terminal a for a predetermined period of time when no error is found, and the terminal b for a predetermined period of time when an error is found. In other words, upon the occurrence of an error, the current image data is replaced by the image data of preceding frame for correction. A raster formation unit 743 converts the block series back into the raster series, followed by delivery to an output terminal 743. As described above, according to the preferred embodiment of the present invention, a deterioration of image quality otherwise caused by the occurrence of an error can be prevented with a simple hardware construction, by providing error detecting means specifically adapted for the process of run-length decoding. It should be understood that the uncorrectable error in the foregoing embodiment may be performed by using any of the image data of preceding frame and the image data of preceding field. Furthermore, the present invention is not limited to the foregoing embodiment and can be variously modified and applied within a scope defined by the attached claims.

Claims: An image processing apparatus comprising: receiving means (731) for receiving an image signal including encoded orthogonal transform coefficients; decoding means (733-741, 751) for decoding the encoded orthogonal transform coefficients on a two-dimensional pixel block unit basis, and for converting the orthogonal transform coefficients into pixel-representative image data; detection means (751-759) for detecting transmission errors of the encoded orthogonal transform coefficients; and concealment means (761, 763), responsive to said detection means (751-759), for concealing transmission errors by outputting pixel-representative image data for the corresponding pixel block of the preceding field or frame in place of that for the current field or frame; wherein said decoding means (733-741, 751) includes a run-length decoding means (751) for decoding received run-length encoded orthogonal transform coefficients; and said detection means (751-759) includes counting means (753), responsive to said run-length decoding means (751), to count the number of orthogonal transform coefficients, inclusive of those of 0-value included in each decoded run, for each block or for a predetermined period of time, and comparator means (757) for comparing the count with a count of predetermined set value determined for each block or for the predetermined period of time. An apparatus according to claim 1 wherein said decoding means (733-741, 751) is adapted to decode discrete cosine transform coefficients. An apparatus according to any preceding claim wherein said decoding means (733-741, 751) is adapted to decode the encoded orthogonal transform coefficients on an NxN pixel block unit basis, where N is the number of pixels in each row and in each column of each block. An image processing system comprising in combination: transmitting means (401; 301) for transmitting an image signal including run-length encoded orthogonal transform coefficients, encoded on a two-dimensional pixel block unit basis; and an image processing apparatus (402; 302) as claimed in any preceding claim 1 to 3. A method of image processing comprising steps of: receiving an image signal including encoded orthogonal transform coefficients; decoding the received image signal on a two-dimensional pixel block unit basis and converting the orthogonal transform coefficients into pixel representative image data; detecting transmission errors of the encoded orthogonal transform coefficients; and concealing the transmission errors, by outputting pixel representative image data for the corresponding pixel block of the preceding field or frame in place of that for a current field or frame; wherein the received image signal includes run-length encoded orthogonal transform coefficients and said step of decoding includes run-length decoding; and said step of detecting transmission errors includes counting the number of orthogonal transform coefficients, inclusive of those of 0-value included in each decoded run, for each block or for a predetermined period of time, and comparing the count obtained with a count of predetermined set value determined for each block or for the predetermined period of time.

Inventors: HOSHI NOBUHIRO, KANEKO YUSHI, SHIKAKURA AKIHIRO, HOSHI, NOBUHIRO, KANEKO, YUSHI, SHIKAKURA, AKIHIRO
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1991
Main classification: H04N7
IPC codes: H04N7, G06T9