Compression/expansion of image data

Abstract: At a data output apparatus side (100), raster image information, which is obtained by means of performing an exclusive OR operation between raster image information on the preceding line and raster image information on the current line, is compression-processed in a raster direction and then transmitted to a data processing apparatus (200). In the data processing apparatus (200), the received image information is expansion-processed, an exclusive OR operation between image information after the expansion and image information on the preceding line is carried out, and a processing for recording and the like is performed taking the thus obtained information as the raster image information on the current line. Thus it is possible to provide a higher compression rate of the image information with a simple processing and to improve a processing speed.

Description: The present invention relates to the processing of image data. Hitherto, there is known a system for recording data outputted from a host system such as a personal computer, using a recording apparatus. In such a system, an interface of parallel or asynchronous type is generally employed between the host computer and the recording apparatus. According to a serial interface, there are such advantageous points that a dual directional communication is available, and in addition the number of signal wires are reduced and thus a connector is miniaturized. On the other hand, there is a defect that a transfer rate is slow. Thus, in a case where image data is transmitted from a host system to a recording apparatus having a high resolution and a large capacity of data, the transfer rate results slower than a recording speed of the recording apparatus. In order to reduce the amount of data, there are employed in communication line various effective data compression schemes in units of bits. Those conventional schemes, however, have drawback that while the compression rate is high, it takes much time for the compression and expansion in a software. It is possible to provide the expansion function with a hardware at the recording apparatus end so as to increase the speed. However, there is no host system having a hardware for such a specific use. Thus, this scheme is not so desired ones since it will cause a high cost. So, it is required to provide a compression scheme capable of performing processing on a software basis. In view of those points, hitherto, in a case where data transfer is performed in a raster direction, a compression is performed in units of bytes in the horizontal direction, so that the amount of data is reduced. This is advantageous in compression only when the same data continues over plural bytes in the horizontal direction, or when the repetitive pattern of block(s) is present. The reason why the compression is limited to one in units of bytes is that the processing rate of the software extremely slows down if it is one in units of bits or a repetitive management of the same number of bits. EP-A-0309655 describes an image processing apparatus and method wherein a raster line of image data is subject to horizontal run length compression, the run length compressed data for two adjacent raster lines are read out, an exclusive OR processing operation is carried out using the compressed data for adjacent lines to detect vertical direction end point positions of the original image data without decoding the input image data into the original image data and compression encoding is then carried out in the vertical direction. EP-A-0188800 describes an apparatus for compression of raster image data in which an exclusive OR operation processing is carried out between adjacent bytes of a line of image data prior to run length encoding or compression of the data. In a first aspect, the present invention provides a method of compressing image data comprising a plurality of raster lines in accordance with claim 1. In a second aspect, the present invention provides a method of expanding image data compressed by a method in accordance with the first aspect, as defined in claim 2. In a third aspect, the present invention provides an apparatus in accordance with claim 6. In a further aspect, the apparatus provides a recording apparatus in accordance with claim 7. The present invention provides a data processing method capable of implementing a high compression rate of image information with a simple processing, also raising the processing speed. Embodiments of the present invention are contained in the dependent claims. Embodiments of the present invention will now be described, by way of example, with reference to the accompanying drawings, in which : Fig. 1 is a block diagram showing a data processing system according to one embodiment to which the present invention is applicable; Fig. 2 is a flow chart useful for understanding a flow of the data compression processing; Fig. 3A is a view showing an original image data; Figs. 3B and 3C are views showing image data of post compression processing; Fig. 4 is a flow chart useful for understanding a flow of the data expansion processing; Fig. 5 is a perspective view showing a recording head; Fig. 6 is a schematic perspective view of an ink jet recording apparatus; and Fig. 7 is a block diagram showing a control section of the ink jet recording apparatus showing in Fig. 6. Embodiments of the present invention will be described in detail with reference to the accompanying drawings. As an example of most advantageous application of the present invention, an ink jet scheme of recording apparatus or the like using thermal energy may be considered according to a serial scheme of recording having a serial interface. Such apparatus makes it possible to implement high resolution of recording without reducing recording speed. Further, the use of a small interface and a small diameter of cable makes it possible to miniaturize the apparatus. This example will be described hereinafter. Fig. 1 is a block diagram showing a data processing system according to one embodiment to which the present invention is applicable. In Fig. 1, reference numeral 100 denotes a host computer such as a personal computer and the like; 200 a printer adapted to record images in accordance with recording data transmitted from the host computer 100 through a serial interface such as RS-232C. According to the present embodiment, an image recording is performed in such a manner that the use of thermal energy induces a a variation in state in ink so that an ink droplet is emitted. Image data generated from data generation unit 101 are subjected to a compression processing in units of bytes in a horizontal direction and a vertical direction, as will be described concerning a printer driver unit 102, and then the processed data are transmitted to the printer 200. And in addition the various commands are also transmitted through the printer driver unit 102 to the printer 200. A controller unit 201 of the printer 200 performs reproduction of the data by means of implementing the expansion processing, as described later, for the received data, and then the reproduced data are output to a printer unit 202. The printer unit 202 has a recording head which is provided with a plurality of ink orifices and a plurality of exothermic devices each corresponding to the associated one of the orifices. The exothermic devices are driven in accordance with data outputted from the controller unit 201 so that ink droplets are emitted on a recording medium to form an image. An operation of the printer driver unit 102 at the host end will be described. First, an image recording position information is transmitted to the printer 200, and then data are transmitted in a predetermined form. An example will be shown below. Image data is basically constituted of 2 bytes or more. If the value of the first byte is one of values 0 to 127 (00-7F), non-compression data continue by bytes of number represented by the value + 1 as the subsequent data. On the other hand, if the first byte is one of values -1 to -127 (FF-81), the second byte of data continue by number represented by the absolute value of the value. The value 128 is ignored as a null. A first raster is compressed only in a horizontal direction and then transmitted. Regarding the second raster and the rasters thereafter, an exclusive OR operation between the image data on the raster of interest and the original image data on the first raster or the preceding raster is carried out, and thereafter the compression in the horizontal direction, similar to the previous raster, is performed and then transmitted. Regarding the subsequent rasters, in the similar way, an exclusive OR operation involved in the preceding raster is carried out, and then the compression and transfer oprations are performed. Referring to Figs. 3A - 3C, it will be explained as to how the compression processing of image data is performed. Fig. 3A shows original image data. Fig. 3B shows data obtained by means of compression of the image data shown in Fig. 3A in a horizontal direction. As seen from the figure, data AA continuously appear on the first raster by 6 bytes, and thus they are compressed to be given by $FA, $AA. In similar way, data on each of the second to fourth rasters are compressed to be given by $FA $55; and fifth raster to $FA $AA. No continuous data appears on the 6th and 8th rasters and data 55 and AA appear alternately and by three bytes, respectively, and thus the compressed data are expressed in the form of $00 $55 $00 $AA ... $00 $55 $00 $AA. Also no continuous data appears on the 7th raster and data AA and 55 appear alternately and by three bytes, respectively, and thus the compressed data are expressed in the form of $00 $AA $00 $55 ... $00 $AA $00 $55A. Fig. 3C is a view showing a result of the compression processing for the image data shown in Fig. 3A, according to the present invention. Regarding the first raster, it is subjected to the compression processing only in a horizontal direction, and thus, similar to Fig. 3B, it is expressed in the form of $FA $AA. Regarding the second raster, an exclusive OR operation with the original data on the first raster is performed. The exclusive OR operation between data AA and data 55 results data FF, so that data FF continuously appear on the second raster by 6 bytes. Those are compressed in a horizontal direction to form $FA $FF. Regarding the third and fourth rasters, exclusive OR operations with the original data on the second and third rasters are performed, respectively. The exclusive OR operation between data 55 and data 55 results data 00, so that data 00 continuously appear on the third and fourth rasters by 6 bytes, respectively. Those are compressed in a horizontal direction to form $FA $00. Regarding the fifth raster, similar to the second raster, there are formed $FA $FF. With respect to the sixth raster, an exclusive OR operation with the original data on the fourth raster is performed, so that data FF and 00 appear alternately and by three bytes, respectively, and thus the compressed data are expressed in the form of $00 $FF $00 $00 ... $00 $FF $00 $00. Regarding the seventh and eighth rasters, exclusive OR operations with the original data on the sixth and seventh rasters are performed, respectively, so that data FF continuously appear on the respective raster by 6 bytes. Those are compressed in a horizontal direction to form $FA $FF. Fig. 2 is a flow chart indicating a flow of the data compression processing which is implemented in the printer driver unit 102. A program according to this flow chart is stored in a ROM (Read Only Memory) within a CPU (not shown), of the printer driver unit 102. In step S301, first, a compression processing for image data of one raster is performed in a horizontal direction. And thereafter in step S302, the processed data is transferred to the printer 200. Next, in step S303, it is determined as to whether transfer of all the image data has been completed, and if not, then in step S304, performed is an exclusive OR operation between the original image data on the preceding raster and the image data on the current raster. In step S305, a compression processing for exclusive-ORed data is performed in a horizontal direction. In step S306, the processed data is transferred to the printer 200. The procedure of steps S303 to S306 is repeated until transfer of all the image data is completed. Next, operation of the controller unit 201 of the printer will be explained. The controller unit 201 at the recording apparatus initiates development of the image data from a recording position to which data is first transmitted. The development of the first raster is performed based on the rule as mentioned above, since the first raster is involved in only the compression in a horizontal direction. For the second raster and the subsequent rasters, there is selected as the image data on the subsequent raster a result of an exclusive OR operation between the developed data on the preceding raster and the expanded data of the transmitted data. Hereafter similarly, the exclusive OR operation is performed for each raster to reproduce the data. Fig. 4 is a flow chart indicating a flow of the data expansion processing which is implemented in the controller unit 201. A program according to this flow chart is stored in a ROM (Read Only Memory) within a CPU (not shown), of the controller unit 201. In step S401, first, if data of one raster is received, then in step S402 expansion of the data is performed in a horizontal direction and thereafter the expanded data is transferred to the printer unit 202. Next, in step S403, it is determined as to whether receipt of all the image data has been completed, and if not, then in step S404, it is waited to receive the next raster of data, and if received, then in step S405, the data is expanded in a horizontal direction. In step S406, data obtained by means of performing exclusive OR operation between the expanded data and data on the preceding line is transferred, as data on the current raster, to the printer unit 202. The procedure of steps S403 to S406 is repeated until receipt of all the image data is completed. According to the above-mentioned compression and expansion scheme, if there occur continuously rasters having the same data in a vertical direction, the exclusive OR operation involved in those data result zero. Thus, also regarding the characters or the like, portion which continues in a vertical direction may be given with 0. In other words, only portions of the outline remain as data. Thus, there will be increased such a probability that 0 continuously occurs by means of compression in a horizontal direction. As a result the compression rate will be improved. Further, in case of high resolution of the image data, it often happens that the portion encircled by the outline of the character exceeds 8 pixels (one byte) so that there is no problem even if the compression in the horizontal direction is not involved in ones in units of bits. Further, with respect to the graphic data, particularly data whose resolution is lower than that of the printer employed, it is possible to expect a remarkable effect because there is much probability of occupation of the repeated portions of the preceding raster. Next, the printer unit 202 will be described. Figs. 5 and 6 illustrate an example of the printer to which a data processing method according to the present invention is applicable. There are shown an ink jet head (IJH) (recording head) 20 of a system for discharging ink toward a recording sheet, utilizing bubbles generated by thermal energy; a detachable ink jet cartridge (IJC) 21 integrated with the ink jet head (IJH) 20 and equipped with an ink tank (IT) 10 for supplying ink to said ink jet head; and the main body of the ink jet recording apparatus (IJRA). In the ink jet cartridge IJC of the present embodiment, as will be apparent from a perspective view in Fig. 5, the ink jet head IJH slightly protrudes from the front face of the ink tank IT. The ink jet cartridge IJC is of disposable type, detachably mounted on a carriage HC of the ink jet recording apparatus IJRA as will be explained later. A first ink tank IT (10), containing ink for supplying to the ink jet head IJH, is composed of an ink absorbent member, a container therefor and a cover member for closing said container (both not illustrated). The ink tank IT (10) is filled with ink and supplies the ink to the ink jet head according to ink discharge therefrom. In the present embodiment, a front plate 4 is composed of a resinous material with high ink resistance, such as polysulfone, polyethersulfone, polyphenylene oxide or polyplopylene. The ink jet cartridge IJC of the above-explained structure is detachably mounted on the carriage HC of the ink jet recording apparatus IJRA as will be explained in the following, and effects formation of a recorded image by relative movement of the carriage HC and a recording material, in response to the entry of a recording signal. Fig. 6 is a perspective view of an example of the ink jet recording apparatus IJRA equipped with mechanisms for the above-mentioned operations. Referring to Fig. 6, the ink jet head 20 of the ink jet cartridge IJC is provided with nozzles for discharging ink toward a recording surface of a recording sheet supplied from a sheet feeding unit 25 onto a platen 24. A carriage (HC) 16, for supporting the recording head 20, is linked with a part a driving belt 18 for transmitting the driving force of a driving motor 17, and is capable of reciprocating over the entire width of the recording sheet by sliding along mutually parallel two guide shafts 19A and 19B. A head recovery unit 26, positioned at an end of the moving path of the recording head 20, for example at a position corresponding to the home position of the recording unit 20, effects capping therefor when activated by a motor 22 through a transmission mechanism 23. In combination with capping operation by a cap 26A, there is conducted a discharge recovery operation by ink suction (suction recovery) by a suitable suction means (for example a suction pump) provided in the head recovery unit 26, thereby inducing forced discharge (idle discharge) of viscosified ink from the discharge openings. Also the recording head is protected by means of said capping for example after the recording operation. Such a discharge recovery operation is conducted at the start of power supply, at the replacement of the recording head, or at a pause in the recording operation exceeding a predetermined time. A wiping blade 31, positioned at a side of the head recovery unit 26 and made of silicone rubber, is supported in a cantilever mechanism by a blade support member 31A and is activated also by the motor 22 and the transmission mechanism 23 for engagement with the ink discharging surface of the recording head 20. Thus the blade 31 is made to protrude into the moving path of the recording head 20 at a suitable timing in the course of recording operation thereof or after the discharge recovery operation therefor by the recovery unit 26, thereby wiping the dew, liquid or dusts off the ink discharging surface of the recording head 20 by the movement thereof. Fig. 7 is a view showing an example of a hardware structure according to the present embodiment. In Fig. 7, the reference numeral 500 denotes a one-chip microcontroller unit (referred to as MCU hereinafter) for controlling a printer, which contains a ROM, a timer, I/O ports, an A/D converter and so on. As the MCU 500, for example TMP90C841 (Toshiba product) may be employed; 502 a power switch connected to a non-maskable interrupt port (referred to as NMI hereinafter) of the MCU 500; 513 a carriage motor driver connected to the output port of the MCU 500 for driving a carriage motor 517; 514 a motor driver for a paper feed motor (not illustrated); 515 a LED for panel indication; 516 a printer head driver for driving an ink jet head 20; 517 a warming heater driver for driving a warming heater provided on the ink jet head 20; 518 a carriage position sensor connected to the input port of the MCU 500; 519 a paper sensor; 520 a panel key switch; and 521 a thermistor for temperature detection connected to the A/D conversion port of the MCU 500, the thermistor being provided on a substrate. The raster image data, which are developed in the controller unit 201 in a manner as mentioned above, are transmitted to the MCU 500 of the printer unit 202. Upon receipt of all the raster image data of the number of lines corresponding to the recording width of the ink jet head 20, MCU 500 serves to drive carriage motor through the carriage motor driver 513 so that a main scanning starts by the carriage 16. The ink jet head 20 is driven through head driver 516 according to the image data to eject ink droplets on a recording sheet fed to the platen 24. After the main scanning, the paper feed motor is driven through the paper feed motor driver to transfer the recording sheet by a distance corresponding to the recording width, so that a sub-scan is performed. Hereafter similarly, a page of image recording is performed. Other embodiments According to the embodiment as described above, there is a limit of a maximum 127 bytes for the compression in a horizontal direction, and thus it is impossible to perform the compression over such limit. It is noted that graphic data or interlinear spaces of a sentence has much probability that the same data appear in a vertical direction. If the exclusive OR operation involved in such data is performed, a result shows that the rasters are of blank in its entirety. Thus, set of a command indicating that the rasters are of blank in its entirety would cause the compression rate to be improved. For example, the value 128 which is defined as a null according to the compression in the horizontal direction in the embodiment as described above, may means that the whole rasters are of 0. Further, while the embodiment as described above is constructed in such a manner that each of the controller unit and the printer unit has an individual CPU, it may be so arranged that a single CPU controls both units. According to the embodiments as described above, it is possible to perform the compression by means of only operations in units of bytes and thus to perform sufficiently fast the compression and expansion on a software basis. Consequently, it does not lead to cost-up owing to provision of the hardware. Further it is possible to improve the compression rate of the image data, thereby reducing an amount of data to be transmitted, and thus to perform recording without degradation of throughput of a recording apparatus even when the recording apparatus receives and records image data or a printer driver software sends the image data by using a low speed serial interface. While the embodiments as described above employ as a printer an ink jet printer of such a scheme that ink droplets are ejected using a thermal energy by way of example, the printer is not restricted in use to such type of ones. It is possible to employ various type of printer, for example, a piezo scheme of ink jet printer, a printer comprising a light beam generator such as a laser or the like and an electrophotographic process, or a thermal transfer scheme of printer. The typical structure and operational principle of a recording apparatus of the ink jet system for performing recording by forming flying ink droplets by utilizing heat energy are preferably the ones disclosed for example in U.S. Patent Nos. 4,723,129 and 4,740,796. This system is applicable to either a so-called on-demand type recording system or a continuous type recording system. Particularly, this system is effectively applicable to the on-demand type system for the following reason. When at least one driving signal that corresponds to recording information, and can give abrupt temperature rise exceeding nuclear boiling is applied to an electrothermal converting element arranged in correspondence with a sheet or liquid channel, which holds an ink, the electrothermal converting element generates heat energy, the heat energy causes film boiling on a heat acting surface of a recording head, and consequently, a bubble can be formed in the liquid (ink) in one-to-one correspondence with the driving signal. Upon growth and contraction of this bubble, the liquid (ink) is ejected through an ejection orifice, thereby forming at least one droplet. It is more preferable to define this driving signal to have a pulse waveform since a bubble can grow and contract instantaneously, and in particular, the liquid (ink) can be ejected in a short response time. As the driving signal having the pulse waveform, signals disclosed in U.S. Patent Nos. 4,463,359 and 4,345,262 are suitable. Further excellent recording can be realized when conditions disclosed in U.S. Patent No. 4,313,124 of the invention associated with the temperature rise rate of the heat acting surface are adopted. As the structure of the recording head, in addition to a structure (linear liquid channel or a right-angle liquid channel) as a combination of ejection orifices, liquid channels, and electrothermal converting elements disclosed in the above-mentioned specifications, structures disclosed in U.S. Patent Nos. 4,558,333 and 4,459,600 disclosing a structure having a heat acting structure arranged in a flexed region may be used. In addition, the recording head may be arranged based on Japanese Patent Application Laid-Open No. 59-123670 that discloses a structure wherein a common slit is used as an ejection portion for a plurality of electrothermal converting elements, or Japanese Patent Application Laid-Open No. 59-138461 that discloses a structure wheren an opening for absorbing a pressure wave of heat energy is formed in correspondence with the ejection portion. Those structures make it possible to expect effective advantages of the present invention, since the use of any type of recording head permits the recording to be reliably and effectively performed. Furthermore, the present invention is effectively applicable to a full-line type recording head having a length corresponding to the maximum width of a recording medium, which can be used in recording of a recording apparatus, either a structure which satisfies this length by combining a plurality of recording heads or a structure as an integrally formed single recording head may be employed. Also regarding the sort of the recording head to be equipped and the number thereof, it may be so arranged for example to provide a single recording head corresponding to monochromatic ink or a plurality of recording heads each corresponding to the associated one of a plurality of kinds of ink mutually different in recording color and density. As described above, according to the present invention, a simple arithmetic operation makes it possible to compress the image information in not only a horizontal direction but also a vertical direction, and thus it is possible to improve the compression rate thereby attaining a higher processing speed.

