Image processing

Abstract: An image processing apparatus for expanding given compressed image data in combination with other compressed image data, provided with a retaining device which retains, at the successive expansions of the compressed data, information relative to the development of a certain area until the data development of an area next to the above-mentioned certain area.

Description: The present invention relates to an image processing apparatus. Information constituting a page, prepared for example by a word processor or a desk-top publishing system can be generally divided into "characters", "patterns" such as a circle or a straight line, and "images" generated for example by an image scanner. Examples of such information will be explained further with reference to Fig. 3, in which 301 indicates a one-page data prepared for example by a word processor or a desk-top publishing system. These "characters", "patterns" and "images" are transferred in the form of codes 302 to a next process. For encoding an "image", in case of a multi-value color image, there is often employed an image compression method called ADCT. In the conventional method, the encoded data 302 are developed, at the image output, as a raster image in a page memory 303 representing the entire area of a page. Even in case two "image" codes are included as shown in 302, the use of said page memory allows, after the development of a first image by an ADCT process block, the development of a second image. Also the "character" and "pattern" are developed in this page memory. Said data of one page are transmitted to a printer unit for image output. However, such page memory as explained above requires a large memory capacity. If the printer unit is of a low speed, the page memory can be composed for example of a rigid disk, but it is inevitably expensive. As an example, in a printer unit employing four colors of C (cyan), M (magenta), Y (yellow) and K (black) with a resolving power of 400 DPI and a gradation of 8 bits per color, there is required a RAM of about 60 Mbytes for an A4-sized image. For this reason there is conceived a system, as represented by 304 in Fig. 3, of dividing a page into laterally oblong segments and developing the codes in a band memory corresponding to a segment. The memory capacity can be reduced by such segmentation of a page. However, in such structure, there has not been conducted satisfactory processing in case a page contains plural "images" as shown in Fig. 3. For example, referring to Fig. 4, in case an expander of compressed image expands a first image 402 in a considered segment 404, a, b, c, ... in said image 402 signifies blocks each consisting of 8 x 8 pixels in the ADCT process. After successive expansions of blocks a, b, c, ..., f, the next block expansion has to be conducted not on a block g but on a block j in a second image 404. However, satisfactory image expansion cannot be conducted because the processed image is switched from the first image to the second image. Also the present inventor has found that a drawback is encountered if the boundary of such segment does not coincide with the boundary of a small block of the image expanded from a compressed code. In an image compression method such as ADCT, the image is processed in a block for example of 8 x 8 pixels. If the boundary of said block does not coincide with the boundary of segment, in a block containing the boundary of two adjacent blocks, the data processing in a portion belonging to the next block becomes a problem. EP-A-0473340, not published at the present priority date, describes a colour desktop publishing (DTP) apparatus in which ADCT coding is used to compress images for storage. Image expansion is performed in bands of eight lines, the band corresponding to the height of one 8 x 8 pixel coding block, and composition of plural image elements is performed in multiple passes, expanding, compositing and re-compressing at each pass in bands of 8 lines. In accordance with one aspect of the present invention there is provided an image processing apparatus, in accordance with claim 1. An embodiment of the present invention provides an image processing method, and an apparatus therefor, capable of collectively or individually resolving such drawbacks. Another embodiment of the present invention provides an image processing method capable of satisfactorily reproducing compressed data representing plural images, and an apparatus therefor. Still another embodiment of the present invention provides an image processing method capable of satisfactorily reproducing a two-dimensionally encoded image data, and an apparatus therefor. Still another embodiment of the present invention provides a printer interface of a limited capacity. Still another embodiment of the present invention provides a printer interface with a novel function. Still another embodiment of the present invention provides an image processing apparatus capable of output of image data of high quality. Other objects of the present invention, and the features thereof, will become fully apparent from the following description of the preferred embodiments, to be taken in conjunction with the attached drawings, in which: Fig. 1 is a block diagram of an embodiment of the system of the present invention; Fig. 2 is a block diagram showing the internal structure of an image expansion block; Fig. 3 is a view showing the function of said embodiment, in comparison with that of a conventional method; Fig. 4 is a view showing a page containing two images; Fig. 5 is a view showing the boundaries of blocks and segments; Fig. 6 is a flow chart showing the control sequence of said embodiment; Fig. 7 is a view showing the arrangement of segments and the size of a band memory; and Fig. 8 is a view showing another embodiment of the present invention, in which a ring buffer is employed as the band memory. In a preferred embodiment of the present explained in the following, there is disclosed an apparatus provided with an ADCT image compression/expansion device, means for detecting the boundary of 8 x 8 pixel blocks, plural Huffman tables, plural digitizing tables, plural FIFO synchronizing registers, and plural DC component retaining registers and means for switching such buffers and registers for each expanded image, thereby enabling expansion of plural compressed image data contained in a segment, by means of a single expanding device. Thus, said apparatus is capable, for plural images present in a segment, of expansion of a part of the image, and a raster image can be developed from plural compressed image information, utilizing a band memory. However it is to be noted that the present invention is not limited by this embodiment. Said embodiment will be clarified in more details in the following, with reference to the attached drawings. Fig. 3 is a view showing the function of a system embodying the present invention, wherein 301 indicates information of a page edited in a computer such as a word processor or a desk-top publishing system. Such image information of a page is processed, inside the computer, in the formed of codes 302. The codes processed inside the computer are often different from those transmitted to the printer, but the present embodimnet assumes that both code systems are same. The present invention is applicable to both cases. The codes 302 indicate the elements contained in the data 301. At first RGB (0, 0, 0) indicates that the color to be recorded is black. Then Circle (600, 300, 100) indicates the drawing of a circle. Image (...ADCT) data (ff, ee, ...) indicates the image data compressed by ADCT method. In the present embodiment, the above-explained code information is developed by an image development system 304 into a raster image, and then transferred to a printer unit for obtaining a printout 305. Fig. 1 is a block diagram of a raster image developing system constituting an embodiment of the present invention, wherein an interface 101 receives code data from an external computer. The code data of a page are once stored in a RAM 104. A ROM 102 stores a program for developing the code data into a raster image, and character font data. Among the data stored in the RAM 104, the codes representing "characters" and "patterns" are developed into a raster image on a band memory 106, by means of a CPU 103, according to the program stored in the ROM 102. On the other hand, among the data stored in the RAM 104, the codes representing compressed image are converted and developed in the band memory 106 by means of an ADCT expander 105. After the image development of a segment, the raster image is transferred through an interface 107 to a printer engine 108 for effecting the image printout, and the development in a next segment is then executed. The internal structure of the ADCT process block 105 is shown in Fig. 2. In Fig. 2 there are shown an interface 201 for data exchange with the CPU 103; a Huffman encode/decoding block 202; a buffer and register 203 for Huffman decode/encoding; an area 204 for storing Huffman tables for decoding; an FIFO register 205 for storing Huffman decoded data; an inverse digitizer 206 for inverse digitization of Huffman decoded data; a buffer and register 207 for said inverse digitization; an area 208 for storing digitizing tables used for said inverse digitization; a block 209 for IDCT (inverse discrete cosine transformation); a buffer and register 210 for said IDCT: an interface 211 for storing the expanded data in a band memory; an 8 x 8 block detector 212 for detecting the DCT block (8 x 8 pixels in this embodiment) and identifying the switching point between the images 1 and 2 in Fig. 4; and a switching signal generator 213 for generating a switching signal, indicating the switching from the image 1 to the image 2, based on the detected boundary of such blocks. The blocks shown in Fig. 2 are capable, not only of decoding as explained above, but also of encoding function, so that the data compression is executed by sending data from the block 211 to 201. The printer unit employed in the present embodiment can be, for example, an ink jet printer, preferably a printer utilizing liquid droplet discharge by film boiling as disclosed in the U.S. Patent No. 4,723,129, or an electrophotographic printer. In case the printer employs plural recording elements arranged over a predetermined width in the sub scanning direction and records the image of one frame by moving such plural recording elements in the main scanning direction, the width of the above-mentioned band memory is selected larger than the width of said plural recording elements. In the following there will be explained the function of the present embodiment. There will be considered a case in which a page contains two "images" as shown in Fig. 4. The interface 201 extracts, from the RAM 104 shown in Fig. 1, Huffman encoded data corresponding to a portion a of "image 1" (402) shown in Fig. 4, and the Huffman decoder 202 executes decoding, referring to the Huffman table 204. For decoding of the image of "image 1" (402), there is used table data #0 in the table 204. Said table data are different depending on the image to be decoded, and are predetermined by the CPU. Also in said decoding there is used an area #0 of the buffer and register 203. For example in the ADCT encoding, the DC component of each block after orthogonal transformation is Huffman encoded after DPCM compression. The Huffman decoder 202 expands the DC and AC components of the original image and stores thus expanded data in an area #0 of the FIFO 205. The inverse digitizer 206 reads the data in said FIFO 205, and, after run length decoding of the AC component, applies a coefficient according to a digitizing table 208. Said table is #0 for the image 1, but may be different for the image 2, and the selection of said tables is predetermined by the CPU. Also for the work area, a portion #0 of the buffer and register 207 is used. Then the IDCT (inverse discrete cosine transformer) 209 converts the two-dimensional spatial frequency data of 8 x 8 pixels, obtained from the inverse digitizer, into the original image data. Also in this operation, a portion #0 of the buffer and register 210 is used. Then the interface 211 transfers the expanded data to the band memory 106. The block detector 212 detects the boundary of 8 x 8 block, and discriminates whether the currently expanded image reaches the boundary of a segment. After expansion of the block f in Fig. 4, the expansion operation has to proceed to a block j of the second image 403, instead of blocks g, h, i,... Consequently the switching signal generator 213 counts the block boundary signal from the block detector 212 and generates a signal for switching the area from #0 to #1 in the tables and registers, at the boundary of the segment. At this moment, the Huffman decoder has already initiated the decoding of data of a next segment, but the states up to said switching are retained in the areas #0. Consequently, when the decoding of the image 2 is completed in a block, the expansion of the image 1 can be restarted, utilizing the area #0. Subsequently, the compressed image data of the block j, k, ..., ℓ of the image 2 are in succession expanded and decoded. In this operation, the data or parameters necessary in the expansion are obtained or stored in the areas #1 of the registers and tables. After the expansion of the image 2 is executed in a subject segment 404, the segment is shifted by a band, and the expansion of the image 1 is again executed. The data of plural compressed images can be easily expanded by the repetition of the above-explained operations. In case the compressed image is arbitrarily positioned within a page, the boundary of 8 x 8 pixel block constituting the expanded image may not match the boundary of the segment. In the following there will be explained an embodiment which enables satisfactory image processing even in such case, with reference to Fig. 5. The configuration of said embodiment is same as that shown in Fig. 2. In Fig. 5, 501 indicates a segment currently subjected to data development, and 502 indicates a segment to be subjected to data development next. In an image 1 (503) the boundary of an 8 x 8 block coincides with the boundary of the segment, but, in another image 2 (504), the boundary of 8 x 8 block does not coincide with that of the segment. In the image 2, a block 505 contains portions of two adjacent segments. For retaining data not belonging to the current segment in the expansion of such block, in the present embodiment, the width of the band memory shown in Fig. 1 is selected larger, by the width of a block, than the width of a segment, and the data of a portion beyond the segment boundary are also recorded in the band memory. Then, immediately before the start of data development of a next segment, the data of said one block width are copied to the initial portion of the band memory. Said data copying is however not conducted in case of data expansion in which the boundary of 8 x 8 blocks coincides with that of the segment. Fig. 7 shows the sizes of the segments and the band memory. As shown in Fig. 7, the width of the band memory is selected larger, by a block or by 8 pixels, than the width of the segment. In Fig. 7, an area 703 indicates the portion of data copying mentioned above. In case the block boundary does not coincide with the segment boundary in an image, a copy flag is set whereby the data are copied to a hatched area 703 prior to the data development of a next segment. In this manner there is provided a data expanding apparatus which enables the data expansion or a part of an image, in case plural images are present in the main scanning direction, thereby retaining the data of an interrupted expansion operation and re-starting the interrupted expansion without repeating the data expansion on same data. In the present embodiment there are employed the register, Huffman table, buffer register and digitizing table shown in Fig. 2 corresponding to the ADCT compression method, but the configuration of said register etc. can be suitably modified according to the compression method to be employed. For example, in case of using vector digitizing compression requiring different decoding tables for different images, there may be provided a register storing such parameters corresponding to the images. Also for the processing of a color image, there will be required the portions of said registers and tables, corresponding to the color components of such color image. Also in the foregoing embodiment there has been explained a case in which two images are present along the main scanning direction as shown in Fig. 4, but the present invention is not limited to such case and is likewise applicable to a case in which three or more images are present along the main scanning direction. The band memory may be constructed in so-called double buffer configuration, in order to achieve raster image development and data output to the printer unit at the same time. Also the image compression method is assumed to be the ADCT method based on the international JPEG standard, but there may be employed other encoding methods as explained above. The above-explained embodiment allows to develop page information including plural compressed image with a band memory of a limited capacity, by an expanding apparatus provided with means for retaining the function state consisting of plural reference tables and plural buffer registers, and means for detecting the boundary of pixel blocks and switching the function state for each expanded image. As explained in the foregoing, the present invention allows satisfactory expansion of plural compressed image data with a simple configuration. In the following the function of the above-explained embodiment will be explained further with reference to a flow chart shown in Fig. 6. In said embodiment, as explained before, the band memory can hold, even for an image 504 shown in Fig. 5, the data beyond the segment boundary. After the data expansion of a segment, the data of the band memory are transferred to the printer unit, and the data expansion for a next segment is initiated. In this state, the data transferred to the printer unit are those belonging to a same segment, excluding a portion of one block width. The data of said one block width are subsequently copied in a hatched area 703, at the initial portion of the band memory. These operations will be explained with reference to the flow chart shown in Fig. 6. As explained before, it is assumed that the code data are already stored in the RAM 104 shown in Fig. 1 and are taken out therefrom for development in the band memory 106. At first a step 602 discriminates whether the data of a block width (8 pixels) are to be copied. Since the data copying is not conducted for the first segment, the sequence proceeds to a step 605 which fetches the code data. The fetched codes are subjected to development into the band memory. If said code represents "character", a step 606 effects development of a character. If the code represents "pattern", a step 607 effects development of a pattern. If the code represents "image", a step 608 effects development of an image. After the development of code as a raster image in the band memory, a step 611 discriminates whether all the codes in the current segment have been developed, and, if any code left, the sequence returns to the step 605 for repeating the above-explained sequence. A step 609 discriminates whether the block boundary coincides with the segment boundary, and, in case of non-coincidence, a step 610 sets a copy flag. After the completion of data development of a segment, a step 612 transfers thus developed data to the printer unit. Then a step 613 discriminates whether all the segments have been processed, namely whether the development of a page has been completed. Since only the first segment has been developed in the contemplated case, the sequence returns to the step 602 for repeating the above-explained operations. In the processing of the second or subsequent segment, the copy flag may be set in the development of the preceding segment, and, in such case, the sequence from the step 602 to a step 603. Said copy flag instructs processing of the overflowing portion of segment, resulting from the unmatching boundaries of block and segment (as indicated by a broken line in Fig. 1), and the data of said overflowing portion of one-block width are copied into the starting part of the band memory. Then a step 604 clears said flag, and a step 605 effects code fetching and development for the second segment. The above-mentioned operations are repeated until a step 613 identifies completion of a page. The use of said flag dispenses with the copying operation of the data of one-block width in case the boundary of block matches the boundary of segment in the developed images. In this manner there is provided a data expanding apparatus which is capable of expanding a part of the image, retaining the state of an interrupted expanding operation and re-starting such interrupted expanding operation, thereby allowing expansion of plural images arranged along the main scanning direction, without requiring repeated expansion on same compressed data. In the foregoing embodiments it is assumed that the start of the band memory 106 always coincides with the start of each segment, but there may also be employed so-called ring buffer structure. In this case said copying operation becomes unnecessary. Fig. 8 shows the modes of data development in the band memory 106 composed of such ring buffer. A dotted area indicates a memory area corresponding to the segment size, while a white area indicates a memory area of overflowing data, namely an area of one-block width. At the data development of 801, the start of the band memory coincides with the start of segment. In a second segment 802, the data development is executed with the most upper portion of one-block width of the last part, which is designated by an arrow "→", in the first segment 801 as the initial part of said second segment. The last part of the band memory in this case is constructed in the same manner as the initial part, so that a ring buffer is constituted. Though the segment 802 is illustrated in two divided parts, they can in fact be accessed in continuous manner. Also a third segment is developed with a position designated by an arrow in 803 as the initial part of the segment. After a state of 804, there is repeated the state of 801. Such ring buffer structure enables satisfactory data expansion, even when the data overflows the segment boundary due to the unmatching boundaries of block and segment, by displacing the start position of the next segment at the data development thereof. The present invention is not limited to the foregoing embodiments, but there may also be employed other methods as long as the unmatching boundaries of 8 x 8 block and segment as shown in Fig. 5 can be resolved.

