Abstract:
Entered image data is stored in a page buffer on a per-page basis, and image data that has been stored in the page buffer is subjected to error diffusion processing on a per-raster basis, thereby creating and outputting binarized data. Sub-scanning direction error due to error diffusion processing is stored in an error buffer at the time of binarization. The error buffer is initialized based upon positions, in the sub-scanning direction, of a raster that underwent error diffusion processing immediately previously and a raster to undergo error diffusion processing, and the number of rasters on a page. As a result, it is possible to avoid a deterioration in image quality at page boundaries and at the beginning of an image simultaneously when data for printing on elongated sheets of paper is processed.

Description:
FIELD OF THE INVENTION  
         [0001]    This invention relates to an image processing apparatus and method and, more particularly, to an image processing apparatus and method for applying binarization processing to image data extending over a plurality of pages.  
         BACKGROUND OF THE INVENTION  
         [0002]    An ink-jet printing apparatus that forms an image on a printing medium by ejecting ink droplets onto the medium from a printhead has been proposed as an apparatus for printing documents and images generated by a computer. An ink-jet printer generally expresses an output image by absence or presence of dots formed by the ink droplets.  
           [0003]    Accordingly, a printer driver installed in a host device connected to such an ink-jet printer sends the ink-jet printer print data, which is obtained by subjecting an input image acquired from an application program to color conversion processing and then executing binarization processing by pseudo-gray-scaling means such as the error diffusion method, and the inkjet printer forms an output image by ejecting ink droplets in accordance with the print data received.  
           [0004]    The error diffusion method is described in “An Adaptive Algorithm for Spatial Gray Scale”, by R. Floyd, et al., SID International Symposium Digest of Technical Papers, vol. 4.3, 1975. As shown in FIG. 4, this method, where P represents a pixel of interest, v the density of this pixel, v 0 , v 1 , v 2  and v 3  the densities of unbinarized pixels P 0 , P 1 , P 2  and P 3 , respectively, neighboring the pixel of interest P, and T a threshold value for binarizing these densities, is a method of diffusing binarization error E at the pixel of interest P to the neighboring pixels P 0 , P 1 , P 2 , P 3  by weighting coefficients W 0 , W 1 , W 2 , W 3 , respectively, determined empirically, thereby making mean density of the output image equal to the density of the input image macroscopically.  
           [0005]    Errors E 0 , E 1 , E 2 , E 3  with regard to the neighboring pixels P 0 , PI, P 2 , P 3  can be obtained by the following equations, where o represents output binary data:  
           if  v≧T  holds, then  o= 1,  E=v−V max;  
           if  v≦T  holds, then  o= 0,  E=v−V min;  
           [0006]    where Vmax and Vmin represent maximum and minimum densities, respectively; and  
             E   0 = E×W   0   (1)  
             E   1 = E×W   1   (2)  
             E   2 = E×W   2   (3)  
             E   3   E=W × 3   (4)  
           [0007]    Known examples of weighting coefficients are W 0 ={fraction (7/16)}, W 1 ={fraction (1/16)}, W 2 ={fraction (5/16)}, W 3 ={fraction (3/16)}.  
           [0008]    Since error diffusion processing is executed one raster at a time in the main-scanning direction, generally error in the sub-scanning direction (paper transfer direction) is stored in a storage device referred to as an error buffer and is used at the processing of the next raster.  
           [0009]    In a case where a plurality of pages are printed, the image quality of the leading end (beginning) of a page deteriorates when error from the trailing end of the preceding page propagates to the leading end of the aforesaid page. The general practice, therefore, is to initialize the error buffer when a new page begins. Similarly, in a case where a plurality of images  602  and  603  are arrayed in the sub-scanning direction on the same page  601 , as shown in FIG. 6, image quality at the upper end of the image  603  deteriorates if error in the sub-scanning direction that has occurred at the lower end of the image  602  propagates to processing of image  603 . In a known method, therefore, a deterioration in the image quality at the upper end of the image  603  is similarly prevented by initializing the error buffer immediately before binarization processing of the image  603  is started.  
           [0010]    A printing apparatus of the above kind is capable of printing not only on so-called single-cut sheets (referred to as “cut sheets” below) but also on elongated sheets (referred to as “banner sheets” below) such as roll paper or banner paper (such printing shall be referred to as “long-length printing”). In this case, the amount of data that can be handled by an application program generally is limited. When long-length printing is performed, therefore, in general a printer driver is supplied with image data on a per-page basis in a form in which the data, which is for printing one image  702  on an elongated printing medium  701  of the kind shown in FIG. 7, is divided into a plurality of pages.  
           [0011]    However, if an image that is originally a single image is simply divided into a plurality of pages and then binarized, a deterioration in image quality occurs at the page boundaries because the error buffer is initialized at these boundaries.  
           [0012]    Methods of solving this problem are disclosed in the specifications of Japanese Patent Application Laid-Open Nos. 2000-158714 and 10-329383. These methods prevent a deterioration in image quality at page boundaries by not initializing the error buffer at the boundary of each page when long-length printing is carried out.  
           [0013]    With the methods described in the above-mentioned specifications, however, initialization of the error buffer is not always performed at the time of long-length printing. As a consequence, binarization error is propagated between different images and a deterioration in image quality results.  
           [0014]    For example, when long-length printing of a banner sheet  801  having a length of two cut sheets and including images  802 ,  803  is performed, binarization error at the lower edge of the image  802  propagates to the image  803 , regardless of the fact that the two images  802  and  803  are separate objects, and therefore a deterioration in image quality occurs.  
         SUMMARY OF THE INVENTION  
         [0015]    Accordingly, an object of the present invention is to provide an image processing apparatus in which it is possible to avoid a deterioration in image quality at page boundaries and at the beginning of images simultaneously when long-length printing data is processed.  
           [0016]    Another object of the present invention is to provide an image processing method through which it is possible to avoid a deterioration in image quality at page boundaries and at the beginning of images simultaneously when long-length printing data is processed.  
           [0017]    A further object of the present invention is to provide a printer driver in which it is possible to avoid a deterioration in image quality at page boundaries and at the beginning of images simultaneously when long-length printing data is processed.  
           [0018]    According to one aspect of the present invention, the foregoing objects are attained by providing an image processing apparatus comprising: a page buffer for storing entered image data on a per-page basis; and binarizing means for subjecting image data, which has been stored in the page buffer, to error diffusion processing on a per-raster basis, thereby generating binarized data, and outputting the binarized data, wherein the binarizing means includes an error buffer for storing sub-scanning direction error due to the error diffusion processing, and error-buffer initializing means for initializing the error buffer based upon positions, in the sub-scanning direction, of a raster that underwent error diffusion processing immediately previously and a raster to undergo error diffusion processing, and number of rasters on a page.  
           [0019]    According to another aspect of the present invention, the foregoing objects are attained by providing an image processing method comprising: a page buffering step of storing entered image data in a page buffer on a per-page basis; and a binarizing step of subjecting image data, which has been stored in the page buffer, to error diffusion processing on a per-raster basis, thereby generating binarized data, and outputting the binarized data, wherein the binarizing step includes an error buffering step of storing sub-scanning direction error due to the error diffusion processing in an error buffer, and an error-buffer initializing step of initializing the error buffer based upon positions, in the sub-scanning direction, of a raster that underwent error diffusion processing immediately previously and a raster to undergo error diffusion processing, and number of rasters on a page.  
           [0020]    According to a further aspect of the present invention, the foregoing objects are attained by providing a printer driver installed in a host device connected to a printer, comprising code of a program for implementing: a page buffering step of storing entered image data in a page buffer on a per-page basis; and a binarizing step of subjecting image data, which has been stored in the page buffer, to error diffusion processing on a per-raster basis, thereby generating binarized data, and outputting the binarized data, wherein the binarizing step includes an error buffering step of storing sub-scanning direction error due to the error diffusion processing in an error buffer, and an error-buffer initializing step of initializing the error buffer based upon positions, in the sub-scanning direction, of a raster that underwent error diffusion processing immediately previously and a raster to undergo error diffusion processing, and number of rasters on a page.  
           [0021]    Thus, according to the present invention, entered image data is stored in a page buffer page by page, image data that has been stored in the page buffer is subjected to error diffusion processing raster by raster, thereby creating and outputting binarized data, sub-scanning direction error due to error diffusion processing is stored in an error buffer at the time of binarization, and the error buffer is initialized based upon positions, in the sub-scanning direction, of a raster that underwent error diffusion processing immediately previously and a raster to undergo error diffusion processing, and number of rasters on a page.  
           [0022]    If this arrangement is adopted, whether processing is that applied to the same image on the same page can be determined depending upon whether positions, in the sub-scanning direction, of a raster that underwent error diffusion processing immediately previously and a raster to undergo error diffusion processing are contiguous or not. By comparing the number of a raster that underwent error diffusion processing immediately previously, the number of a raster to undergo error diffusion processing and the number of rasters in page, it is possible to determine whether processing is that applied to an image extending from the trailing end of a page to the leading end of the next page, and the error buffer can be initialized based upon the result of determination.  
           [0023]    Accordingly, when image data to be printed on an elongated printing medium is processed, the error buffer is initialized at such time that binarization processing of a different image is executed, irrespective of whether an image extends over a plurality of pages, thereby making it possible to avoid a deterioration in image quality at page boundaries and at the beginning of an image simultaneously when long-length printing data is processed.  
           [0024]    The number of rasters on the page can be set with regard to each page when the apparatus has been set in such a manner that image data extending over a plurality of pages is processed as contiguous image data.  
           [0025]    The binarizing means may have the error buffer for each of a plurality of colors, and the error-buffer initializing means may initialize the error buffers simultaneously.  
           [0026]    Preferably, the error-buffer initializing means initializes the error buffer in a case where positions, in the sub-scanning direction, of a raster that underwent error diffusion processing immediately previously and a raster to undergo error diffusion processing are not contiguous and, moreover, the raster that underwent error diffusion processing immediately previously is not a trailing-end position of a page or the raster to undergo error diffusion processing is not a leading-end position of a page.  
           [0027]    The apparatus may further comprise color conversion means for subjecting entered color image data to color conversion processing, wherein the binarized data is output data applied to a printer.  
           [0028]    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. 
       
    
    
     DESCRIPTION OF THE DRAWINGS  
       [0029]    The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.  
         [0030]    [0030]FIG. 1 is a block diagram illustrating the structure of a binarizing unit according to a first embodiment of the present invention;  
         [0031]    [0031]FIG. 2 is a flowchart illustrating the flow of processing according to the first embodiment;  
         [0032]    [0032]FIG. 3 is a block diagram illustrating an example of binarization processing based upon error diffusion used in this embodiment;  
         [0033]    [0033]FIG. 4 is a diagram illustrating an example of an error distribution window used in this invention;  
         [0034]    [0034]FIG. 5 is a block diagram illustrating the structure of a first embodiment of an image processing apparatus according to the present invention;  
         [0035]    [0035]FIG. 6 is a diagram illustrating an example in which a plurality of images are arrayed in the sub-canning direction on the same page of a cut sheet;  
         [0036]    [0036]FIG. 7 is a diagram illustrating an example in which an elongated image having a length greater than that of a cut sheet resided in the sub-scanning direction on an elongated sheet;  
         [0037]    [0037]FIG. 8 is a diagram illustrating an example in which a plurality of images are arrayed in the sub-canning direction on an elongated sheet;  
         [0038]    [0038]FIG. 9 is a diagram illustrating an example of an elongated sheet capable of being dealt with by a second embodiment of the present invention; and  
         [0039]    [0039]FIG. 10 is a flowchart illustrating the flow of processing according to the second embodiment. 
     
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0040]    Preferred embodiments of the present invention will now be described in detail in accordance with the accompanying drawings.  
         [0041]    &lt;First Embodiment&gt; 
         [0042]    [0042]FIG. 5 is a block diagram illustrating the structure of a first embodiment of an image processing apparatus according to the present invention.  
         [0043]    The image processing apparatus according to this embodiment as illustrated includes an input unit  501 , a printer driver  503  and an output unit  504 . The input unit  501  transmits an input image  502  to the printer driver  503 , and the printer driver  503  subjects the input image to color conversion processing and binarization processing and transmits the processed image to the output unit  504 .  
         [0044]    The input unit  501  partitions the input image  502  on a per-page basis and transmits the resultant signal to the printer driver  503 . In a case where the print setting is for long-length printing, the input unit  501  transmits the information concerning maximum page length (number of lines contained on one page) to the printer driver  503 .  
         [0045]    The printer driver  503  comprises a page buffer  506 , a color converter  507 , a binarizing unit  508  and a control unit  509 . The control unit  509  transmits a read signal to the input unit  501 , in response to which the page-by-page input image, which is transmitted from the input unit  501 , is stored in the page buffer  506 . In a case where the input image  502  is printed by long-length printing, the information concerning maximum page length transmitted from the input unit  501  is stored as an internal variable.  
         [0046]    Next, the control unit  509  transmits an address signal to the page buffer  506 , in response to which image data is transmitted from the page buffer  506  to the color converter  507  on a per-raster basis. At the same time, the control unit  509  transmits line-number information vPos of the raster data to the color converter  507  and binarizing unit  508 . Raster data that has undergone color conversion by the color converter  507  and binarization by the binarizing unit  508  is transmitted to the output unit  504  together with an address sent from the control unit  509 .  
         [0047]    When image data within the page buffer  506  is thus processed successively on a per-raster basis and conversion processing of all rasters ends, the control unit  509  again transmits a read signal to the input unit  501  and, in response, the input unit  501  transmits the input image of the next page to the page buffer  506 . If there is no next page, then the input unit  501  sends back an end signal. As a result, the control unit  509  transmits the end signal to the output unit  504  and all processing ends.  
         [0048]    The raster-by-raster input image, which is composed of the colors R, G, B of eight bits each ( 256  values per color), is sent from the page buffer  506 . The color converter  507  converts this image data to raster data, which is composed of the colors C (cyan), M (magenta), Y (yellow), K (block) of eight bits each ( 256  values per color), and outputs the resultant data to the binarizing unit  508 . The latter binarizes the raster-by-raster data of the colors C, M, Y, K of eight bits each ( 256  values per color) transmitted from the color converter  507  and sends the binarized data to the output unit  504  one bit at a time.  
         [0049]    In this embodiment, a case in which processing is executed to binarize all of the colors C, M, Y, K to 1-bit binary data is described. However, a different number of output bits per color and a different number of levels per color may be adopted.  
         [0050]    [0050]FIG. 1 is a block diagram illustrating the structure of the binarizing unit  508  according to this embodiment.  
         [0051]    As shown in FIG. 1, the binarizing unit  508  includes an error-buffer initializing unit  101  which, on the basis of maximum page length and line-number information, generates and outputs an initializing signal for initializing error buffers. Reference numerals  102 ,  103 ,  104  and  105  denote error diffusion processors for subjecting the input  8 -bit data of the colors C, M, Y, K, respectively, to error diffusion processing and outputting the processed data. Reference numerals  106 ,  107 ,  108  and  109  denote error buffers incorporated within the error diffusion processors  102 ,  103 ,  104  and  105 , respectively. The error buffers  106 ,  107 ,  108  and  109  are used to propagate error in the sub-scanning direction to the next raster. The error values stored in these error buffers are initialized by the initializing signal output from the error-buffer initializing unit  101 .  
         [0052]    [0052]FIG. 2 is a flowchart illustrating the flow of processing by the image processing apparatus of this embodiment. In the description that follows, “a=10” signifies an operation for substituting 10 into a variable a, “a==10” signifies a comparison operation for determining whether the variable a is equal to 10, and “A&amp;&amp;B” signifies “A and B”.  
         [0053]    First, a variable lastvPos within the error-buffer initializing unit  101  is initialized to −2 (step S 201 ). The variable lastvPos is used to store a line number at which binarization processing was executed. Next, it is determined whether long-length printing has been set (step S 202 ). If long-length printing has been set (“YES” at step S 202 ), then maximum page length that prevailed when the input image was divided into pages is set in a variable vmax within the error-buffer initializing unit  101  (step S 203 ). If long-length printing has not been set (“NO” at step S 202 ), then 0 is set in vMax (step S 204 ).  
         [0054]    Next, it is determined whether image processing of all pages of the input image has been completed (step S 205 ). Specifically, if the control unit  509  has transmitted the read signal to the input unit  501  and the input unit  501  has sent back an end signal, then the control unit  509  decides that image processing of all pages has ended and transmits the end signal to the output unit  504 , thereby terminating processing. On the other hand, if it is determined that image processing of all pages has not been completed, i.e., that a page for which image processing has not been completed exists, then the input image of the next page is read into the page buffer  506  (step S 206 ).  
         [0055]    The control unit  509  transmits R, G, B input image data to the color converter  507  on a per-raster basis and transmits the line number to the color converter  507  and binarizing unit  508 . The color converter  507  converts the input image data to C, M, Y, K raster data of eight bits per color and transmits the C, M, Y, K raster data to the error diffusion processors  102 ,  103 ,  104 ,  105 , respectively (step S 207 ).  
         [0056]    Next, the error-buffer initializing unit  101  within the binarizing unit  508  performs the following comparison operation with regard to the entered vPos and the internally stored lastvPos (step S 208 ):  
           vPos ==last vPos +1  (5)  
         [0057]    If the result if this comparison operation is true (“YES” at step S 208 ), then this means that the entered line (raster) numbers are consecutive, i.e., processing with regard to the same image on the same page. As a result, control proceeds to binarization processing (step S 211 ).  
         [0058]    If the result of the comparison of Eq. (5) is false (“NO” at step S 208 ), on the other hand, then the following comparison operation is performed (step S 209 ):  
         last vPos==V max−1&amp;&amp;  vPos ==0  (6)  
         [0059]    If the result of this comparison operation is true (“YES” at step S 209 ), then this means processing with regard to the same image extending from the trailing edge of the page to the next page. As a result, control proceeds to binarization processing (step S 211 ). If the result of this comparison operation is false (“NO” at step S 209 ), on the other hand, then the error-buffer initializing unit  101  transmits the initializing signal to the error buffers  106 ,  107 ,  108 ,  109 , thereby initializing the content of these buffers (step S 210 ). Control then proceeds to binarization processing (step S 211 ).  
         [0060]    Binarization processing of all colors of one raster is then executed and vPos is stored in the variable lasvPos within the error-buffer initializing unit  101  (step S 212 ).  
         [0061]    Next, it is determined whether binarization processing of all rasters that have been stored in the page buffer  506  has ended (step S 213 ). If binarization processing of all rasters has ended (“YES” at step S 213 ), then control returns to step S 205 . If processing of all pages has not ended (“NO” at step S 205 ), then the next page is read into the page buffer  506  (step S 206 ). If it is found at step S 213  that a raster for which binarization processing has not ended remains (“NO” at step S 213 ), then control returns to step S 207  and image processing of the next raster is started.  
         [0062]    Thus, processing is terminated only in a case where the processing of all pages has ended at step S 205 .  
         [0063]    The processing (step S 210 ) for initializing error buffers according to this embodiment is executed only when the following two conditions are satisfied simultaneously:  
         [0064]    1. the line number of the raster that has undergone binarization immediately previously and the line number of the raster binarized next are nonconsecutive (“NO” at step S 208 ); and  
         [0065]    2. the line number of the raster that has undergone binarization immediately previously is not a value indicative of the trailing edge of a page, or the line number of the raster binarized next is not indicative of the leading end of a page (“NO” at step S 209 ).  
         [0066]    In other words, initialization of error buffers is not carried out in a case where images are contiguous on the same page and in a case where an image extends from the trailing edge of a page to the next page.  
         [0067]    An example of binarization processing by error diffusion at step S 211  will be described with reference to FIG. 3. Here a pixel value inVal of a pixel of interest from input raster data  301  transmitted from the color converter  507  is sent to an adder  304 .  
         [0068]    Error E 0  from a latch  309  and error err 0  from the preceding raster read out of an error buffer  303  are sent to the adder  304  simultaneously, the following addition processing is executed and an error correction value 1Value is output to a comparator  306  and subtractor  307 :  
         1Value= inVal +E 0 +err 0   (7)  
         [0069]    A threshold setting unit  305  sends a threshold value “threshold” to the comparator  306 . The threshold value “threshold” may be a fixed value or a value that varies depending upon an element such as an input value.  
         [0070]    The comparator  306  compares the error correction value 1Value output from the adder  304  and “threshold” output from the threshold setting unit  305  and outputs a binarized result binData to an output image  302  and to the subtractor  307 .  
         [0071]    The subtractor  307  subtracts binData output from the comparator  306  from 1Value output from the adder  304  by the following processing and outputs the result E to an error distribution unit  308 :  
           E= 1Value−binData  (8)  
         [0072]    The error distribution unit  308  performs the operations of Equations (1) to (4) using the error E output from the subtractor  307 , and transmits distributed errors E 0 , E 1 , E 2 , E 3  to latches  309 ,  310  and adders  311 ,  313 , respectively.  
         [0073]    The error distributed corresponds to the error window  401  in FIG. 4. The distributed error E 0  is input to the latch  309  and is input to the adder  304  again after being delayed by one pixel. Further, the distributed error E 1  is input to the latch  310 , a delay of one pixel is applied and then the resultant signal is input to the adder  311  so as to be added to the distributed error E 2 . The output of the adder  311  is input to the latch  312 , a delay of one pixel is applied and then the resultant signal is input to the adder  313  so as to be added to the distributed error E 3 . An output Esum from the adder  313  is written to the error buffer  303 .  
         [0074]    In this embodiment, the location at which error is written is two pixels to the left or two pixels to the right of the pixel of interest owing to the direction of binarization processing. The direction of binarization processing is switched every several lines.  
         [0075]    &lt;Second Embodiment&gt; 
         [0076]    A second embodiment of an image processing apparatus according to the present invention will now be described. The image processing apparatus according to the second embodiment has a structure similar to that of the first embodiment and components similar to those of the first embodiment need not be described again. The following description will focus on the characterizing features of the second embodiment.  
         [0077]    The image processing apparatus of the second embodiment differs from that of the first embodiment in that length in the sub-scanning direction (the direction in which printing paper is transported) can be specified page by page in a case where long-length printing is performed.  
         [0078]    [0078]FIG. 9 is a diagram illustrating an example of long-length printing according to this embodiment. Here a printing medium  901  used has a length greater than that of one page of a cut sheet used ordinarily but less than that of two pages of cut sheets. An image  902  is printed from one page to the next. In this case, by making length  903  of page  1  the same as that of an ordinary cut sheet and making length  904  of page 2 the remaining length, print data can be generated by executing image processing efficiently with respect to printing media of various lengths.  
         [0079]    The flow of processing executed by the image processing apparatus of this embodiment will be described with reference to the flowchart of FIG. 10.  
         [0080]    First, the variable lastvPos within the error-buffer initializing unit  101  is initialized to −2 (step S 1001 ). The variable lastvPos is used to store a line number at which binarization processing was executed. Next, it is determined whether image processing of all pages of the input image has been completed (step S 1002 ).  
         [0081]    Specifically, if the control unit  509  has transmitted the read signal to the input unit  501  and the input unit  501  has sent back an end signal, then the control unit  509  decides that image processing of all pages has ended and transmits the end signal to the output unit  504 , thereby terminating processing. On the other hand, if the end signal has not been sent back from the input unit  501 , then it is determined that there is an unprocessed page and the input image of the next page is read into the page buffer  506  (step S 1003 ).  
         [0082]    Next, it is determined whether long-length printing has been set (step S 1004 ). If long-length printing has been set (“YES” at step S 1004 ), then maximum page length corresponding to the input image that has been read into the page buffer  506  is set to the variable vMax within the error-buffer initializing unit  101  (step S 1005 ). Otherwise, 0 is set to vMax (step S 1006 ).  
         [0083]    Thereafter, the raster-by-raster R, G, B input image data is sent to the color converter  507  and the line number is transmitted to the color converter  507  and binarizing unit  508 . The color converter  507  converts the input image data to C, M, Y, K raster data of eight bits per color and transmits the C, M, Y, K raster data to the error diffusion processors  102 ,  103 ,  104 ,  105 , respectively (step S 1007 ).  
         [0084]    Next, the error-buffer initializing unit  101  within the binarizing unit  508  performs the following comparison operation with regard to the entered vPos and the internally stored lastvPos (step S 1008 ):  
           vPos ==last vPos +1  (9)  
         [0085]    If the result if this comparison operation is true (“YES” at step S 1008 ), then this means that the entered line numbers are consecutive, i.e., processing with regard to the same image on the same page. As a result, control proceeds to binarization processing (step S 1011 ).  
         [0086]    If the result of the comparison of Eq. (9) is false (“NO” at step S 1008 ), on the other hand, the following comparison operation is performed (step S 1009 ):  
         last vPos==V max−1&amp;&amp;  vPos ==0  (10)  
         [0087]    If the result of this comparison operation is true (“YES” at step S 1009 ), then this means processing with regard to the same image extending from the trailing edge of the page to the next page. As a result, control proceeds to binarization processing (step S 1011 ). Otherwise, the error-buffer initializing unit  101  transmits the initializing signal to the error buffers  106 ,  107 ,  108 ,  109 , thereby initializing the content of these buffers (step S 1010 ). Control then proceeds to binarization processing (step S 1011 ).  
         [0088]    Binarization processing of all colors of one raster is then executed and vPos is stored in the variable lasvPos within the error-buffer initializing unit  101  (step S 1012 ).  
         [0089]    Next, it is determined whether binarization processing of all rasters that have been stored in the page buffer  506  has ended (step S 1013 ). If binarization processing of all rasters has ended (“YES” at step S 1013 ), then control returns to step S 1002 , where it is determined whether the processing of all pages has ended. On the other hand, if it is found at step S 213  that a raster for which binarization processing has not ended remains (“NO” at step S 1013 ), then control returns to step S 1007  and image processing of the next raster is started.  
         [0090]    Thus, processing is terminated only in a case where the processing of all pages has ended at step S 1002 .  
         [0091]    In this embodiment also, conditions for initializing error buffers are similar to those of the first embodiment, and initialization of error buffers is not carried out in a case where images are contiguous on the same page and in a case where an image extends from the trailing edge of a page to the next page.  
         [0092]    &lt;Other Embodiments&gt; 
         [0093]    The present invention can be applied to a system comprising a plurality of devices (e.g., host computer, interface, reader, printer) or to an apparatus comprising a single device (e.g., copying machine, facsimile machine).  
         [0094]    Further, the object of the present invention can also be achieved by providing a storage medium storing program codes for performing the aforesaid processes to a computer system or apparatus (e.g., a personal computer), reading the program codes, by a CPU or MPU of the computer system or apparatus, from the storage medium, then executing the program.  
         [0095]    Tn this case, the program codes read from the storage medium realize the functions according to the embodiments, and the storage medium storing the program codes constitutes the invention.  
         [0096]    Further, the storage medium, such as a floppy disk, a hard disk, an optical disk, a magneto-optical disk, CD-ROM, CD-R, a magnetic tape, a non-volatile type memory card, and ROM can be used for providing the program codes.  
         [0097]    Furthermore, besides aforesaid functions according to the above embodiments being realized by executing the program codes which are read by a computer, the present invention also includes a case where an OS (operating system) or the like working on the computer performs parts or entire processes in accordance with designations of the program codes and realizes functions according to the above embodiments.  
         [0098]    Furthermore, the present invention also includes a case where, after the program codes read from the storage medium are written in a function expansion card which is inserted into the computer or in a memory provided in a function expansion unit which is connected to the computer, a CPU or the like contained in the function expansion card or unit performs a part or entire process in accordance with designations of the program codes and realizes functions of the above embodiments.  
         [0099]    If the present invention is realized as a storage medium, program codes corresponding to the above mentioned flowcharts (FIG. 2 and/or FIG. 10) are to be stored in the storage medium.  
         [0100]    As is apparent, many different embodiments of the present invention can be made without departing from the spirit and scope thereof, so it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.