Image processing apparatus and method therefor

Abstract: Received sequentially encoded image data is converted into hierarchically encoded data having a resolution different from the sequentially encoded image data, and the converted encoded data is decoded with reference to an image of another layer. Received image data is divided into a plurality of data, and the divided data are stored. The same processing is performed for the divided data to obtain hierarchically encoded data, and obtained decoded image data is displayed on a display.

Description: BACKGROUND OF THE INVENTION The present invention relates to an image processing apparatus for processing hierarchically encoded image data, and a method therefor. First, the concept of hierarchical encoding associated with the present invention will be described below. The hierarchical encoding has as its object to grasp the outline of an entire image at an early stage, and will be described with reference to a schematic diagram of Fig. 1. A process for reducing an image 601 (a bold rectangle in Fig. 1) input at the encoder side to 1/2 in the vertical and horizontal directions is repeated n times, thereby generating n reduced images in which an image having a minimum size is reduced to 2 -n an original image in the vertical and horizontal directions. The reduction processing adopts a method of suppressing degradation of information, so that information of an entire image can be grasped even for a low-resolution image. For example, a JBIG (Joint Bi-level Image Coding Experts Group) algorithm adopts a so-called PRES method disclosed in U.S. Patent 5,159,468 as reduction processing. In this case, an original image is called a zeroth-layer image (601), and images sequentially obtained in the reduction processing are respectively called a first-layer image (602) and a second-layer image (603). In hierarchical encoding, encoded data of a layer image having a small size is decoded and displayed. The display operation is performed in the order from a layer image having the lowest resolution. In the display operation, an image multiplied with a proper enlargement magnification is displayed, so that the resolution is gradually increased as information is transmitted. For example, the second-layer image is displayed in a x4 enlarged scale in the vertical and horizontal directions, and subsequently, the first-layer image is displayed in a x2 enlarged scale in the vertical and horizontal directions. Such a display method is called a progressive display method. In the JBIG algorithm, encoding is achieved by arithmetic codes. In the JBIG algorithm, stripes obtained by dividing an image in the sub-scanning direction are defined as units of encoding, thus realizing sequential transmission. Fig. 2 is a view showing this concept assuming that the number of layers is 2. In Fig. 2, bold lines represent images. A zeroth-layer image is divided into stripes S 0.0 , S 1.0 , S 2.0 , S 3.0 , S 4.0 , S 5.0 , S 6.0 , and S 7.0 . Similarly, a first-layer image is divided into stripes S 0.1 to S 7.1 , and a second-layer image is divided into stripes S 0.2 to S 7.2 . In the JBIG algorithm, two transmission modes are available in association with stripes, as shown in Figs. 3 and 4. In Fig. 3, header information obtained by encoding the size of an original image, the number of layers, the number of scanning lines per stripe, a data format, and the like is followed by encoded data (C 0.2 to C 7.2 ) obtained by sequentially encoding the stripes (S 0.2 to S 7.2 ) of the second-layer image. Thereafter, encoded data (C 0.1 to C 7.1 ) obtained by sequentially encoding the stripes (S 0.1 to S 7.1 ) of the first-layer image with reference to the second-layer image, and encoded data (C 0.0 to C 7.0 ) obtained by sequentially encoding the stripes (S 0.0 to S 7.0 ) of the zeroth-layer image with reference to the first-layer image follow. The format of these encoded data will be referred to as a "plane data format" hereinafter. In Fig. 4, header information obtained by encoding the size of an original image, the number of layers, the number of scanning lines per stripe, a data format, and the like is followed by encoded data C 0.2 of the stripe S 0.2 of the second-layer image of the stripe S 0.0 , encoded data C 0.1 of the stripe S 0.1 of the first-layer image, which data is encoded with reference to the stripe S 0.2 of the second-layer image of the stripe S 0.0 , and encoded data C 0.0 of the stripe S 0.0 of the zeroth-layer image, which data is encoded with reference to the first-layer image of the stripe S 0.0 . Then, encoded data (C 1.2 to C 1.0 ) of the stripe S 1.0 ,.., encoded data (C 7.2 to C 7.0 ) of the stripe S 7.0 follow in the order of stripes. The format of these encoded data will be referred to as a "stripe data format" hereinafter. In general, as the number of layers is increased with respect to an original image, the total code length is increased. For example, in the JBIG algorithm, since information as an image is satisfactorily preserved even at a low resolution by the reduction algorithm, the total code length is increased. More specifically, the total code length obtained when the number of layers is 4 with respect to an original image is longer than that obtained when the number of layers is 3. Similarly, as the number of stripes is increased, the code length is increased. For example, the JBIG algorithm adopts dynamic arithmetic codes, and encoding is performed more properly as the size of an object to be encoded is larger. Therefore, when an image is divided into stripes, encoding is initialized at the beginning of each stripe, and a merit of dynamic encoding is difficult to obtain. For this reason, encoding efficiency is not improved, and the code length is increased. More specifically, the code length obtained when the number of stripes is 4 with respect to an image is longer than that obtained when the number of stripes is 2. However, in the above-mentioned processing, even when the progressive display mode or the sequential transmission mode is not required, for example, even when data are copied or moved between databases, or when data are sent, communications are performed while the number of layers or stripes remains large, resulting in high communication cost. In addition, upon sending of data, a transmitting device may wastefully transmit unnecessary layers to a receiving device. Conventionally, a terminal for receiving sequentially encoded data obtained by encoding pixel values themselves or data obtained by converting the pixel values by MMR coding or MH coding used in a communication terminal such as a facsimile apparatus, or by DPCM or vector quantization has an arrangement, as shown in, e.g., Fig. 5. In Fig. 5, reference numeral 101 denotes a communication line such as a telephone line, an ISDN, a computer network, or the like; 102, a communication interface for extracting data supplied through the communication line 101; 103, a storage device comprising, e.g., a semiconductor, a magnetic storage device, or the like; 103, a decoder for decoding sequentially encoded data to generate image data; 104, a video frame memory; 105, a display comprising a liquid crystal display, a CRT display, or the like; and 107, a recording device for recording image data on, e.g., a paper sheet. In the conventional terminal, encoded data received through the communication line 101 and the communication interface 102 is directly stored in the storage device 103, or is immediately decoded by the decoder 104, and is then recorded on, e.g., a paper sheet by the recording device 107. Also, encoded data is temporarily stored in the storage device 103, and image data stored in the storage device is written in the video frame memory 105, as needed, thereby displaying image data on the display 106. Then, image data, which must be recorded on, e.g., a paper sheet, is selected based on the displayed data, and the selected image data is output from the recording device 107. However, in the conventional communication terminal, since the resolution of the display 106 is too low as compared to the reading-recording density of image data, when sequentially encoded data is displayed while being decoded, the entire image cannot be displayed on the display 106, and a scroll display operation is required. As a result, it requires much time for a user to grasp the entire image. In order to obtain desired image data from the image data stored in the storage device 103, a user must display and search reproduced images one by one on the display 106 at a high resolution, resulting in troublesome operations and a heavy temporal load. Furthermore, sequentially encoded data cannot be directly subjected to hierarchical display or encoding. It is a concern of the present invention to provide an image processing apparatus, which realizes an easy display of images by matching the resolution of decoded image data with that of a display. It is another concern of the present invention to provide an image processing apparatus, which can save the memory capacity for storing image data obtained by decoding, and can improve communication efficiency of image data. European patent specification No. EP-A-0392753 discloses an image editing method and apparatus in which low resolution data is decoded from hierarchically encoded data for editing so that the result edited data can be used for editing higher resolution data. An article in "Signal Processing Image Communication" Vol 4 (1992) No. 2 (April) pages 103-111 discloses technical features of the JBIG standard for progressive bi-level image compression. US Patent Specification US-A-05159468 discloses an image reduction system which determines reduction pixel values by using, for each object pixel, a plurality of surrounding pixels together with pixels which have already been reduced. In accordance with a first aspect of the present invention there is provided an image processing apparatus as set out in Claim 1. In accordance with a second aspect of the invention there is provided an image processing method as set out in claim 6. Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a diagram for explaining the concept of hierarchical encoding; Fig. 2 is a view showing stripes in the JBIG algorithm; Fig. 3 is a view showing a plane data format as encoded data; Fig. 4 is a view showing a stripe data format as encoded data; Fig. 5 is a block diagram showing an arrangement of a conventional communication terminal; Fig. 6 is a block diagram showing an arrangement of an image communication receiving terminal apparatus according to the first embodiment of the present invention; Fig. 7 is a flow chart showing an operation of the terminal apparatus according to the first embodiment; Figs. 8 to 13 are flow charts showing image searching and image recording operations in the terminal apparatus according to the first embodiment; Fig. 14 is a block diagram showing an arrangement of an image communication receiving terminal apparatus according to the second embodiment of the present invention; Fig. 15 is a view showing the relationship of reference pixels in the PRES method; Figs. 16A and 16B and Figs. 17A and 17B are flow charts showing operations of the terminal apparatus according to the second embodiment; Figs. 18A to 18E are schematic views showing data write operations in a line buffer; Figs. 19A and 19B are block diagrams showing arrangements of an image communication apparatus and an encoded data converter according to the third embodiment of the present invention; Figs. 20A to 20C and Figs. 21A to 21G are flow charts showing an image communication procedure in a receiving terminal in the apparatus according to the third embodiment; Figs. 22A and 22B and Figs. 23A to 23C are flow charts showing an image communication procedure in a transmitting terminal in the apparatus according to the third embodiment; and Fig. 24 is a block diagram showing an arrangement of an image communication apparatus according to the fourth embodiment of the present invention. DESCRIPTION OF THE PREFERRED EMBODIMENTS The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. [First Embodiment] Fig. 6 is a block diagram showing an arrangement of an image communication receiving terminal apparatus (to be referred to as a terminal apparatus hereinafter) according to the first embodiment of the present invention. For the sake of descriptive simplicity of the embodiment, a binary black-and-white image is assumed to be an object to be processed. It is also assumed that sequential encoding adopts MH encoding, and a hierarchical encoding method adopts a JBIG method. Furthermore, the hierarchical encoding is performed up to a third-layer image (1/8 reduced scale). In Fig. 6, reference numeral 1 denotes a communication line; and 2, a communication interface for extracting MH-encoded image data from information input through the communication line 1. Reference numeral 3 denotes an MH decoder for decoding input MH-encoded data to generate decoded image data. Reference numeral 4 denotes a frame memory for storing decoded image data for one frame. Reference numeral 5 denotes a JBIG encoder; and 6, a storage device for storing hierarchically encoded data. Reference numeral 7 denotes a JBIG decoder for decoding hierarchically encoded data; and 8, a working memory for storing layer images (first- to third-layer images, as described above) generated upon encoding/decoding of a layer image. Reference numeral 9 denotes a video frame memory; and 10, a display for display the content of the video frame memory 9. Reference numeral 11 denotes a mouse for designating a position on the display; 12, a high-resolution printer; and 13, a CPU for controlling the operation of the image communication terminal of this embodiment. The operation of the terminal apparatus according to this embodiment will be described below with reference to the flow chart of Fig. 7. In Fig. 7, when data is transmitted from the communication line 1 to the terminal apparatus as a receiving terminal, the communication interface 2 informs the presence of incoming data to the CPU 13 (step S1-1). The CPU 13 initializes the MH decoder 3, the frame memory 4, the JBIG encoder 5, and the working memory 8, and assures an encoded data storage area in the storage device 6 (step S2-1). Note that the CPU 13 also manages image data stored in the storage device 6. The CPU 13 instructs the communication interface 2 to fetch MH-encoded data, and the fetched data is supplied to the MH decoder 3 (step S3-1). The MH decoder sequentially reads and decodes the MH-encoded data, and writes the decoded data in the frame memory 4 (step S4-1). The end of transmitted encoded data is informed from the communication interface 2 to the CPU 13 (step S5-1). After the MH decoder 3 decodes all the fetched image data, the CPU 13 operates the JBIG encoder 5 (step S6-1) to generate layer images in the order of first-, second-, and third-layer images, and stores these images in the working memory 8 (step S7-1). Thereafter, the JBIG encoder 5 reads out the third-layer image from the working memory 8, encodes the readout image, and stores the encoded data in a predetermined area of the storage device 6 on the basis of an instruction from the CPU 13 in step S8-1. Subsequently, the encoder 5 reads out the second-layer image from the working memory 8, encodes the readout image with reference to the third-layer image simultaneously read out from the working memory 8, and stores the encoded data in a predetermined area of the storage device 6 on the basis of an instruction from the CPU 13 (step S9-1). Similarly, the encoder 5 encodes the first-layer image, and stores the encoded data in a predetermined area of the storage device 6 on the basis of an instruction from the CPU 13 (step S10-1). Finally, the JBIG encoder 5 reads out a zeroth-layer image from the frame memory 4, encodes the readout image with reference to the first-layer image read out from the working memory 8, and stores the encoded data in a predetermined area of the storage device 6 on the basis of an instruction from the CPU 13 (step S11-1). Upon completion of encoding of the zeroth-layer image, the data reception operation from the communication line 1 is ended. The operations in image searching and image recording modes in the terminal apparatus according to this embodiment will be described below. Figs. 8 to 13 are flow charts showing the operations of the CPU 13 in the image searching and image recording modes. In the terminal apparatus of this embodiment, the display 10 displays an icon for designating a searching mode according to an instruction from the CPU 13. A user selects the icon for designating the searching mode by, e.g., clicking it using the mouse 11 (step S21-1 in Fig. 8). The CPU 13 initializes the JBIG decoder 7, and clears the video frame memory 9 upon detection of this selection (step S22-1). Note that a portion obtained by excluding a margin portion for displaying icons from the entire screen of the display 10 is divided into eight portions, and icons "next page", "UP", "print", and "end" are displayed on the margin portion (step S26-1). In steps S23-1 and S24-1, the CPU 13 sequentially reads out encoded data of third-layer images of a maximum of eight non-displayed images from the storage device 6 in the order of registration. The CPU 13 supplies the readout data to the JBIG decoder 7 to reproduce the third-layer images, writes the reproduced images in the divided areas on the video frame memory 9 so as not to overlap each other, and causes the display 10 to display the content of the memory 9. A user observes the displayed images, and if desired data is not displayed, he or she clicks the icon "next page" using the mouse 11 (step S27-1). Upon detection of this clicking, the CPU 13 clears the video frame memory 9 (step S51-1 in Fig. 9), reads out encoded data of third-layer images of the next eight images from the storage device 6 in the order of registration, and executes the same display processing as described above (step S52-1). On the other hand, when the user cannot determine based on the third-layer images whether or not a given displayed image is a desired image, and wants to display the image at a higher resolution, he or she clicks the corresponding third-layer image, and then clicks the icon "UP" (step S28-1). Upon detection of this clicking, the CPU 13 clears the video frame memory 9 (step S61-1), and reads out encoded data of the third-layer image of the selected image from the storage device 6. The CPU 13 causes the JBIG decoder 7 to decode the readout data, and writes the decoded third-layer image in the working memory 8 (step S62-1). Then, the CPU 13 reads out encoded data of the second-layer image of the selected image, causes the JBIG decoder 7 to decode the readout data with reference to the third-layer image in the working memory 8, writes the decoded second-layer image in an area, excluding the icon display margin area, of the video frame memory 9, and causes the display 10 to display the content of the memory 9 (step S63-1). When the size of the second-layer image exceeds the size of the display, it is partially displayed. In step S64-1, the CPU 13 causes the display 10 to display the icons "UP", "print", and "return" on the icon margin portion on the screen. When the user cannot determine based on the second-layer image whether or not the displayed image is a desired image, and wants to display the image at a higher resolution, he or she selects the icon "UP" (step S65-1). Upon detection of the selection of this icon, the CPU 13 causes the display to display the first-layer image by the same processing as the above-mentioned processing (step S71-1 in Fig. 11). After the processing in step S71-1, when the user further selects the icon "UP" (step S72-1), the control enters processing shown in Fig. 13. On the other hand, when the user determines that the displayed image is a desired image, and wants to print the displayed image, he or she clicks the icon "print" in step S66-1. Upon detection of this clicking, the CPU 13 reads out encoded data of an image having a higher resolution than that of the selected image from the storage device 6, causes the JBIG decoder 7 to decode the read out data with reference to the layer image in the working memory 8, and writes the decoded data in the working memory 8. The CPU 13 repeats these operations until the corresponding zeroth-layer image is decoded (steps S83-1 and S84-1 in Fig. 12). Upon completion of decoding of the zeroth-layer image, the CPU 13 sequentially reads out the zeroth-layer image from the working memory 8, and supplies the readout image to the high-resolution printer 12. The high-resolution printer 12 prints the input image data on a paper sheet as a recording medium (step S85-1). When the user determines that the displayed image is not a desired image, and clicks the icon "return" using the mouse 11, the CPU 13 clears the video frame memory 9, reads out encoded data of the eight third-layer images which were displayed before the cleared second-layer image from the storage device 6, and executes the same display processing as the initial third-layer image display processing (step S23-1). When the user can determine a desired image from the displayed third-layer images, he or she clicks the desired third-layer image using the mouse 11, and then clicks the icon "print" (step S29-1). Upon detection of clicking of the icon "print", the CPU 13 reads out encoded data of the selected third-layer image from the storage device 6, supplies the readout data to the JBIG decoder 7, and writes the decoded image in the working memory 8 (step S81-1 in Fig. 12). Subsequently, in step S82-1, the CPU 13 reads out encoded data of the corresponding second-layer image from the storage device 6, supplies the readout data to the JBIG decoder 7 to decode the data with reference to the third-layer image in the working memory 8, and writes the decoded image in the working memory 8. Furthermore, in step S83-1, the CPU 13 reads out encoded data of the corresponding first-layer image from the storage device 6, supplies the readout data to the JBIG decoder 7 to decode the data with reference to the second-layer image in the working memory 8, and writes the decoded image in the working memory 8. In step S84-1, the CPU 13 reads out encoded data of the corresponding zeroth-layer image from the storage device 6, supplies the readout data to the JBIG decoder 7 to decode the data with reference to the first-layer image in the working memory 8, and writes the decoded image in the working memory 8. In this manner, upon completion of decoding of the zeroth-layer image, the CPU 13 sequentially reads out the zeroth-layer image from the working memory 8, and supplies the readout data to the high-resolution printer 12. The high-resolution printer 12 prints the input image data on a paper sheet (step S85-1). When the searching operation is completed, the user selects the icon "end" using the mouse 11. Upon detection of this selection, the CPU 13 clears the video frame memory 9, and displays the icon "search", thus ending the searching printing operation. As described above, according to this embodiment, sequentially encoded received image data is converted into encoded data having different resolutions using hierarchical encoding, and the encoded data is decoded with reference to a layer image of another layer until a desired image is obtained, thus easily realizing an image display operation matching with the resolution of the display. [Second Embodiment] The second embodiment of the present invention will be described below. Fig. 14 is a block diagram showing an arrangement of an image communication receiving terminal apparatus (to be referred to as a terminal apparatus hereinafter) according to the second embodiment of the present invention. The same reference numerals in Fig. 14 denote the same parts as in the terminal apparatus according to the first embodiment, and a detailed description thereof will be omitted. Like in the first embodiment, a binary black-and-white image is assumed to be an object to be processed. It is also assumed that sequential encoding adopts MH encoding, and a hierarchical encoding method adopts a JBIG method. Furthermore, the hierarchical encoding is performed up to a third-layer image (1/8 reduced scale). Referring to Fig. 14, reference numerals 21a and 21b denote line buffers each for 33 lines. Reference numeral 22a denotes a line buffer for 17 lines (1/2 length) of a first-layer image generated based on a zeroth-layer image; 22b, a line buffer for nine lines (1/4 length) of a second-layer image; and 22c, a line buffer for four lines (1/8 length) of a third-layer image. Reference numeral 23 denotes an image reduction unit for reducing an image to 1/2 in the vertical and horizontal directions according to an image reduction algorithm (PRES method) used in the JBIG algorithm. Fig. 15 shows the relationship of reference pixels in the PRES method. In Fig. 15, each square box represents a pixel of a high-resolution layer image, and a circle in the box represents a pixel of a low-resolution layer image. In this case, a pixel to be reduced (a pixel with "?" in Fig. 15) is determined with reference to 3 x 3 pixels (denoted by reference numerals 1 to 9) of the high-resolution layer image and 3 pixels (denoted by reference symbols A to C) of the low-resolution layer image within a bold frame. In Fig. 14, reference numeral 24 denotes an arithmetic encoder for arithmetic-encoding a third-layer image without referring to an image of another layer, and arithmetic-encoding a layer image other than the third-layer image with reference to a layer image having a lower resolution than that of the image to be encoded by one layer. An operation executed when encoded data is input from a communication line 1 in the terminal apparatus of this embodiment will be described below. Figs. 16A and 16B and Figs. 17A and 17B are flow charts showing an operation of a CPU 13 of the terminal apparatus according to this embodiment. In Fig. 16A, when data is transmitted from the communication line 1 to a receiving terminal, a communication interface 2 informs the presence of incoming data to the CPU 13 (step S101-1). Then, the CPU 13 initializes an MH decoder 3, the line buffers 21a, 21b, 22a, 22b, and 22c, and the arithmetic encoder 24, and assures encoded data storage areas of layer images in a storage device 6 (step S102-1). In step S103-1, the CPU 13 instructs the communication interface 2 to fetch MH-encoded data, and the fetched data is supplied to the MH decoder 3. The MH decoder 3 sequentially reads and decodes the MH-encoded data, and writes the decoded data in one of the line buffers 21a and 21b (steps S104-1 and S105-1). The operation of the CPU 13 of the terminal apparatus will be described below with reference to Figs. 18A to 18E, which show data write operations in the line buffers 21a and 21b. The first image data decoded by the MH decoder 3 is written in the second line of the line buffer 21a (see Fig. 18A). Note that the first line of the line buffer 21a is filled with data "0" representing white pixels upon initialization by the CPU 13. Then, the output from the MH decoder 3 is stored in the second to the 32nd lines of the line buffer 21a in units of lines (Fig. 18B). Data for the 33rd line is simultaneously written in the 33rd line of the line buffer 21a and the first line of the line buffer 21b (Fig. 18C). Upon completion of the write access to the 33rd line of the line buffer 21a, the line buffer 21a is set in a read mode. Subsequently, data for the 34th to 64th lines of the decoded image are stored in the line buffer 21b (step S113-1). At the same time, a zeroth-layer image in the line buffer 21a is reduced until a third-layer image is obtained, and encoded data obtained from the respective layer image data are stored in the storage device 6 according to an instruction from the CPU 13. The image reduction unit 23 generates data for 16 lines of a first-layer image on the basis of the zeroth-layer image stored in the line buffer 21a, and stores the generated data in the second to 17th lines of the line buffer 22a (step S106-1). The first line of the line buffer 22a is filled with data "0" representing white pixels upon initialization by the CPU 13. After the first-layer image is generated up to the 17th line of the line buffer 22a, the image reduction unit 23 generates data for eight lines of a second-layer image on the basis of the first-layer image stored in the line buffer 22a, and stores the data in the second to ninth lines of the line buffer 22b (step S107-1). The first line of the line buffer 22b is filled with data "0" representing white pixels upon initialization by the CPU 13. After the second-layer image is generated up to the ninth line of the line buffer 22b, the image reduction unit 23 generates data for four lines of a third-layer image on the basis of the second-layer image stored in the line buffer 22b, and stores the data in the second to fifth lines of the line buffer 22c (step S109-1). The first line of the line buffer 22c is filled with data "0" representing white pixels upon initialization by the CPU 13. Parallel to this processing, the arithmetic encoder 24 encodes the zeroth-layer image in the line buffer 21a with reference to the first-layer image in the line buffer 22a. These encoded data are stored in an area on the storage device 6, which area is designated by the CPU 13 so as to store encoded data for 32 lines of the zeroth-layer image (step S108-1). The arithmetic encoder 24 then encodes the first-layer image in the line buffer 22a with reference to the second-layer image in the line buffer 22b, and the CPU 13 stores the encoded data in an area on the storage device 6, which area is designated to store encoded data for 16 lines of the first-layer image (step S110-1). Subsequently, the arithmetic encoder 24 encodes the second-layer image in the line buffer 22b with reference to the third-layer image in the line buffer 22c, and stores the encoded data in an area on the storage device 6, which area is designated by the CPU 13 to store encoded data for eight lines of the second-layer image (step S111-1). The arithmetic encoder 24 encodes the third-layer image in the line buffer 22c, and stores the encoded data in an area on the storage device 6, which area is designated by the CPU 13 to store encoded data for four lines of the third-layer image (step S112-1). The CPU 13 manages information for four lines of the third-layer image, information for eight lines of the second-layer image, information for 16 lines of the first-layer image, and information for 32 lines of the zeroth-layer image as a group of information. Upon completion of encoding of the third-layer image, data in the final lines of the line buffers 22a and 22b are transferred to their first lines (step S202-1 in Fig. 17A). Note that the line buffer 21a is cleared. When the output from the MH decoder 3 reaches the 32nd line of the line buffer 22b (Fig. 18D), the line buffer 21a is set in a write mode, and the same line data is written in the 33rd line of the line buffer 21b, and the first line of the line buffer 21a (Fig. 18E) (step S203-1). Upon completion of this write access, the line buffer 21b is set in the read mode. Subsequently, data for the next 32 lines of the decoded image are stored in the line buffer 21a. During this interval, the zeroth-layer image in the line buffer 21b is sequentially reduced until the third-layer image is obtained, and encoded data obtained from the respective layer image data are stored in the storage device 6 according to an instruction from the CPU 13. In this case, the image reduction unit 23 generates data for 16 lines of the first-layer image on the basis of the zeroth-layer image stored in the line buffer 21b, and stores the data in the second to 17th lines of the line buffer 22a (step S204-1). After the first-layer image is generated up to the 17th line of the line buffer 22a, the image reduction unit 23 generates data for eight lines of the second-layer image on the basis of the first-layer image stored in the line buffer 22a, and stores the data in the second to ninth lines of the line buffer 22b (step S205-1) . After the second-layer image is generated up to the ninth line of the line buffer 22b, the image reduction unit 23 generates data for four lines of the third-layer image on the basis of the second-layer image stored in the line buffer 22b, and stores the data in the second to fifth lines of the line buffer 22c (step S207-1). Parallel to this processing, the arithmetic encoder 24 encodes the zeroth-layer image in the line buffer 21b with reference to the first-layer image in the line buffer 22a. The encoded data are stored in the area on the storage device 6, which area is designated by the CPU 13 so as to store encoded data for 32 lines of the zeroth-layer image (step S206-1). Then, the arithmetic encoder 24 encodes the first-layer image in the line buffer 22a with reference to the second-layer image in the line buffer 22b, and stores the encoded data in the area on the storage device 6, which area is designated by the CPU 13 so as to store encoded data for 16 lines of the first-layer image (step S208-1 in Fig. 17B). Subsequently, the arithmetic encoder 24 encodes the second-layer image in the line buffer 22b with reference to the third-layer image in the line buffer 22c, and stores the encoded data in the area on the storage device 6, which area is designated by the CPU 13 so as to store encoded data for eight lines of the second-layer image (step S209-1). The arithmetic encoder 24 encodes the third-layer image in the line buffer 22c, and stores the encoded data in the area on the storage device 6, which area is designated by the CPU 13 so as to store encoded data for four lines of the third-layer image (step S210-1). The CPU 13 manages information for four lines of the third-layer image, information for eight lines of the second-layer image, and information for 16 lines of the first-layer image, and information for 32 lines of the zeroth-layer image as a group of information. Upon completion of encoding of the third-layer image in the line buffer 22c, data in the final lines of the line buffers 22a and 22b are transferred to their first lines (step S213-1). Note that the line buffer 21b is cleared. The above-mentioned processing is repeated to execute encoding in units of 32 lines of the zeroth-layer image, and encoded data are managed on the storage device 6. After encoding of the final third-layer image is completed, the reception operation from the communication line 1 is ended. The operations in the image searching and recording modes in the storage device 6 are performed in the same manner as in the first embodiment, and will be described below without using figures. More specifically, encoded data for four lines of each of third-layer images are sequentially read out from the storage device in the registration order of the third-layer images, and eight images are displayed. When a user cannot determine based on the third-layer images whether or not a given displayed image is a desired image, and wants to display an image at a higher resolution, he or she clicks the corresponding third-layer image, and then clicks an icon "UP". Upon detection of this clicking, the CPU 13 clears a video frame memory 9, sequentially reads out encoded data for four lines of the selected third-layer image, causes a JBIG decoder 7 to decode the readout data, and writes the decoded third-layer image in the line buffer 22c. Then, the CPU 13 reads out encoded data for eight lines of the second-layer image at the same position of the selected image, and causes the JBIG decoder 7 to decode the readout data with reference to the third-layer image in the line buffer 22c. The CPU 13 then writes the decoded second-layer image data for eight lines at the corresponding position in an area, excluding an icon display margin area, of the video frame memory 9, and causes a display 10 to display the written data. Thereafter, the CPU 13 sequentially processes data for the subsequent eight lines of the second-layer image, and causes the display 10 to display the processed data. When the size of the second-layer image exceeds the display size, the CPU 13 interrupts decoding, and causes the display to display icons "UP", "print", and "return" on the icon display margin portion. When the user cannot determine based on the second-layer image whether or not the displayed image is a desired image, and wants to display the image at a higher resolution, he or she selects the icon "UP". Upon detection of this selection, the CPU 13 causes the display to display the first-layer image in the same manner as described above. When the user determines that the displayed image is a desired image, and wants to print the image, he or she clicks the icon "print". Upon detection of clicking of this icon, the CPU 13 inputs image data for four lines of the third-layer image of the selected image to the JBIG decoder 7, causes the decoder 7 to decode the input data, and writes the decoded data in the line buffer 22c. The CPU 13 inputs encoded data for eight lines of the second-layer image at the same position to the JBIG decoder 7, causes the decoder 7 to decode the input data with reference to the third-layer image in the line buffer 22c, and writes the decoded data in the line buffer 22b. Similarly, the CPU 13 inputs encoded data for 16 lines of the first-layer image at the same position to the JBIG decoder 7, causes the decoder 7 to decode the input data with reference to the second-layer image in the line buffer 22b, and writes the decoded data in the line buffer 22a. Furthermore, the CPU 13 inputs encoded data for 32 lines of the zeroth-layer image at the same position to the JBIG decoder 7, causes the decoder 7 to decode the input data with reference to the first-layer image in the line buffer 22a, and supplies the decoded data to a buffer memory 25. In this manner, the CPU 13 reads out encoded data of images having higher resolutions from the storage device 6, causes the JBIG decoder 7 to decode the readout data with reference to the layer images in the line buffers 22a, 22b, and 22c, and writes decoded data in the buffer memory 25. The CPU 13 sequentially reads out the zeroth-layer image from the buffer memory 25, and supplies the readout image to a high-resolution printer 12. The high-resolution printer 12 prints the supplied image data on a recording sheet. When the user determines that the image displayed on the display is not desired image data, he or she clicks the icon "return" using a mouse 11. Upon detection of this clicking, the CPU 13 clears the video frame memory 9, reads out encoded data of the eight third-layer images which were displayed before the cleared second-layer image from the storage device 6, and executes the same display processing as the initial third-layer image display processing. When the user can determine a desired image from the displayed third-layer images, he or she clicks the desired third-layer image using the mouse 11, and then clicks the icon "print". Upon detection of clicking of the icon "print", the CPU 13 reads out encoded data of the selected third-layer image from the storage device 6, supplies the readout data to the JBIG decoder 7, and writes the decoded image in the line buffer 22c. Subsequently, the CPU 13 reads out encoded data of the corresponding second-layer image from the storage device 6, supplies the readout data to the JBIG decoder 7 to decode the data with reference to the third-layer image in the line buffer 22c, and writes the decoded image in the line buffer 22b. Furthermore, the CPU 13 reads out encoded data of the corresponding first-layer image from the storage device 6, supplies the readout data to the JBIG decoder 7 to decode the data with reference to the second-layer image in the line buffer 22b, and writes the decoded image in the line buffer 22a. The CPU 13 reads out encoded data of the corresponding zeroth-layer image from the storage device 6, supplies the readout data to the JBIG decoder 7 to decode the data with reference to the first-layer image in the line buffer 22a, and writes the decoded image in the buffer memory 25. The CPU 13 sequentially reads out the zeroth-layer image from the buffer memory 25, and supplies the image to the high-resolution printer 12. The high-resolution printer 12 prints the input image data on a recording sheet. When the user can determine a desired image from the third-layer images, he or she clicks the desired third-layer image using the mouse 11, and then clicks the icon "print". Upon detection of clicking of this icon, the CPU 13 reads out encoded data of the selected image, inputs the readout data to the JBIG decoder 7 to generate a decoded image in units of 32 lines using the line buffers 22a, 22b, and 22c, and causes the high-resolution printer 12 to print the decoded image on a recording sheet. As described above, according to this embodiment, after received image data is divided into a plurality of areas, and the divided data are stored, the data are converted into hierarchically encoded data, and the encoded data are decoded with reference to an image of another layer until a desired image is obtained, thus saving the memory capacity for storing image data. In each of the first and second embodiments, processing for a binary black-and-white image has been described. However, the present invention is not limited to this. For example, an image to be processed may be a multi-value image. The sequential encoding is not limited to MH encoding. For example, data may be encoded by various other encoding methods, for example, MMR encoding or arithmetic encoding for binary data, or DPCM, DCT transform encoding, or vector quantization for multi-value data. As the communication line, an analog line, an ISDN line, and the like may be used. As the printer, a page printer such as a laser beam printer, a thermal transfer printer, or the like, a serial printer such as an inkjet printer (including a bubble-jet printer), or the like, may be used. Input sequentially encoded image data is not limited to MH-encoded data, but may be data encoded by an MR, MMR, or so-called ADCT method. In particular, when ADCT data is input, since DC and AC components are sequentially transmitted in units of predetermined block lines, they may be separated into DC and AC components, and may be stored for one frame. Furthermore, the present invention is not limited to the specific encoding unit, and hence, is not limited to the specific capacities of the line buffers of the second embodiment. [Third Embodiment] The third embodiment of the present invention will be described in detail below. Figs. 19A and 19B show arrangements of an image communication apparatus and an encoded data converter according to this embodiment. In Figs. 19A and 19B, reference numerals 301 and 331 denote storage devices comprising, e.g., magnetic storage devices for storing hierarchically encoded image data. Reference numerals 302 and 332 denote CPUs for controlling the corresponding apparatuses; and 303 and 333, buses for transmitting encoded data, instructions from the CPUs 302 and 332, and the like. Reference numerals 304, 312, 334, 342, and 344 denote buffers each for storing encoded data for one image. Reference numerals 305, 306, 335, and 336 denote selectors. Of these selectors, the selectors 305 and 336 are selectors for outputting one input to one of three outputs, and the selectors 306 and 335 are selectors for selecting one of three inputs, and outputting the selected input. For the sake of descriptive convenience, the above-mentioned JBIG algorithm of the binary image hierarchical encoding method will be exemplified as an encoding method. Reference numerals 307 and 337 denote header information processing units, each of which analyzes a header portion of encoded data, and can change the content of header information according to an instruction from the CPU 302 or 332. Reference numerals 308 and 338 denote decoders for decoding encoded data to generate a reproduced image. Reference numerals 309, 311, and 339 denote frame buffers for storing a reproduced image. Reference numeral 310 denotes an encoder for reading and encoding an image. Reference numeral 340 denotes an encoder for reading an image to generate a reduced image, and encoding the reduced image. Reference numeral 341 denotes a frame memory for storing the reduced image generated by the encoder 340. Reference numerals 313 and 343 denote communication interfaces for exchanging, e.g., encoded data with a communication line. Reference numeral 314 denotes a communication line such as an ISDN, a telephone line, a computer network or the like. Reference numerals 315 and 345 denote data lines. Portions surrounded by dotted lines 316 and 354 correspond to encoded data converters. Reference numeral 350 denotes a decoder for decoding hierarchically encoded data; and 351, a frame memory for storing an intermediate layer image for decoding. Reference numeral 352 denotes a video frame memory for storing a decoded image; and 353, a display for displaying the content of the video frame memory 352. Reference numeral 355 denotes a line buffer for storing a decoded image for a plurality of lines; and 356, a printer. In the apparatus of this embodiment, an image communication at a receiving terminal is performed in procedures shown in Figs. 20A to 20C and Figs. 21A to 21G, and an image communication at a transmitting terminal is performed in procedures shown in Figs. 22A and 22B and Figs. 23A to 23C. The CPU 332 of the receiving terminal sends a desired image and an object as a request onto the communication line 314 via the bus 333 and the communication interface 343 (S001 in Fig. 20A). The encoded data request is input to the communication interface 313. The communication interface 313 informs the presence of the incoming request to the CPU 302 via the bus 303 (S101 in Fig. 22A). The CPU 302 checks if the object of the request is to perform a progressive display operation, a sequential transmission operation, or an all-layer data transfer operation (S102). If the object of the request is to perform the progressive display operation, the CPU 302 instructs the selector 305 to select the data line 315 as its output, and the selector 306 to select the data line 315 as its input (S103). Encoded data of an nth-layer image having the lowest resolution in the plane data format of the request image is read out from the storage device 301, and is stored in the buffer 304 via the bus 303 (S104). Then, the content of the buffer 304 is stored in the buffer 312 via the data line 315 (S105). Thereafter, the content of the buffer 312 is sent onto the communication line 314 via the communication interface 313 (S106). The CPU 332, which issued the request, receives encoded data at the communication interface 343 via the communication line 314, and the communication interface 343 informs the presence of incoming encoded data to the CPU 332 (S002). The CPU 332 stores encoded data of the nth-layer image in the buffer 342 (S003). Since the object of the communication is to perform the progressive display operation, the CPU 332 switches the output of the selector 336 to the data line 345, and switches the input of the selector 335 to the data line 345 according to the checking result in step S004 (S005). The CPU 332 writes the encoded data of the nth-layer image stored in the buffer 342 in the buffer 334 via the data line 345 (S006). The CPU 332 sends the encoded data to the decoder 350 via the bus 333, and the decoder 350 decodes the input encoded data (S007). A decoded image is written in the frame memory 351 and the video frame memory 352, and is displayed on the display 353 (S008). Furthermore, when a user instructs to display a layer image having a higher resolution in step S009, the CPU 332 sends a request for the same image with the object to perform the progressive display to the transmitting terminal via the communication interface 343 (S010). The communication interface 313 of the transmitting terminal receives the request, and sends the received request to the CPU 302 (S107 in Fig. 22B). Since the request is a request for the next layer, the CPU 302 reads out encoded data of the next layer from the storage device 301, and sends the readout data to the buffer 304 (S109). The CPU 302 then stores the content of the buffer 304 in the buffer 312 via the data line 315 (S110). The CPU then sends the content of the buffer 312 via the communication interface 313 and the communication line 314 in the same manner as described above (S106). The communication interface 343 receives encoded data sent from the transmitting terminal, and informs the presence of incoming data to the CPU 332 (S011 in Fig. 20B). The CPU 332 reads encoded data of the next layer image from the interface 343, and stores the read data in the buffer 342 (S012). The CPU 332 writes the encoded data of the next layer image in the buffer 334 via the data line 345 (S013), and thereafter, sends the encoded data to the decoder 350 via the bus 333. The decoder 350 decodes the input encoded data with reference to a decoded image in the frame memory 351 (S014). The CPU 332 writes the decoded image in the frame memory 351 and the video frame memory 352, and causes the display 353 to display the decoded image (S008). The above-mentioned processing is repeated until a layer which satisfies a user appears. Upon completion of the display of the layer which satisfies the user, the CPU 332 sends a message indicating the end of communication onto the communication line 314 via the bus 333 and the communication interface 343 (S024), and ends the communication. The message indicating the end of communication is fetched via the communication interface 313, and is supplied to the CPU 302 (S107). Thus, the CPU 302 ends the transmission. On the other hand, when the request from the CPU 332 indicates the sequential transmission, the CPU 302 instructs the selector 305 to select the data line 315 as its output, and the selector 306 to select the data line 315 as its input (S111 in Fig. 22A). The CPU 302 reads out encoded data, in the sequential data format, of the requested image from the storage device 301, and sends the data in the order from the first stripe to the buffer 304 via the bus 303 (S112). The CPU 302 then stores the content of the buffer 304 in the buffer 312 via the data line 315 (S113). Thereafter, the CPU 302 sends the content of the buffer 312 onto the communication line 314 via the communication interface 313, thus ending the communication (S114). At the receiving terminal, the communication interface 343 receives the encoded data via the communication line 314, and informs the presence of incoming data to the CPU 332 (S002). The CPU 332 stores header information and encoded data of layer images in the buffer 342 in the order from the first stripe (S003). In this case, since the object of the communication is to perform the sequential transmission, the CPU 332 switches the output of the selector 336 to the data line 345, and switches the input of the selector 335 to the data line 345 (S015). The CPU 332 writes the encoded data in the sequential data format in the buffer 334 via the data line 345 (S016). The CPU 332 sends the encoded data of the first stripe to the decoder 350 via the bus 333, and the decoder 350 decodes the input encoded data (S017). The CPU 332 writes the decoded image in the line buffer 355 (S018). Thereafter, the CPU 332 starts the printer 356, and causes the printer 356 to print the content of the line buffer 355 (S019). Subsequently, the CPU 332 reads out the encoded data of the next stripe up to the zeroth layer from the buffer 334 via the bus 333, and sends the readout data to the decoder 350. The decoder 350 decodes the input encoded data (S021). The CPU 332 writes the stripe data of the decoded image in the line buffer 355 (S022), and the decoded image is output to the printer 356. If it is determined in step S020 that decoding of encoded data of all the stripes is completed, the CPU 332 stops the printer 356 (S023), and ends the communication. On the other hand, if the request from the CPU 332 indicates the all-layer data transfer operation, the CPU 302 reads out encoded data of all the layers of the requested image, and sends the readout data to the buffer 304 via the bus 303 (S115 in Fig. 23A). The CPU 302 processes header information first. The CPU 302 instructs so that the output from the selector 305 is selected as the input to the header information processing unit 307, and the output from the header information processing unit 307 is selected as the input to the selector 306 (S116). The CPU 302 fetches header information from the buffer 304, and sends it to the header information processing unit 307 via the selector 305 (S117). The header information processing unit 307 analyzes the header information, reads out the data format of the encoded data, and supplies the readout data format to the CPU 302 (S118). The CPU 302 checks if the data format of encoded data to be transmitted is the plane data format or the sequential data format (S119). First, a case will be described below wherein the data format of encoded data to be transmitted is the plane data format. For the sake of simplicity, the number of layers of images in the plane data format stored in the storage device 301 is assumed to be 4. Similarly, the number of layers in a communication is set to be 2. The CPU 302 determines that the number of layers of encoded data to be transmitted is set to be 2, requests the header information processing unit 307 to change the header information, and the header information processing unit 307 changes the header information to have the number of layers = 2. The changed header information is output to the buffer 312 via the selector 306 (S120). Then, changing processing of encoded data of the fourth- to second-layer images in the plane data format is executed. The CPU 302 instructs to select the encoded data converter 316 as the output of the selector 305 and the input of the selector 306 (S121). The CPU 302 reads out encoded data of the fourth-layer image from the buffer 304, and inputs the readout data to the decoder 308 via the selector 305 (S122). The decoder 308 decodes the input data, and stores the reproduced image in the frame memory 309 (S123). Subsequently, the CPU 302 reads out encoded data of the third-layer image from the buffer 304, and inputs the readout data to the decoder 308 via the selector 305 (S124). The decoder 308 decodes the encoded data of the third-layer image with reference to the fourth-layer image stored in the frame memory 309, and stores the reproduced image in the frame memory 311 (S125). Then, the CPU 302 reads out encoded data of the second-layer image from the buffer 304, and inputs the readout data to the decoder 308 via the selector 305 (S126). The decoder 308 decodes the encoded data of the second-layer image with reference to the third-layer image stored in the frame memory 311, and stores the reproduced image in the frame memory 309 (S127). The CPU 302 supplies the content of the frame memory 309 to the encoder 310 to perform encoding without referring to another layer image, and stores the encoded data after the header information in the buffer 312 via the selector 306 (S128). Finally, the CPU 302 performs processing of encoded data of the first- and zeroth-layer images in the plane data format. The CPU 302 instructs to select the data line 315 as the output of the selector 305 and the input of the selector 306 (S129). The CPU 302 reads out the encoded data of the first-layer image from the buffer 304, and stores the readout data after the encoded data of the second-layer image in the buffer 312 via the data line 315 (S130). Furthermore, the CPU 302 reads out the encoded data of the zeroth-layer image from the buffer 304, and stores the readout data after the encoded data of the first-layer image in the buffer 312 via the data line 315 (S131). Thereafter, the CPU 302 sends the content of the buffer 312 onto the communication line 314 via the communication interface 313 (S132), thus completing the transmission. The CPU 332, which issued the request, receives the encoded data via the communication line 314 at the communication interface 343, and the communication interface 343 informs the presence of incoming data to the CPU 332 (S002 in Fig. 20A). The CPU 332 stores the encoded data of all the layer images in the buffer 342 (S003). In this case, since the object of the communication is to perform the all-layer data transfer operation, the CPU 332 performs processing of header information first. The CPU 332 instructs so that the output from the selector 336 is selected as the input to the header information processing unit 337, and the output from the header information processing unit 337 is selected as the input to the selector 335 (S025 in Fig. 21A). The CPU 332 reads out header information from the buffer 342, and supplies the readout information to the header information processing unit 337 via the selector 336 (S026). The header information processing unit 337 analyzes the header information, reads out the data format of the encoded data, and supplies the readout data format to the CPU 332 (S027). In this case, since the data format is the plane data format, the CPU 332 causes the header information processing unit 337 to read out the number of layers (S029). In this case, the number of layers is 2. For the sake of simplicity, the number of layers of encoded data of images to be stored in the storage device 331 is assumed to be 5. The CPU 302 determines that the number of layers of encoded data to be stored is set to be 5, and requests the header information processing unit 337 to change the header information. The header information processing unit 337 changes the header information to have the number of layers = 5, and outputs the changed header information to the buffer 334 via the selector 335 (S030). Then, the CPU 332 performs processing of encoded data of the second-layer image in the buffer 342. The CPU 332 instructs so that the output from the selector 336 is selected as the input of the decoder 338 of the encoded data converter 354, and the output from the encoder 340 of the encoded data converter 354 is selected as the input to the selector 335 (S031). The CPU 332 reads out encoded data of the second-layer image having the lowest resolution from the buffer 342, and supplies the readout data to the decoder 338 via the selector 336 (S032). The decoder 338 decodes the encoded data of the second-layer image, and stores the reproduced second-layer image in the frame memory 339 (S033). Encoded data of the second- to fifth-layer images are generated based on the obtained second-layer image. The encoder 340 generates the third-layer image on the basis of the second-layer image in the frame memory 339, and stores the generated image in the frame memory 341 (S034). Subsequently, the encoder 340 encodes the second-layer image in the frame memory 339 with reference to the third-layer image stored in the frame memory 341, and stores the encoded data in the buffer 344 (S035). Subsequently, the encoder 340 generates the fourth-layer image on the basis of the third-layer image in the frame memory 341, and stores the generated image in the frame memory 339 (S036). Thereafter, the encoder 340 encodes the third-layer image in the frame memory 341 with reference to the fourth-layer image stored in the frame memory 339, and stores the encoded data of the third-layer image after the encoded data of the second-layer image in the buffer 344 (S037). Furthermore, the encoder 340 generates the fifth-layer image on the basis of the fourth-layer image in the frame memory 339, and stores the generated image in the frame memory 341 (S038). Thereafter, the encoder 340 encodes the fourth-layer image in the frame memory 339 with reference to the fifth-layer image stored in the frame memory 341, and stores the encoded data of the fourth-layer image after the encoded data of the third-layer image in the buffer 344 (S039). The encoder 340 encodes the fifth-layer image in the frame memory 341, and stores the encoded data of the fifth-layer image in the buffer 344 after the encoded data of the fourth-layer image (S040). The encoded data of the fifth-layer image is read out from the buffer 344, and is stored after the header information in the buffer 334 via the selector 335 (S041). The encoded data of the fourth-layer image is read out from the buffer 344, and is stored after the encoded data of the fifth-layer image in the buffer 334 via the selector 335 (S042). Furthermore, the encoded data of the third-layer image is read out from the buffer 344, and is stored after the encoded data of the fourth-layer image in the buffer 334 via the selector 335 (S043). Moreover, the encoded data of the second-layer image is read out from the buffer 344, and is stored after the encoded data of the third-layer image in the buffer 334 via the selector 335 (S044). Finally, processing of encoded data of the first- and zeroth-layer images is performed. The CPU 332 instructs to select the data line 345 as the output of the selector 336 and the input of the selector 335 (S045). The CPU 332 reads out the encoded data of the first-layer image from the buffer 342, and stores the readout data after the encoded data of the second-layer image in the buffer 334 via the data line 345 (S046). Furthermore, the CPU 332 reads out the encoded data of the zeroth-layer image from the buffer 342, and stores the readout data after the encoded data of the first-layer image in the buffer 334 via the data line 345 (S047). Thereafter, the CPU 332 reads out the content of the buffer 334, and stores the readout data in the storage device 331 as encoded data of all the layer images in the plane data format via the communication bus 333 (S048). Thus, the CPU 332 completes the communication, and manages the encoded data A case will be described below wherein the data format of encoded data to be transmitted is the sequential data format. For the sake of simplicity, the number of stripes of images in the sequential data format stored in the storage device 301 is assumed to be 8, and the number of layers thereof is assumed to be 4. Similarly, the number of stripes in a communication is set to be 2. The CPU 302 determines that the number of stripes of encoded data to be transmitted is set to be 2, requests the header information processing unit 307 to change header information, and the header information processing unit 307 changes the header information to have the number of stripes = 2. The changed header information is supplied to the buffer 312 via the selector 306 (S133 in Fig. 23C). Then, conversion processing of encoded data in the sequential data format is performed. The CPU 302 instructs to select the encoded data converter 316 as the output of the selector 305 and the input of the selector 306 (S134). The CPU 302 reads out encoded data of the first to fourth stripes of layer images from the buffer 304 first, and supplies the readout data to the decoder 308 via the selector 305 (S135). The decoder 308 decodes the input encoded data, and stores the zeroth-layer image in the frame memory 309 while storing reproduced images of intermediate layers in the frame memory 311 (S136). The CPU 302 supplies the content of the frame memory 309 to the encoder 310 to perform encoding without data division into stripes, and stores encoded data in the buffer 312 after header information via the selector 306 (S137). As the processing of the next stripe, the CPU 302 reads out encoded data of the fifth to eighth stripes of the images from the buffer 304, and supplies the readout data to the decoder 308 via the selector 305 (S135). The decoder 308 decodes the input encoded data, and stores the zeroth-layer image in the frame memory 309 while storing the reproduced images of the intermediate layers in the frame memory 311 (S137). The CPU 302 inputs the content of the frame memory 309 to the encoder 310 to perform encoding without data division into stripes, and stores the encoded data after the encoded data of the first stripe in the buffer 312 via the selector 306 (S137). If it is determined that conversion for all the stripes is completed, the CPU 302 sends the content of the buffer 312 onto the communication line 314 via the communication interface 313 (S139). The communication interface 343 receives the encoded data via the communication line 314, and informs the presence of incoming data to the CPU 332 (S002). The CPU 332 stores encoded data of images in the sequential data format in the buffer 342 (S003). As described above, since the object of the communication is to perform the all-layer data transfer operation, the CPU 332 performs processing of header information first. The CPU 332 instructs so that the output from the selector 336 is selected as the input to the header information processing unit 337, and the output from the header information processing unit 337 is selected as the input to the selector 335 (S025). The CPU 332 reads out the header information from the buffer 342, and supplies the readout information to the header information processing unit 337 via the selector 336 (S026). The header information processing unit 337 analyzes the header information, reads out the data format of the encoded data, and supplies the readout data format to the CPU 332 (S027). In this case, since the data format is the sequential data format, the CPU 332 causes the header information processing unit 337 to read out the number of stripes. The header information processing unit 337 analyzes the header information, reads out the data format of the encoded data, and supplies the readout data format to the CPU 332 (S049 in Fig. 21D). In this case, the number of stripes is 2. For the sake of simplicity, the number of stripes of images to be stored in the storage device 331 is assumed to be 4. The CPU 302 determines that the number of stripes of encoded data to be stored is set to be 4, and requests the header information processing unit 337 to change header information. The header information processing unit 337 changes the header information to have the number of stripes = 4, and outputs the changed header information to the buffer 334 via the selector 335 (S050). Then, processing of encoded data of the first stripe in the buffer 342 is performed. The CPU 332 instructs so that the output from the selector 336 is selected as the input to the decoder 338 of the encoded data converter 354, and the output from the encoder 340 of the encoded data converter 354 is selected as the input to the selector 335 (S051). The CPU 332 reads out encoded data of the first stripe from the buffer 342, and supplies the readout data to the decoder 338 via the selector 336 (S052). The decoder 338 decodes the input encoded data, and stores the reproduced image of the first stripe in the frame memory 339 (S053). Subsequently, the CPU 332 reads out encoded data of the second stripe from the buffer 342 first, and supplies the readout data to the decoder 338 via the selector 336 (S052). The decoder 338 decodes the input encoded data, and stores the reproduced image of the second stripe after the reproduced image of the first stripe in the frame memory 339 (S053). After the zeroth-layer image portions of all the stripes are obtained, encoded data divided into four stripes are generated on the basis of the zeroth-layer image in the frame memory 339. The encoder 340 reads out data of the first stripe from the zeroth-layer image in the frame memory 339, reduces the readout data to generate a first-layer image, and stores the generated image in the frame memory 341 (S055 in Fig. 21E). Subsequently, the encoder 340 encodes the zeroth-layer image of the stripe to be encoded in the frame memory 339 with reference to the first-layer image of the stripe stored in the frame memory 341, and stores the encoded data in the buffer 344 (S056). The encoder 340 reads out the first-layer image of the stripe stored in the frame memory 341, reduces the readout image to generate a second-layer image, and stores the generated image in the empty area of the frame memory 341 (S057). The encoder 340 encodes the first-layer image in the frame memory 341 with reference to the second-layer image of the stripe stored in the frame memory 341, and stores the encoded data after the encoded data of the zeroth-layer image in the buffer 344 (S058). The encoder 340 reads out the second-layer image of the stripe stored in the frame memory 341, reduces the readout image to generate a third-layer image, and stores the generated image in the empty area of the frame memory 341 (S059). The encoder 340 encodes the second-layer image in the frame memory 341 with reference to the third-layer image of the stripe stored in the frame memory 341, and stores the encoded data after the encoded data of the first layer image in the buffer 344 (S060). Also, the encoder 340 reads out the third-layer image of the stripe stored in the frame memory 341, reduces the readout image to generate a fourth-layer image, and stores the generated image in the empty area of the frame memory 341 (S061 in Fig. 21F). The encoder 340 encodes the third-layer image in the frame memory 341 with reference to the fourth-layer image of the stripe stored in the frame memory 341, and stores the encoded data after the encoded data of the second-layer image in the buffer 344 (S062). Furthermore, the encoder 340 encodes the fourth-layer image of the stripe stored in the frame memory 341, and stores the encoded data after the encoded data of the third-layer image in the buffer 344 (S063). The CPU 332 reads out the encoded data of the fourth-layer image of the stripe from the buffer 344, and stores the readout encoded data after the header information in the buffer 334 via the selector 335 (S064). The CPU 332 reads out the encoded data of the third-layer image of the stripe from the buffer 334, and stores the readout encoded data after the encoded data of the fourth-layer image in the buffer 334 via the selector 335 (S065 in Fig. 21G). Furthermore, the CPU 332 reads out the encoded data of the second-layer image of the stripe from the buffer 344, and stores the readout encoded data after the encoded data of the third-layer image in the buffer 334 via the selector 335 (S066). Moreover, the CPU 332 reads out the encoded data of the first-layer image of the stripe from the buffer 344, and stores the readout encoded data after the encoded data of the second-layer image in the buffer 334 via the selector 335 (S067). Also, the CPU 332 reads out the encoded data of the zeroth-layer image of the stripe from the buffer 344, and stores the readout encoded data after the encoded data of the first-layer image in the buffer 334 via the selector 335 (S068). After these data are stored, the CPU 332 clears the frame memory 341 and the buffer 344 (S069), and performs encoding of the next stripe. Thereafter, the CPU 332 similarly repeats the above-mentioned processing up to the eighth stripe. Upon completion of the processing, the CPU 332 stores the content of the buffer 334 in the storage device 331 as encoded data of all the layer images in the sequential data format (S071). Thus, the CPU 332 completes the communication, and manages the encoded data. [Fourth Embodiment] In the above embodiment, a binary image is processed for the sake of simplicity. However, the present invention can be easily applied to encoding of various other kinds of images such as a multi-value image, a color image, a dynamic image, and the like as long as encoding utilizing layer images is adopted. The numbers of layers and stripes are not limited to those in the above embodiment. For example, the number of layers in a communication may be zero. More specifically, when an image is stored in a storage device, it is subjected to hierarchical encoding, and when an image is transmitted, it is subjected to non-hierarchical encoding. The received non-hierarchically encoded data is converted into hierarchically encoded data, and is stored in a storage device, or the converted data is directly decoded to perform a hierarchical display operation. Fig. 24 shows an image communication apparatus according to the fourth embodiment of the present invention. For the sake of simplicity, a binary image is used as an image to be processed. Reference numerals 201 and 202 denote storage devices for storing layer images encoded by the JBIG algorithm. Reference numerals 205 and 206 denote buses for exchanging hierarchically encoded data. Reference numeral 210 denotes a communication line for connecting communication apparatuses. Reference numerals 203 and 204 denote encoded data converters for converting hierarchically encoded data input from the corresponding buses 205 and 206 into non-hierarchically encoded data, and sending the converted data onto the communication line 210, and for converting the non-hierarchically encoded data input from the communication line 210 into hierarchically encoded data, and sending the converted data onto the corresponding buses. For the sake of simplicity, in encoding of a non-hierarchial image, the number of layers is set to be zero in the JBIG algorithm, and only the zeroth-layer image is encoded without referring to another layer image. Reference numeral 207 denotes a decoder for decoding input hierarchically encoded data, and outputting a decoded image in an enlarged scale. Reference numeral 208 denotes a video frame memory for storing the decoded image in the enlarged scale. Reference numeral 209 denotes a display for displaying the content of the video frame memory 208. Encoded data stored in the storage device 201 is supplied to the encoded data converter 203 via the bus 205. For the sake of simplicity, the number of layers of hierarchically encoded data in the storage devices 201 and 202 is assumed to be 4, and the number of stripes thereof is assumed to be 8. The encoded data converter 203 temporarily decodes the input hierarchically encoded data in units of stripes to obtain a zeroth-layer image, then encodes the zeroth-layer image, and sends the encoded data of the zeroth-layer image onto the communication line 210. Upon completion of conversion processing for all the stripes, the transmission operation is ended. The encoded data converter 204 decodes the encoded data of the zeroth-layer image sent through the communication line 210, hierarchically encodes the data according to the JBIG algorithm, and stores the encoded data in the storage device 202 via the bus 206 or supplies it to the decoder 207 via the bus 206. The decoder 207 receives encoded data from the encoded data converter 204 or the storage device 202 via the bus 206, decodes images in the order from the fourth-layer image, enlarges the decoded image in correspondence with the layer, and writes the decoded image in the video frame memory 208, thus displaying the decoded image on the display 209. In this manner, since only the zeroth-layer image is encoded, an increase in encoding amount caused upon execution of hierarchical encoding can be prevented, and data transmission efficiency can be improved. As the non-hierarchical encoding, encoding of only the zeroth-layer image of the JBIG algorithm has been exemplified. However, a sequential encoding method such as MH, MR, MMR, or the like may be adopted. Furthermore, the concept of hierarchy is not limited to reduced image generation, but may be defined by an information amount like in a JPEG algorithm. Furthermore, any other definitions may be adopted. Upon encoding, either of a method of encoding data with reference to a stripe (SU-1) immediately before a stripe (SU) to be encoded or a method of encoding a stripe (SU) alone without referring to the immediately preceding stripe may be selected. In the description of the above embodiment, conversion of the number of layers and conversion of the number of stripes are separately executed, but may be simultaneously executed. The present invention is not limited to the arrangements of the apparatuses and their operation procedures described above. Encoding·decoding processing of header information may be performed in a software manner of a CPU. The order of generation of encoded data is not limited to that described above, and encoded data may be generated in the order from a lower layer (zeroth layer). As described above, in an all-layer data communication mode, since data is transmitted while the numbers of layers and stripes of hierarchical encoding are converted, communication cost can be reduced. Since an encoder and a decoder include many common components, even when the number of encoders is increased, an increase in the number of hardware components is very small, and an increase in cost of the apparatus can be minimized. In particular, the above-mentioned processing is effective for a case wherein data is transferred from, e.g., a center machine of a database to a plurality of terminal machines connected thereto. Furthermore, when the number of layers is adjusted in a receiving terminal, discrimination of, e.g., the sizes of images in data management or quick searching for displaying a plurality of low-resolution images is facilitated. When the size of stripe is adjusted in a receiving terminal, the size of data to be managed can be controlled, thus allowing easy data management. In addition, data can be converted to have a size matching with that of a display or a printer in the receiving terminal, thus allowing easily output control.

