Image processing apparatus

Abstract: An image processing apparatus comprises: means for inputting image data page by page; means for generating raw image data of the input image data and coded data of the input image data; image memory means for storing the raw image data and the coded data; and control means for controlling the storing of the data into the image memory means and selecting one of the raw image data and the coded data for saving in the image memory means in accordance with the data volume of the coded data.

Description: The present invention relates to image processing method and apparatus, and more particularly to an image processing apparatus which stores input image data into a memory to effect image processing. In a known image processing apparatus such as a facsimile apparatus, a system for storing image data into a memory before it is transmitted or outputted for recording is known. Compression of the image data to shorten an image transmission/reception time is known. The data compression is useful to reduce a memory capacity for the image data. As a method for storing the image data, a method of storing raw data as it is as well as a method of storing the image data in a compressed form by a coding system such as an MH (modified Huffman) code or an MR (modified READ) code. Applications relating to a facsimile apparatus which stores the image data into a memory include US-A-4,717,967, US-A-4,796,092, US-A-4,677,649, US-A-4,814,890, US-A-4,772,955 and US-A-4,845,569. When the image data is stored in the prior art image processing apparatus, it is common to store the image data as original image data or as compressed data,such as MH code or MR code. However, the prior art method has the following disadvantages. (1) Storing original image data only. Since the data volume for one sheet (one page) of the binarized image is constant whether the compression factor is high or low, an assured number of pages to be stored can be determined from the memory capacity, and it is a maximum number of sheets (pages) to be stored. However, when the assured number of pages to be stored is large, a considerable memory capacity is required and the cost increases significantly. (2) Storing by the compressed code data only, such as MH code or MR code. Since the MH or MR code for compression is determined based on a statistical nature of a most popular image,such as a text document, the compression factor of the image data is low for a document image having a different statistical nature, and the data volume after compression may be several times larger than that of the original image data. As a result, the assured number of pages to be stored cannot be determined and the number of sheets which can be stored depends on the type of document and can therefore be very variable Japanese Patent Abstract JP-A-2,228,769 discloses image processing apparatus in which image data is compressed and data taking up the least volume between the compressed and the non-compressed data is selected for storage in a magneto-optical disc. In accordance with the present invention there is provided a method of storing raw image information as set out in claim 1. In accordance with the invention there is also provided an apparatus as defined in claim 6 for carrying out the method of claim 1. An embodiment of the present invention provides an image processing apparatus which can assure a predetermined number of pages to be stored while making efficient use of image memory. Other features of the present invention will be apparent from the following detailed description of the embodiments and the accompanying drawings, in which: Fig. 1 shows a block diagram of a configuration of an information display apparatus with a communication function in accordance with one embodiment; Fig. 2 shows a configuration of an image memory in the embodiment; Figs. 3 to 5 show flow charts of control operations of a MPU 101 of the embodiment, and Fig. 6 illustrates a load operation to the image memory. In the following embodiment, an information display apparatus with a communication function is explained as an example of the image processing apparatus. Fig. 1 shows a block diagram of a configuration of the information display apparatus of the present embodiment. Numeral 101 denotes an MPU such as a microprocessor for controlling a communication function unit (facsimile communication unit). The following units are connected to a bus of the MPU 101. Numeral 102 denotes a backup control circuit for switching a power supply voltage from a line voltage to a battery voltage when the former falls below a predetermined level to thereby back up a clock IC and a RAM, numeral 104 denotes the RAM, and numeral 105 denotes the clock IC for controlling a time. Numeral 106 denotes a known ROM which stores a control program of the MPU 101 to be described later. Numeral 107 denotes a memory mapping unit (MMU) for managing the memory, and numeral 108 denotes a DRAM which stores image data. Numeral 109 denotes a modem, numeral 110 denotes an NCU for switching a facsimile apparatus and a telephone set, and numeral 111 denotes a DTMF receiver for detecting a DTMF signal. Numeral 112 denotes a speaker amplifier for generating a sound by a speaker, numeral 113 denotes a gain controller for controlling a sound level, and numeral 114 denotes a voice source circuit including a voice synthesizer for generating a voice signal. A voice output circuit comprising the blocks 112 ∼ 114 is used to ring a pseudo bell and call an operator by a voice signal. Numeral 115 denotes an I/O port for controlling the turn-on of an LED, numeral 116 denotes an ID interface for sending image data to a main unit of the information display (ID) apparatus, and numeral 117 denotes the ID main unit for displaying a received image. The ID main unit comprises a plate recording unit including a display unit of a magnestylus type. In the present embodiment, it is assumed that the present apparatus is used as the plate recording apparatus with a communication function to display information such as images, characters and graphics to many non-specified persons at a public place such as station, airport or event place. When the ID main unit 117 is substituted by an image recording unit and an image reader is additionally provided, it constitutes a configuration of a conventional facsimile apparatus. An operation of the above apparatus is now explained. In the configuration of Fig. 1, coded image data (compressed data) from the telephone line is applied to the modem 109 through the NCU 110 and converted to a digital signal thereby, and it is stored in the DRAM 106 through the MMU 107. When raw image data (non-compressed data) is transferred, it is also stored in the DRAM 108. Where the ID main unit 117 of the apparatus is substituted by an image recording unit and an image reader is additionally provided to constitute a conventional facsimile apparatus, the raw image data read by the image reader or the coded data is stored in the DRAM 108. A method of storing the data into the DRAM 108 will be described later in detail. Where the apparatus is configured as the information display apparatus with the communication function, the image data in the DRAM 108 is displayed on the ID main unit 117 through the ID interface 116. Fig. 2 shows a configuration of the DRAM 108 of Fig. 1. In the present embodiment, the DRAM 108 can store at least N pages (sheets) of image data of a predetermined size. This assures a minimum number of pages to be stored in the DRAM 108. Assuming that the image size is A4, the image for one A4 size page corresponds to approximately 4 M bits of raw image data when an image density is 8 pels/mm. In the present embodiment, since the assured number of pages of image to be stored in the DRAM 108 is N, the DRAM 108 comprises areas M(1) ∼ M(N) each having a 4 M bits capacity and a code buffer M(0) having a 1 M bits capacity to store at least one (or several) page of coded image data. Not only the raw image data but also the compressed code data are sometimes stored in the areas M(1) ∼ M(N) which have the 4 M bits x N capacity. The address of the DRAM 108 (vertical line in Fig. 2 represents the memory address) is controlled such that the compressed code data is stored in the order of the areas M(0), M(1), M(2), ... while the raw image data is stored in the reverse order of M(N), M(N-1), ..., M(2), M(1). Referring to flow charts of Figs. 3 to 5, the memory control by the MPU 101 and the MMU 107 is specifically explained. Figs. 3 - 5 are continued by the like alphabet or greece letters. It is assumed that the assured number of pages (sheets) to be stored in the DRAM 108 is 3. Accordingly, the DRAM 108 comprises three 4 M bits areas (M(1), M(2), M(3)) and one 1 M bits compressed data buffer (M(0)). This need not mean that the DRAM 108 has such a capacity in hardware but those areas may be set by software memory management. In such a case, the assured number of pages N to be stored may be variable and the memory may be dynamically configured so that other area may be assigned to other applications. Figs. 6(a) ∼ 6(d) show a transition of the status of the DRAM 108 when the compressed data on pages 2 and 3 overflow. The raw image data is shown by PIX(1), the compressed data is shown by COD(1), and the number in ( ) represents the received page. The content of ( ) may be considered as an array index where the area M(X) is an array and the DRAM 108 is an array of such arrays. In a flow chart of Fig. 3, the page P and the assured available number of pages N are set to 3 (step S301), and the memory area 0 is selected to store the compressed data (the area M(0) is selected) (step S302). This means that the compressed data is to be stored in the area M(0) in Fig. 6. A start address to store the compressed data and the number of pages S of raw image to be stored are set to 0 (step S303). A pointer for an upper limit address to store the compressed data is set to an end address of the area M(0) (step S304). The pointer setting is shown by an arrow P in Fig. 6(a). Thus, the initialization is completed. Then, the compressed data is stored in the area M(0) (step S305), and the raw image data is stored in the area M(3) (step S307) since the storing thereof is not inhibited (step S306). This status is shown in Fig. 6(a). Since the compressed data of page 1 does not exceed the upper limit address of the storing (step S308), only the compressed data is treated as valid (step S310). This means that only the compressed data is saved and the raw image data is treated as invalid and the raw image data of the next page will be overwritten in the area in which the raw image data of the first page has been stored. The assured available number of pages is now set to 3-1 = 2 (steps S311 and S312). In a step S313, a decision is NO because the compressed data does not overflow, and the start address to store the compressed data is set to the next address to the end address of the COD(1) (step S318), and the memory area to store the compressed data is changed from 0 to 1 (from the area M(0) to to the area M(1)) (step S319). A value 1 which represents an index change is designated by A. The assured number of pages 3 to be stored less ((the number of pages of the stored raw images) + 1) is 3-1 = 2 because the number of pages of the stored raw image is zero since the raw image data of page 1 is invalidated (step S320). This index is designated by B. When A and B are compared (step S321), A > B is not met and the process proceeds to a step S324. The steps S318 ∼ S322 assure the work area to develop the stored compressed data to the raw image. It requires one page size of the raw image data, namely, 4 M bits. In a step S324, the upper address to store the compressed data is set to the end address of the area M(1). This address is designated by X. In a step S325, a decision is NO because the assured available number of pages to be stored is 2. (The start address to store the compressed data) + 4 bits is designated by Y (step S327). Since X > Y (step S328), the upper limit address to store the compressed data is set to Y (step S329). This position is shown by an arrow Q in Fig. 6. A decision is a step S330 is NO and the process returns to the step S305 to receive the second page. For the second page, the compressed data is received (step S305) and the raw image data is stored in the area M(3) because the storing thereof is not inhibited (steps S306 and S307). The compressed data overflows (steps S308 and S309), and the assured available number of pages is set to 2-1 = 1 (steps S311 and S312). Fig. 6(b) shows this status. A decision in the step S313 is YES because of the overflow, and a decision in the step S314 is NO because the storing of the raw image is not inhibited, and only the raw image data is treated as valid (step S316). This means that only the raw image data is saved and the compressed data is invalidated and the compressed data of the next page will be overwritten on the same area. The number of pages S of the stored raw image changes from 0 to 1 and P changes to 3-1 = 2 (step S317). The upper limit address to store the compressed data is same as that for the second page because the assured available number of pages is not zero (steps S324, S325, S327, S328 and S329). For the third page, the compressed data is stored (step S305) and the raw image data is stored in the area M(2) (step S307). The compressed data overflows (steps S308 and S309). This status is shown in Fig. 6(c). The assured available number of pages is set to 1-1 = 0 (steps S311 and S312). Since the compressed data overflows and the storing of the raw image is not inhibited (steps S313 and S314), only the raw image data is treated as valid (step S316) and the number of pages S of the stored raw image is set to 2, and P is set to 1 (step S317). A decision in a step S325 is YES because the assured available number of pages is 0. The storing of the raw image data is inhibited and the upper limit address to store the compressed data is set to the end address of the area M(0) (step S326). The process returns to the step S305 to receive the fourth page. For the fourth page, only the compressed data is stored (step S305) and the raw image data is not stored because it is inhibited (step S306). The compressed data is treated as valid because it does not overflow (steps S308 and S310) and the process is terminated because all pages have been received (step S330). In this manner, the image data for the assured number of pages can be stored without overflow by the small capacity memory configuration which comprises the memory areas (M(1) ∼ M(3)) which correspond in number to the assured number of pages to be stored and each of which has a capacity to store the raw data, and the memory area (M(0)) having the capacity to store at least one (or several) page of coded image data. While the assured number of pages N to be stored is set to 3 in the present embodiment, the number is not restrictive. Whether the compressed data is stored in the memory or the raw data is stored in the memory is determined by the volume of the compressed data. Accordingly, the memory overflow is positively avoided and the assured number of pages N to be stored is always assured. Further, since the storing of the compressed data is tried where possible, the assured number of pages N to be stored is assured while the memory use efficiency is improved as much as possible. The assured number of pages to be stored is alway assured however the compression factor of the image is low. If the compression factor is high, many pages of image can be stored. Since only the area to store the coded code is provided in the code buffer in addition to the raw data memory areas for the minimum assured number of pages, the memory capacity does not significantly increase compared to the prior art system in which only the raw data memory areas are provided. Accordingly, the hardware is attained with a low cost. Because the compressed data is stored, the memory efficiency is significantly improved compared to the prior art system in which only the raw data memory areas are provided. Where the apparatus is configured as the plate recording apparatus with the communication function, it may be installed at a public place such as station, airport or event place and the apparatus may be remotely controlled through communication control. In such a case, it is necessary to transfer the image data to the apparatus from a remote place and store it into the DRAM 108. In accordance with the present configuration, the image data can be stored without overflow and the error-free automated operation is assured. In the present embodiment, the received image data is stored in the DRAM 108. Similar control may be applied to a facsimile apparatus when the image read by read means is to be stored. The above memory control is not limited to the image communication apparatus but it is equally applicable to various image processing apparatus which temporarily store the input image for subsequent processing. While the dynamic memory area control of the DRAM 108 is discussed in the present embodiment, the present invention is equally applicable when the areas M(1) ∼ M(N) which correspond in number to the minimum assured number of pages N to be stored are provided by hardware.