Claims: An image processing apparatus which decodes encoded image data corresponding to a plurality of bands sequentially in each band, comprising: decoding means (105) for decoding encoded image data for an image corresponding to a predetermined band; a memory (106, 404) for storing the decoded image data corresponding to said predetermined band prior to output; retaining means (203, 204) for retaining a state relating to the decoding of the encoded image data corresponding to the predetermined band by said decoding means until decoding the encoded image data corresponding to the next band following the predetermined band starts, wherein the encoded image data is encoded by a two-dimensional encoding method (ADCT 105), and wherein each band is larger in each dimension than a single two-dimensional block employed in said two-dimensional encoding method and smaller than the image to be decoded (Fig. 4, a to ℓ). An image processing apparatus according to claim 1, wherein said two-dimensional encoding method is ADCT (adaptive discrete cosine transform). An image processing apparatus according to claim 1 or 2, wherein said image data is colour image data. An image processing apparatus according to claim 1, 2 or 3, further comprising: means for supplying a printer with image data stored in said memory (106, 104). An image processing apparatus according to claim 4, wherein said printer is an ink jet printer. An image processing apparatus according to claim 5, wherein said printer is adapted to deposit ink droplets by film boiling. An image processing apparatus according to any preceding claim, wherein said retaining means (203, 204) is adapted to retain the state of the decoding operation for the image at the end of decoding a band while other data is written into the memory (106, 104), for use when decoding the image data for the next band. An image processing apparatus according to claim 7, wherein image data for plural images is decoded to be composited and stored for one band, the apparatus comprising means for retaining the state of the decoding operation for each image at the end of decoding a band, while decoding the other image(s) for the same band, and restoring said state to resume decoding of the one image for the next band. An image processing apparatus according to any preceding claim, wherein means are provided to resolve mismatch between the boundaries of the bands and the blocks of the encoding method, without the need to decode any portion of the image data twice. An image processing apparatus according to claim 9, wherein the memory is arranged to store additional image data extending beyond the band boundary, when a block of decoded image data for the current band extends beyond the band boundary, said additional image data being used as decoded image data for the next band. An image processing apparatus according to any preceding claim, wherein the memory is one of two band memories in a double buffer arrangement. An image processing apparatus according to any of claims 1 to 10, wherein said memory is configured as a ring buffer. An image processing apparatus according to any preceding claim, further comprising input means for inputting the image data from a computer. An image processing apparatus according to claim 13, wherein said input means inputs command data indicating characters together with the image data. An image processing apparatus according to claim 13 or 14, wherein said input means inputs command data indicating graphic objects together with the image data. An image processing apparatus according to any preceding claim, wherein said memory (106, 404) is adapted to store both decoded image data and image data obtained by developing command data indicating characters. An image processing apparatus according to any preceding claim, wherein said memory (106, 404) is adapted to store both decoded image data and image data obtained by developing command data indicating graphic objects. An image processing method for decoding encoded image data corresponding to a plurality of bands sequentially in each band, comprising: decoding, in a decoding means (105), encoded image data for an image corresponding to a predetermined band; storing in a memory (106, 404), the decoded image data corresponding to said predetermined band prior to output; retaining, in a retaining means (203, 204), a state relating to the decoding of the encoded image data corresponding to the predetermined band by said decoding means until decoding the encoded image data corresponding to the next band following the predetermined band starts, wherein the encoded image data is encoded by a two-dimensional encoding method (ADCT 105), and wherein each band is larger in each dimension than a single two-dimensional block employed in said two-dimensional encoding method and smaller than the image to be decoded (Fig. 4, a to ℓ). An image processing method according to claim 18, wherein said two-dimensional encoding method is ADCT (adaptive discrete cosine transform). An image processing method according to claim 18 or 19, wherein said image data is colour image data. An image processing method according to claim 18, 19 or 20, further comprising the step of: supplying a printer with image data stored in said memory (106, 104). An image processing method according to any of claims 18 to 21, wherein the state of the decoding operation for the image is retained at the end of decoding a band for use when decoding the image data for the next band while other data is written into the memory (106, 104). An image processing method according to claim 22, wherein image data for plural images is decoded to be composited and stored for one band, the method comprising the steps of: retaining, in the retaining means, a corresponding state of the decoding operation for each image at the end of decoding a band, while decoding the other image(s) for the same band; and restoring said corresponding state to resume decoding of the respective image for the next band.

Inventors: KOBAYASHI SHIGETADA, KOBAYASHI, SHIGETADA, KOBAYASHI, SHIGETADA, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: H04N1
IPC codes: H04N1, G06K15