Claims: An image processing apparatus for searching an image for output comprising: input means (2) for inputting image data; storage means (6) for storing hierarchically encoded image data derived from the input image data in an order of registration; first decoding means (7) for decoding image data stored in said storage means; video frame memory (9) for storing image data decoded by said first decoding means, whereby images based on said image data stored in said video frame memory can be displayed on a display means (10); and control means (13) for controlling the operation of the apparatus; wherein said input means are adapted to receive non-hierarchically coded image data; and wherein the apparatus further comprises second decoding means (3) for decoding the non-hierarchically coded input image data to generate first image data of a first resolution, hierarchically encoding means (5) adapted hierarchically to encode said first image data with different resolutions and store the hierarchically encoded image data in said storage means; said control means being adapted to cause said first decoding means (7) to decode in the order of registration the hierarchically encoded data of a predetermined plural number of images stored in said storage means to generate second image data of a second resolution which is lower than the first resolution, to cause said video frame memory (9) to store the second image data (S23-1) in divided areas thereof for display by said display means, and wherein the apparatus further comprises means (11) for selecting one image from said displayed second image data, and wherein said control means is adapted to clear (S61-1) said video frame memory based on the detection of an instruction (S28-1) for displaying the selected image of the predetermined number of simultaneously displayed images in a third resolution higher than the second resolution, to perform decoding of the hierarchically coded data corresponding to the selected image by the first decoding means (7), and to generate an image of the selected image at the third resolution (S63-1), store the generated image of the third resolution in the video frame memory (9), and cause the display of said third image of the third resolution on said display means (10), and wherein said control means is adapted to perform selectively the following processes: (i) in the case where an instruction for displaying the selected and displayed third image of the third resolution in a fourth resolution higher than the third resolution is detected (S65-1), said control means is adapted to clear said video frame memory on the basis of the detected instruction, to perform decoding on the hierarchy coded data corresponding to the selected image by the first decoding means (7), and to generate an image of the selected image at the fourth resolution, to store the generated fourth resolution image in the video frame memory (9), and to generate display of said selected fourth resolution image on the predetermined display means (10); (ii) in the case where an instruction for again displaying said second image is detected (S67-1), said control means is adapted to clear said video frame memory on the basis of the detected instruction, to perform decoding of the hierarchically coded data corresponding to the predetermined number of images again by the first decoding means (7), and to generate said second image (S23-1), store the generated second image data in the video frame memory (9), and to generate a display of the second image data of the second resolution stored in said video frame memory (9) on the predetermined display means (10); and (iii) in the case where an instruction is received for outputting a selected image, said control means is adapted to perform decoding of the hierarchically encoded data corresponding to the selected image to generate image data of the first resolution and to write the decoded image of the first resolution into a working memory (8). Apparatus according to claim 1, wherein said second decoding means comprises an MH-decoder. Apparatus according to claim 2, wherein said second decoding means is adapted to generate image data line-by-line from said first image data, and the apparatus further includes memory means (4) having a plurality of storage section each adapted to store a plurality of lines of said decoded first image data, and said hierarchical encoding means (5) encoding the lines stored in each of said sections so as to generate said hierarchically encoded image data. Apparatus according to claim 3, wherein said hierarchical encoding means (5) is adapted to encode the plurality of lines stored in one of said sections of said memory means (4) whilst another plurality of lines are being stored in another of said sections. Apparatus according to any one of the preceding claims and including printing means (12) for printing the selected image decoded from said storage means by said first decoding means. A method of searching for an image, the method comprising: inputting image data into an image processing apparatus; storing in storage means hierarchically encoded image data derived from the input image data in an order of registration; decoding encoded image stored in said storage means; and storing the decoded image data in a video frame memory so that the decoded image data can be displayed on display means, and wherein the input data is non-hierarchically encoded image data and the method further includes decoding the non-hierarchically encoded input image data to generate first image data of a first resolution; hierarchically encoding said first image data with differing resolutions and storing the hierarchically encoded image data in said storage means; decoding in the order of registration the hierarchically encoded data of a predetermined plural number of images stored in said storage means to generate second image data of a second resolution which is lower than the first resolution; storing said second image data in divided areas of said video frame memory; displaying said second image data; selecting an image from said displayed second image data; clearing said video frame memory in response to a command to display the selected image of the predetermined number of simultaneously displayed images in a third resolution higher than the second resolution; performing decoding of the hierarchically encoded data corresponding to the selected image to generate image data of the third resolution; storing the image data at the third resolution in said video memory frame, and displaying the third resolution image data, and wherein when an instruction is received for displaying the selected and displayed image of the third resolution in a fourth resolution higher than the third resolution, clearing said video frame memory; decoding the hierarchically encoded image data corresponding to the selected image to generate image data of the fourth resolution; storing the fourth resolution image data in said video frame memory, and displaying the fourth resolution image data, and wherein when an instruction is received for redisplaying said second image data, clearing said video frame memory, decoding the hierarchically encoded image data corresponding to the predetermined plural number of images to generate again said second image data; storing the regenerated second image data in said video frame memory and redisplaying said second image data, and wherein when an instruction is received for outputting a selected image; decoding the hierarchically encoded data corresponding to the selected image to generate image data of the first resolution corresponding to the selected image and writing the decoded image of the first resolution into a working memory for output. A method according to claim 6, wherein the input image data is encoded and is decoded by an MH decoder, the hierarchical encoding being carried out on the output of the MH decoder. A method according to claim 7, wherein the input image data is decoded line by line, and the decoded image data is stored in a plurality of memory sections, the hierarchical encoding being carried out so that a plurality of lines stored in one section is hierarchically encoded whilst image data is being stored in another of said sections. A method according to any one of claims 6 to 8 including a step of printing image data stored in said working memory.

Inventors: MAEDA MITSURU, MAEDA, MITSURU, Maeda, Mitsuru, c/o Canon Kabushiki Kaisha
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1993
Main classification: H04N1
IPC codes: H04N1