Claims: A method of storing a plurality of pages of image data input page by page as raw image data into an image processing apparatus having means (101) for encoding the raw image data in accordance with a compression code; and memory means (108) for storing the pages of image data; wherein when a first page of image data is received the raw image data is encoded and both the raw image data and the encoded data of the first page are stored in the memory means (108); the volume of the encoded image data is discriminated and if the volume of the encoded image data is greater than a predetermined amount the encoded image data is invalidated and the raw image data is kept stored in the memory means (108), and if the encoded image data has a volume equal to or less than the predetermined amount the encoded image data is kept stored in the memory means (108) and the raw image data is invalidated; receiving a second page of image data and encoding the raw image data of the second page; storing the encoded and raw image data of the second page in the memory means (108) in addition to the image data of the first page kept stored in the memory means (108) and by overwriting the invalidated image data of the first page; again discriminating the volume of the encoded image data, so that if the discriminated volume of the encoded image data is less than or equal to the predetermined value the encoded image data is kept stored in the memory means (108) and the raw image data is invalidated and if the encoded image data is greater than the predetermined value the raw image data is kept stored in the memory means (108). A method according to claim 1, wherein whenever a subsequent page of raw image data is received and encoded that page of data which is retained for storage in accordance with the result of the discrimination is written over the last page of data stored in the memory means which is of the same format, that is either raw data or encoded data, which had been invalidated in a previous step. A method according to either of the preceding claims, in which the memory means has a start address and an end address and that for the first page of received image data either the raw data is stored at one end of the memory or the encoded data is stored at the other end of the memory so that as retained pages of either encoded or raw image data are stored in the memory means the storage areas for those pages converge towards the central addresses of the memory. A method according to any one of the preceding claims, wherein the memory means comprises a first area for storing coded image data, a second area for developing the coded image data into non-coded image data and a third area for storing the non-coded image data. A method according to any one of the preceding claims, including displaying the stored image data. Apparatus for carrying out the method of claim 1 comprising: means (110) for receiving raw image data in the form of successive pages; control means (101) for encoding the raw image data in accordance with a compression code; and memory means (108) for storing both the raw image data and the encoded image data under the control of the control means, the control means being adapted to discriminate whether or not the volume of the encoded image data is greater than a predetermined amount, to invalidate either the stored encoded data or the stored raw data in accordance with the result of the discrimination and to overwrite invalidated data stored in the memory means (108) with the validated data from a subsequently received page of image data. Apparatus according to claim 6, wherein the memory means includes a first area for storing coded image data, a second area in which coded image data can be developed into non-coded image data, and a third area for storing the non-coded image data. Apparatus according to either of claims 6 or 7 and further comprising display means (117) for displaying stored image data.

Inventors: HARADA KOJI, NAKANISHI HIROYUKI, OGATA YUKIHIKO, WATANABE ASAO, YANASE SEIJIRO, HARADA, KOJI, NAKANISHI, HIROYUKI, OGATA, YUKIHIKO, WATANABE, ASAO, YANASE, SEIJIRO, Harada, Koji, c/o Canon Kabushiki Kaisha, NAKANISHI, HIROYUKI, C/O CANON KABUSHIKI KAISHA, Ogata, Yukihiko, c/o Canon Kabushiki Kaisha, Watanabe, Asao, c/o Canon Kabushiki Kaisha, Yanase, Seijiro, c/o Canon Kabushiki Kaisha
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1991
Main classification: H04N1
IPC codes: H04N1