Claims: A method of compressing image data comprising a plurality of n raster lines comprising: a first step of compressing (S301) the first raster line of image data and of outputting (S302) the compressed data; a second step (S304) of performing an exclusive OR operation processing between image data on a raster line i and image data on the raster line i-1; a third step (S305) of compressing the information obtained by said exclusive OR operation processing in said second step; a fourth step (S306) of outputting the compressed information obtained in the third step; and performing the second to fourth steps for the raster lines i=2 to n. A method of expanding image data compressed by a method according to claim 1 comprising: a first step (S401) for receiving a first raster line and expanding (S402) the first raster line; a second step for receiving information representing raster line i; a third step (S405) of performing an expansion processing on the current raster line received in the second step; a fourth step (S406) of performing an exclusive OR operation processing between the expanded information representing the current line i obtained in the third step and information representing the expanded information of the preceding line i-1; and performing the second to fourth step for i=2 to i=n. A method according to claim 2, which further comprises recording on a recording material in accordance with the image information obtained after the exclusive OR operation processing of the expanded image information. A method according to claim 3, which further comprises recording an image by driving an energy generating element in accordance with image information so as to cause an ink droplet to be ejected from an orifice toward recording material. A method according to claim 4, which further comprises using a thermal energy generating element which generates thermal energy to cause a state variation in ink to eject ink from the orifice. Apparatus for compressing image data comprising a plurality of n raster lines, comprising means (101, 102) for performing an exclusive OR operation processing between image date on a raster line i and image data on the raster line i-1; means (102) for compressing the first raster line of image data and for compressing the information obtained by said exclusive OR operation; and means (102) for outputting the compressed information, said processing, compressing and outputting means being arranged to perform the exclusive OR processing, compressing and outputting for each of the raster lines i=2 to n. A recording apparatus for expanding image data compressed by a method according to claim 1, comprising: means (201) for receiving information compressed by a method according to claim 1; means (201) for expanding the received raster lines; means (201) for performing exclusive OR operation processing between the expanded information representing the raster line i and the expanded information representing the preceding raster line i-1; and means (201, 202) for processing the expanded information representing a first raster line and the results of the exclusive OR operation processing and for recording the resulting information as raster lines. A recording apparatus according to claim 7, which comprises at least one energy generating element drivable in accordance with said processed information to cause ink to be ejected from an associated orifice toward a recording medium.

Inventors: NAKAGAWA YOSHIHIRO, SASAKI MASAO, NAKAGAWA, YOSHIHIRO, SASAKI, MASAO, Nakagawa, Yoshihiro, c/o Canon Kabushiki Kaisha, SASAKI, MASAO, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: G06K15
IPC codes: G06F3, B41J29, G06K15, B41J2, B41J5, H04N1, G06T9