Image processing apparatus

Abstract: Image processing apparatus comprising an input means to input the data of objective pixel, calculation means to obtain average density value in the specified region and quantization means to quantize the data of the objective pixel based on the said average density value wherein the entire image including its edge is effectively binalized and in the serial scanning of data, continuity is not lost at the connection of scans, thus enabling to obtain the image with excellent gradation and resolution.

Description: The present invention relates to an image processing apparatus which executes quantization of image data into binary data or multi-level data, particularly image processing apparatus which executes intermediate shade (or gradation) processing of input image data. For a semi-intermediate (or pseudo gradation) processing system of the image processing apparatus such as facsimile or digital copying machine, there has been proposed amongst other methods the error diffusion method and the average density approximation method. The error diffusion method is a method of binarizing multi-level image data of an objective pixel (to convert into darkest or shortest level), giving specific weight to the difference between the binarized level and multi-level image data prior to binarization and adding it to the data of a pixel near the objective pixel as disclosed in the literature of R. Floyd & L. Steinberg entitled "An adaptive algorithm for spatial gray scale", SUD 75 DIGEST, PP. 36 - 37. The average density, approximation method is the method, as described in Japanese Unexamined Patent Publication (Kokai) No. 57-104369, wherein the weighted means value of the respective weights of the objective pixel binarized into black and white and that of the neighbouring pixel are obtained using the already binarized binary data of the pixel near the objective pixel and thereby the image data of the objective pixel are binarized using the average of the two mean values as the threshold. Since the aforesaid error diffusion method is the method to correct the error between the input image data and the output image data, it is possible to maintain the input image and the density of the output image processing unit and produce the image with excellent resolution and shade characteristics. However at the correction of the error between input image data and output image data, many two dimensional calculations must be made and the magnitude of processing volume is so large that the composition of hardware inevitably becomes complicated. On the other hand, according to the average density approximation method, calculation is made using binary data after binarization and consequently composition of hardware may be simplified and the processing can be made at a high speed since the processing volume is extremely small. However this method has such drawback that since binarization is conducted simply through approximation of objective pixel by the average value of the range which contains the objective pixel, number of shades is limited and a specific low frequency texture is generated to the image which has the gradually changing density and picture quality deteriorates. Besides, the drawback common to these systems is that when the manuscript image is divided into more than two regions, discontinuity occurs between the data of the divided images and thus picture quality deteriorates. In other words, the error diffusion method has such drawback that at the point near the starting point of binarization of divided image, the error for correction is not transmitted and it tends to become the so-called binarization processing by fixed threshold. In view of the above, the applicant of the present invention has applied for patent in U.S. Patent Application S.N. 203,880 for the technology to provide continuity to the plural number of regions at the binarization by the error diffusion method. However the average density approximation method has such drawback that at the calculation of average density, the already binarized data are not repeated and consequently the expression of intermediate shade becomes discontinuous at the connecting part between the divided images after binarization processing and thus picture quality deteriorates. The present invention is concerned with reducing the aforesaid problems and providing an image processing apparatus which can substantially reduce the processing volume for quantization and at the same time reproduce an image with excellent intermediate shade (or an excellent halftone image). Another concern of the present invention is to provide an image processing apparatus which gives an accurate semi-intermediate shade to the terminal part of the binarized image in the serial scanning which has been the problem of the conventional method. U.S. Patent Specification US-A-4,196,452 discloses image processing apparatus which binarizes image data from successive image regions. European Patent Specification No. EP-A-0,295,105 discloses apparatus for reading an image in which the image data is binary digitized and streaks are avoided by extending the binary digitization to an overlapping area. It will be appreciated that US Patent Specification No. US-A-4,196,452 makes no contribution towards the problem of preventing discontinuities at the connecting part between divided images. European Patent Specification No. EP-A-0,295,105 also does not provide an adequate solution to the above problem as it merely discloses using the previously obtained average density value and converting image data into binary data using this average density value as a threshold, but without using multi-value pixel data. According to the present invention there is provided image processing apparatus as set out in claim 1. Features of the present invention will be made clear from the detailed explanation of exemplary embodiments which are based on the following drawings. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1A is a block diagram indicating the composition of the image processing apparatus of the 1st embodiment. Fig. 1B is a block diagram to indicate the detailed composition of the binarized processing unit of the 1st embodiment. Figs. 2A-2D and Figs. 3A and 3B are the drawings to explain the principle of the treating system of the image processing apparatus of the 1st embodiment. Fig. 4 is the drawing to explain the scanning system of the image processing apparatus of the 1st - 3rd embodiments. Figs. 5A and 5B are the drawings to explain the principle of binarization executed by the 2nd and 3rd embodiments. Fig. 6 is the block diagram to show the composition of the image processing apparatus of the 2nd and 3rd embodiments. Fig. 7 is the block diagram to indicate the details of the binary circuit of the 2nd embodiment. Fig. 8 is the block diagram to indicate the details of the binary circuit in the 3rd embodiment. Figs. 9A - 9C are the drawings to show the example of weight mask. DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS (1st Embodiment) An embodiment of the present invention is explained in detail in reference to the attached drawing. Fig. 1A is the block diagram of the image processing apparatus of the present embodiment. In Fig. 1A, 100 is the image read unit to read the image of the manuscript (or original) wherein the read analogue image signal is input into quantization unit 101, converted into a digitized signal, given publicly known correction processing such as logarithmic conversion, shading correction, etc. and the data 200 used for recording is obtained. The said data 200 is input into the binarization processing unit 102 where the present system is executed, binarized and output as the binarized signal 201 and binary image is produced as the semi-intermediate shade at image output unit 103. Here the binarization processing unit 102 is composed of the data switch unit 102b which switches binary data 201 and multi-level data 200 in the calculation of average density, average density maintenance unit 102a comprising the average density calculation processing unit and error diffusion processing unit and switch control unit 102c which controls switching at the data switch unit 102b. The image processing equipment of this embodiment is the so-called serial scanning unit which reads the manuscript in bands with width of ℓ and length of m and reproduce it as binary data. Next the principle of binarization system of the present embodiment is explained. In the present embodiment, the conventional average density approximation method is introduced as the preferred binarization method. This method has been applied for patent by the present applicant in the following applications: (1) New U.S. Patent Application applied in the U.S. in February 1990 on the basis of priority claim of Japanese Patent Application Nos. 1-31404, 1-31405, 1-31408, 1-31409 (all applied on February 10, 1989). (2) New U.S. Patent Application applied in the U.S. in February 1990 on the basis of priority claim of Japanese Patent Application Nos. 1-31411 (applied on February 10, 1989) and 1-284879 (applied on November 2, 1989). In Fig. 2A, f (i, j) indicates the multiple density data of input image at the object pixel to be binarized and the values are the normalized 0 - 1 value. The pixel position above the dotted line is already binarized and after binarization of the object pixel, similar sequential processing is executed one after another in the order of f (i, j+1), f (i, j+2), ... Fig. 2B is a diagram showing the binarized image data and B (i, j) shows the density of objective pixel after binarization (the values of 0 or 1). The part surrounded by dotted lines is the pixel data which has already been binarized at the time of processing of object pixel and this is used for the binarization processing of object pixel. Fig. 2C is a drawing showing the weight-giving mask and Fig. 2D is a drawing showing examples of actual figures of the weight-giving mask. R is an example of the weight-giving mask for obtaining average density and it is expressed by the matrix of 3 x 3 size. The weight of the position where objective pixel falls is R (0, 0) and it is used as R (0, 1) = 0. Under this system, the average density of the output image near the object pixel when the object pixel is binarized into either black or white is named ml (i, j) and mo (i, j) which are determined by the following formula. [here, B (i, j) = 1, that is, the case when object pixel is deemed black] [here, B (i, j) = 0, that is the case when the object pixel is deemed white] Next using the aforesaid average density ml and m0, the multi-level density f (i, j) of the objective pixel is binarized by the following formula. In the above formulae 3, E (i, j) is the error which is produced when the multiple-level density (i, j-1) of the pixel (i, j-1) one position prior to the objective pixel (i, j) is binarized into binary density B (i, j-1). Binarization of input pixel density of (i, j-1) into 1 or 0 means that the pixel (i, j-1) has been approximated into either ml (i, j-1) or m0 (i, j-1) which represent the average density in its neighbourhood and in each case, an error of f (i, j-1) - ml or f (i, j-1) - m0 is generated between such density and the multiple-level density f (i, j-1) of input pixel. Therefore, by binarizing the value corrected by adding such binarized error E (i, j) to the objective pixel of (i, j), it is possible to completely maintain the density of the binarized image for the entire range of input image. The most important characteristic of this system is in such processing method that takes into account the error of binarization thus providing by far better intermediate shade reproducing potency when compared to the aforesaid average density approximation method. In formula 3 ○, E (i, j+1) is the error to be allocated to the pixel (i, j=1) one pixel after the objective pixel (i, j). As shown in Fig. 3A and 3B, E (i, j+1) is the balance given by subtracting ml from f (i, j) + E (i, j) when f (i, j) + E (i, j) > (m1 + m0)/2 and the balance given by subtracting m0 from f (i, j) + E (i, j) when f (i, j) + E (i, j) ≦ (m1 + m0)/2. Like above, in the present embodiment of average density maintenance method, in spite that the processing volume is extremely small when compared to that of the error diffusion method, the same or even better image reproducing capacity is obtained. It is because, in this method, in spite that the aforesaid error is corrected only by the adjacent one pixel, by obtaining the average density of binarized multiple data, the similar effect is obtained to the case of correction by equivalent distribution of error over multiple pixels. In this respect, the aforesaid average density approximation method does not consider the error as taken into account by this method and it is evident that the image reproducing potency of this method is better than that of the average density approximation method. When the aforesaid average density maintenance method is applied to the serial scanning equipment which executes binary reproduction while reading the manuscript in bands with width of ℓ and length m as shown in Fig. 4, processing becomes discontinued at the connection of scan (I) and scan (II). When the right end part in the direction j of scan (I) is f (i, j) of Fig. 2A, B (i-2, j+1) and B (i-1, j+1) for the average value calculation are not binarized. On the contrary, if the objective pixel of f (i, j) is located at the left end part in j direction of scan (II), an additional memory is required because the binarized results must be stored during the execution of scanning (I) for three pixels, B (i-2, j-1), B (i-1, j-1) and B (i, j-1) in Fig. 2B. Therefore in this embodiment, for the aforesaid pixel having no binarized data, binarization is conducted by calculating the average value of the multi-level data. In order to materialize this embodiment, the width of the image input at image reading unit 100 should be + 2 pixel by adding one pixel at both sides and the length should be m + 2 pixels by adding 2 pixels on top, while the multi-level data of 3 pixels at the left end in j direction immediately preceding thereto and two pixels at the right end in j direction or 2 pixels at the upper end in i direction are maintained. In other words, in Fig. 4, the upper end part in i direction and left end part of scan (I) require the similar processing as aforesaid but in this embodiment, binarized data of several lines at the upper end and the left end are neglected by regarding the data below several lines at the end part as effective image region. For example, when the objective pixel f (i, j) indicated in Fig. 2A is the starting point of binarization of the image, 7 pixels in the binarized image surrounded by the dotted lines are not binarized and the objective pixel f (i, j) can not be binarized according to the aforesaid algorithm. Therefore, in this embodiment the weighted average values ml and m0 of the said point are calculated by using multi-level data. In other words, at the time of binarization of f (i, j), B (i-2, j-1) is substituted by f (i-2, j-1), B (i-2, j) is substituted by f (i-2, j), B (i-2, j+1) is substituted by f (i-2, j+1), B (i-1, j-1) by f (i-1, j-1), B (i-2, j) by f (i-2, j), B (i-1, j+1) by f (i-1, j+1) and B (i, j-1) by f (i, j-1) and in this way average values in and m0 are calculated to obtain B (i, j). At the binarization of the succeeding pixel f (i, j+1), among 7 pixels to be referred to, B (i, j) is excluded and for the remaining 6 pixels, multiple-level data are used, while at the binarization of f (i, j+2), out of 7 pixels, B (i, j+1) and B(i,j) are excluded and for the rest of 5 pixels, multiple-level data are used and so on and in this way each pixel is binarized one after another by calculating ml and m0 using the binarized data and multiple-level data in the same way as above. By so doing, the entire data can be binarized without making discontinued binarization of the beginning part of the image. The detailed circuit block shown in Fig. 1B illustrates the block of the binarized processing which is even free from the discontinuity inherent to the error diffusion having been added by this system. At the average value calculation unit 1, the binary data of D flipflops (hereinafter called D·F/F) 12, 13, 14, 15, 16, 17 and 18 and those of FIFO 11 which delays the binary data by 2 lines are simultaneously entered while maintaining the relative position of 7 pixels surrounded by the dotted line in Fig. 2A and the aforesaid average density m0 is output. At the average value calculation unit 1, data conversion is executed based on the binary data of 7 pixels and the preset standardized weight R (x, y) as shown in Figs. 2C and 2D. Average calculation unit 1 is composed of ROM. Adder 2 functions only at the starting point and end point of binarization and the weighted average value (added value) for 3 or 2 pixels based on the multiple-level data calculated at multiple-level data calculation unit 10 is added to the aforesaid ROM output i.e., the weighted average value m0 based on other binary data. The binary data corresponding to the output of the said multi-level data calculating part 10 i.e., the output of D·F/F 14, 17 and 18 or D·F/F 12 and 15 are primarily reset to "0" by the timing generation circuit output not shown in the drawing. In other words, the operating signals of the aforesaid adder 2 and reset signal D·F/F are the switch signal 203 shown in Fig. 1A. The binarization and error calculation section 3 to be composed of comparator 3a and subtracter 3b outputs the binarized results of the image from the multiple-level data (f + E) corrected and standardized by the error to be started later and the weighted average value (m0 + f0) and the already known weight R (0, 0), according to the formula 3 ○. Simultaneously, binarized results are input into the binary data two line delay unit 11. On the other hand, error E2 (=E 1 = 1/2E) is input into the adder, and corrects the input multiple-level data (i, j) first by E2. The output of the said adder 9 is input into the E2 line memory 7 and delayed by one line. 5 is the adder which corrects the data corrected only for the output of the said E2 line memory 7 i.e., the object ith line E2, by adding the error E1 wherein error E1 is usually selected as it is by multiplexer 6 and input into the said adder 5. E1 error connection memory 8 is the memory which stores the E1 error to be carried over the added to the leading pixel of the scan (II) until the execution of the succeeding scan (II), the said addition being done when the final pixel of each ith line is binarized and binarization is executed in j direction for each line at the execution of the next scan i.e., the scan (I) in Fig. 3 and the pixel at the boundary to the scan (II) is binarized. The memorized E1 data is read at the time of execution of scan (II) and only when the leading pixel is binarized, it is selected by multi-multiplexer 6 and added to the aforesaid adder 5. The error may be transmitted to the binarization processing of the leading pixel by the E1 error connection memory 8. The data corrected by error E1 and E2 are delayed by D·F/F 4 by one pixel and input into the said binarization and error calculating unit 3 and the same action is repeated pixel by pixel. Multi-level data calculating unit 10 is composed of 5 D·F/Fs and an adder and it can execute the said performance easily when it is so arranged that it maintains by latch the leading multi-level data and terminal multi-level data line by line and maintains it by shifting the internal D·F/F according to the 1 line synchro-signal. When the weighted mask becomes more than 3 x 3 of the present embodiment, the calculating volume of multiple-level calculating unit becomes large, but sufficient effect is obtained if, for example, f (i, j) is 8 bit data length, calculation is done by using the upper 2 or 3 bits. Since the average calculation unit executes multiplication and addition calculation of 1 bit data and fixed value, it is possible to execute calculation by making it a several hundred gate integrated circuit using gate array etc. even without using ROM and in Fig. 1B, it can be executed by the gate array of 2 - 3000 gates except for memory. In the binarization method shown in this embodiment, it is possible to obtain the results of high shade expression by the conventional density approximation method and by the process simpler than that of the conventional error diffusion process even when the weight R (0, 0) of the objective piexl is made zero and therefore if the calculation of average error is simplified by making R (0, 0) = 0, it is particularly profitable in realizing the aforesaid average value calculation unit made of gate array. Besides, the distribution of error is not limited to 2 pixels and the region of average value calculation mask and its weight are not limited to this embodiment. Further it is also possible to reproduce colored image by using the circuit of the present embodiment in three colors of R, G and B. In the case of this embodiment, explanation was made on the example where one average value is obtained and input data are binarized, but as disclosed in New U.S. Application using two application to Japanese Patent Application Nos. 1-31411 (applied on February 10, 1989) and 1-284879 (applied on November 3, 1989) as the basis of priority claim, it may be so arranged that plural number of average are obtained and they are used also in the conversion of input data into multiple-level data. As aforesaid, according to the 1st embodiment, image processing equipment is provided wherein the binarized image terminal can be accurately processed for semi - intermediate shade in the serial scanning. In other words, in the absence of the already binarized binary data to be referred to at the binarization of the terminal of the image by equivalent calculation of the weighted average value based on the binary data using the multiple-level data at the same position, it is possible to binarize the entire region even from the terminal of the image and obtain the effective results for whole region. It is also possible to maintain the continuity of binarization by propagating the error diffusion. In the aforesaid 1st embodiment, when there exist no binary data at the boundary of scanning regions, average density is calculated by using multi-level data. In the 2nd embodiment to be explained hereunder, it is so arranged that the binarization closer to the original manuscript is executed by providing the means to maintain the results of binarization of the preceding region. In the 2nd embodiment, the average density value is obtained by assuming that the weight mask for the object pixel f (i, j) is R (0, 0) = 0 and binarization processing based on such assumption shall be explained. In this case, since the multi-level data, binary data and weight mask are same as those indicated in Figs. 2A - 2D, explanation shall be made in reference to Figs. 2A - 2D. Fig. 2A is the drawing to indicate the multi-level density of each pixel of the input image. In Fig. 1A, f (i, j) indicates the multi-density data of input image at the object pixel position to be binarized and they shall be expressed in the normalized 0-1 value. The pixel position above the dotted line is already binarized and after binarization of object pixel, the similar binarization is conducted for f (i, j+1), f (i, j+2), ... one after another. Fig. 1B is the drawing to show the binarized image data and B (i, j) indicates the density after binarization of object pixel (expressed by "0" or "1"). The part surrounded by dotted line is the pixel data which has already been binarized at the time of processing of objective pixel and they are used at the binarization of the object pixel. Fig. 1C is the drawing to show the weighted mask. R is an example of weighted mask to obtain the average density and it is expressed by the matrix of 3 x 3 size. The weight against the unbinarized pixel R is used as R (0, 0) = R (0, -1) = 0. In this embodiment, the weighted average density of binary image in the neighbourhood of the object pixel is named m (i, j) and it is calculated by the following formula; Object pixel f (i, j) is binarized by the following formulae 5 ○ using the said average density m (i, j) and already allotted binarized correction value E (i, j). When f (i, j) + E (i, j) > m (i, j), B (i, j) = 1 err (i, j) = f (i, j) + E (i, j) - m (i, j) When f (i, j) + E (i, j) ≦ m (i, j), B (i, j) = 0 err (i, j) = f (i, j) + E (i, j) - m (i, j) Here, when f (i, j) + E (i, j) = m (i, j) = 1, B (i, j) = 1 E (i, j) = E1 (i, j) + E2 (i, j), E1 (i, j+1), = E2 (i+1, j) = err (i, j)/2 Figs. 5A and 5B indicate the aforesaid formulae 5 ○ in diagram. In formulae 5 ○, E (i, j) is the sum of the error produced when multi-level density f (i, j-1) of the pixel one step prior to the object pixel (i, j) or pixel (i, j-1) is binarized into binarized density B (i, j-1), i.e., 1/2 of the difference between the multiple denisty f (i, j-1) and the average density m (i, j-1) in the neighbourhood and the error produced when the multi-level density f (i-1, j) of the pixel one line prior to the object pixel (i, j), i.e., 1/2 of the difference between multi-level density f (i-1, j) and the average density in the neighbourhood m (i-1, j) By adding such binarization error E (i, j) to the object pixel f (i, j) and binarizing thus connected value, it is possible to completely maintain the image density after binarization in the form of average density for the entire range of the input image. By processing the image data taking into account the binarization error as aforesaid, intermediate shade reproducing potency greatly improves when compared to the aforesaid average density approximation method. In formulae 5 ○, E 1 (i, j+1) is the error alotted to the pixel (i, j+1), which is one pixel after the object pixel (i, j) while E 2 (i-1, j) is the error allotted to the pixel (i+1, j) one line after the object pixel (i, j). Like above, the binarization system in this embodiment provides the image reproducing potency equal or better than the binarization by the conventional error diffusion process in spite that the processing volume is extremely small. It is because in spite that the said error is corrected only by the two adjacent pixels, by obtaining the average density from the binarized plural number of data, the same effect is obtained to the case of correction made by distribution of the error equivalently to plural number of pixels. Fig. 6 is the block diagram of the image processing equipment of the present embodiment. In Fig. 6, input sensor unit A is composed of photoelectric conversion device such as CCD and the driving equipment for scanning and it scans and reads the manuscript and the image data of the manuscript read by input sensor A are delivered to the A/D converter B one after another. A/D converter B converts the data of each pixel into 8 bit digital data and quantizes it into the data with 256 levels of shades (gradation). Then at the correction circuit C, shading correction is effected by digital calculation for correction of irregularity of the sensitivity of CCD sensor at input sensor unit A and irregularity of illuminance caused by illumination source. The data already corrected by correction circuit C is delivered to the binarization circuit D. At binarization circuit D, the 8 bit multiple-level image data input by the correction circuit C is quantized into 1 bit binary data by the aforesaid system of the present embodiment. Printer E is the printer which is composed of laser beam or ink jet system and reproduces the read image on the recording sheet by on/off control of printed dots based on the binary data delivered from binarized circuit D. When the input sensor unit A has such construction as illustrated in Fig. 4, the manuscript is read in the bands of ℓ in width and m in length and reproduced in binary data according to the so-called serial scanning, but there is the fear that the discontinuity of processing occurs at the connections between scans [for example between scan (I) and (II)]. It is because, if the right end section in j direction of scan (I) is f (i, j) as indicated in Fig. 2A, B (i-2, j+1) and (i-1, j+1) for calculation of average density are not yet binarized as they are the data to be binarized in the succeeding scan (II). Therefore in this embodiment, the multiple-level data of the said two pixels to be processed in the succeeding scan (II) are overlappingly read and they are applied by substituting the binary data. On the other hand, when the object pixel f (i, j) is located at the left end section in j direction of scan (II), binary data at 3 pixels, namely, B (i-2, j-1), B (i-1, j-1) and B (i, j-1) in Fig. 2B are required but such data are already binarized in the preceding scan (I). Therefore in this case, the binary data of the said 3 pixels are memorized by the data maintenance means of the present embodiment at the time when they are binarized in the preceding scan (I) and they are applied by substituting the present data. In Fig. 4, at the upper end section in i direction in each scanning and at the left end section in j direction in scan (I), the aforesaid processing is required but in this embodiment, several lines at the top end section are neglected because only the part below several lines at the front end are recorded as the effective image region. Fig. 7 illustrates the detailed block composition of the binarized section based on the aforesaid algorithm in binarized circuit D of the present embodiment. Hereunder is explained in detail the binarization processing based on the aforesaid algorithm of the present embodiment in reference to Fig. 7. In Fig. 7, 701 is the average value calculating unit wherein by the delay unit 711 comprising the FIFO buffer which delays the flip-flop (F/F) 712 - 718 and binarized data by 2 lines, the mutual binarized data are simultaneously input while maintaining the relative positions of 7 pixels surrounded by dotted line in Fig. 2A and thus the aforesaid average density m is output, and 701 is composed of ROM which executes data conversion based on the preset weight R. 702 is the adder which functions only at the end point of binarization but it adds the weighted average density (added value) of 2 pixels based on the multi-level data calculated by the multiple-level data calculating unit 710 on to a part of the weighted average density m based on other binarized data output from the ROM of the average operating unit 701. At this time, the binary data corresponding to the output from the multi-level data calculating unit 710, i.e., F/F12 and 15 output are primarily reset at "0" by the timing generation circuit output not shown in the drawing. 703 is the binarization and error calculation unit which is composed of comparator and deductor and it outputs the multi-level data (f + E) corrected by the specified error to be stated later and the binarized data of the image based on the weighted average density m. This binarized data output can also be output at the delay unit 711. The error E 2 (=E 1 ) output at the binarization and error calculating unit 703 is output to the adder 709. At the adder 709, multi-level data input from one side are first corrected by error E 2 . The correction output from adder 709 is input into E 2 line. On the other hand, the error E 1 (=E 2 ) which is output at binarization and error calculating section 703 are also output at the adder 705. At one side of adder 705 is input the delay output from E 2 line memory 707 which is the correction output coming from adder 709, i.e., the data corrected only by E 2 at the object ith line and further correction is conducted by adding error E 1 to the aforesaid correction data at the said adder 705. Like above, the output data from the adder 705 which has been corrected by E 1 and E 2 are delayed by one pixel by D type F/F 704 and input into binarization and error calculation unit 703 and the aforesaid actions are repeated for each pixel. The multi-level data calculating section 701 may be composed of two D type F/F and an adder. Its function can be easily executed when it takes such construction that it latches and maintains line by line the multi-level data for one pixel which belongs to the succeeding scanning region and shifts and maintains the internal F/F according to one line synchro-signal. Further the binarized data given out by the binarization and error calculation unit 703 are also output at binary connection memory 719. Binary connection memory 719 stores only the binarized data at the terminal section of each line synchronizing with one line synchro signal, out of all the binarized output of binarization and error calculation unit 703 and after delaying it by one scanning period, outputs it at multiplexer 730. When multiplexer 730 is selected, the data are input in F/F 718 and delay section 711. The said processing takes place only at the starting end of the line at each scanning time after scanning (II) and average value calculation unit 701 handles the said data as the binary data of the pixel at the place T pixels prior to the starting point of line binarization. Thus in this embodiment, it is possible to calculate the average density m as a continuous value at the connection of scanning angles. As explained above, according to this embodiment, by maintaining the binary data of the connecting part of scanning regions until the execution of succeeding region and obtaining the weighted average density based on the binary data in reference to such data in the succeeding scanning, it is possible to avoid discontinuity of data at the connections between scanning regions and obtain the image with excellent gradation characteristics and resolution. (The 3rd embodiment) In the 2nd embodiment explained above, at the connection of the scans, continuity has been maintained by carrying over only the binary data but the present invention is not limited to the aforesaid embodiment but may be modified in various ways. For example, as shown in Fig. 8, more accurate binarization may be conducted by constructing the binarization circuit D in such way that the error E 1 having generated at the binarization of the terminal pixel of each line in the preceding scan (the error to be used for correction of leading pixel of each line in the succeeding scanning region) is carried over for correction. The 3rd embodiment of the present invention having the binarization circuit D so constructed as shown in Fig. 8 is explained in detail hereunder. In Fig. 8, the compositions similar to those of Fig. 7 are given the same numbers to those of Fig. 7 and detailed explanations thereof are omitted. In the 3rd embodiment indicated in Fig. 8 such construction is employed that the error E 1 output at binarization and error calculation unit 703 is not directly entered into the adder 705 but it is entered into it via the multiplexer 721. Simultaneously, error E 1 is also input into error connection memory 720 and the output of the said error connection memory 720 is entered at one side of the input of the said multiplexer 721. The error connection memory 720 is the memory which, at the time of binarization of the terminal pixel of each line in j direction at the execution of scan (I), stores the error E 1 to be carried over and added to the leading pixel of the succeeding scan until the succeeding scan i.e., scan (II) is executed and the E 1 data memorized by the error connection memory 720 is read at the execution of scan (II) and only at the time of binarization of the leading pixel, it is selected by the multiplexer 721 and input into the aforesaid adder 5 and corrects only the said leading pixel. By such control, the binary data of the terminal part of each scan is preserved until the succeeding scan is executed and at the execution of the succeeding scan, the data are referred to and by obtaining the weighted average density based on the binary data the leading pixel of each scan is also corrected, thus the data not becoming discontinuous at the connection of scans and the image with excellent gradation and resolution being obtained. The binary connection memory 719 which delays and holds the binary data during one scan so that they are used for the calculation of the average value m at the time of binarization of the leading pixel at each line of the succeeding scan as explained in the 2nd embodiment and the error connection memory 720 which delays and holds the E 1 error data to be used for correction of the said pixel at the binarization of the said pixel as explained in the 3rd embodiment are so controlled that their writing and reading are executed by the same timing and the data of the two combined are less than 8 bit. Therefore the aforesaid composition can all be constructed on one chip. In the 2nd and 3rd embodiments, the weight mask of 3 x 3 matrix as shown in Fig. 9A is used but to smoothly binarize the intermediate section, it is generally desirable to set the weight of the pixel adjacent to the objective pixel smaller. Therefore when the weight mask of 3 x 5 matrix shown in Fig. 9B is used, R (i-1, j), R (i, j-1) is 7/48 = 0.15 while that of Fig. 9A is 5/21 = 0.24 and therefore the intermediate shade section is more smoothly reproduced in the binary data. When the weight mask of 3 x 5 matrix as shown in Fig. 9C is used, R (2, -1) = 16/255, R (2, -2) = 8/255, R (1, -1) = 24/255 and R (1, -2) = 16/255 and multiple-level data used for connection between scans are obtained mainly by the calculation by shift operation and hardware may be more simplified. Multi-level data calculation unit 710 bears a large calculation load when weighted mask becomes over 3 x 3 but if for example f is 8 bit data length, the calculation may be done using about 2 - 3 bits of the superior position and yet satisfactory effect is obtained. In the above explanation, the calculation of average density m has been conducted simply by ROM table built in the average value calculation unit 701 but such calculation may be executed by using plural number of adders. By composing it in such way, the processing speed may be further increased. It goes without saying that by bulding it into the gate array etc., the scale of hardware can be substantially reduced. In the aforesaid 1st, 2nd and 3rd embodiments, the error is equally distributed over 2 pixels but distribution of such error is not limited to two pixels neither the ratio of distribution is not limited to equal ratio but may be distributed to an arbitrarily selected pixel. The distribution of error is neither restricted by the average value calculation mask region or its weight. In the aforesaid embodiments, explanation was made on the case where the kind of input data is one (one color) but the input data of the present invention are not limited to one color but the data input may be made in 3 colors, red (R), green (G) and blue (B) and it may be applied to the color image processing equipment. As explained above, according to this embodiment, even when there is no binary data to be referred to at the time of binarization of the image end, it is possible to obtain equivalently the weighted average density based on the binary data using the multi-level data at the same position and thus an effective binarization can be done from the end of the image. In case when serial scanning is conducted, binary data at the terminal of each scan are preserved until the execution of the succeeding scan and at the execution of the succeeding scan, the weighted average density based on the binary data is obtained in reference to such preserved data and thus the data at the connection of scans do not become discontinued, thus providing the image with excellent gradation and resolution. As explained above, according to the present invention, effective binarization is possible from the end of the image as the result of such method of processing. Also in the case of serial scanning, the data at the connection of scans do not become discontinued and the image with excellent gradation and resolution is obtained.

Claims: Image processing apparatus comprising means (100) for generating multi-valued pixel image data derived from scanning an original image in several successive contiguous bands, their bandwidth, which is identical with the scan width of the respective band, being smaller than the width of said original image; and means (102) for binarizing successive pixels of the input image data to generate binary output image data by treating each successive pixel as an object pixel and wherein each successive object pixel has associated therewith a same particular number of pixels adjacent to and in a same predetermined positional relationship with respect thereto, said pixels defining a specified region respectively, the binarizing means including calculation means (701, 702, 710) for calculating the average density of each said specified region associated with each said successive object pixel, said calculation means being adapted to calculate the average density value for each specified region from binary data (711-718) which has already been processed by said binarization means; and means (703) adapted to use the average density (m) of each specified region as a threshold value with which the value of the object pixel is compared to binarize the object pixel, characterised in that when the pixels of a specified region with regard to an object pixel do not all lie in the first of two successive bands because at least one of the pixels in the specified region lies in the second successive band, the calculation means are adapted to calculate the average density of this specified region from both the binarized values of the pixels in the specified region which fall within the first of the two contiguous bands and from the multi-valued data of the or each pixel which falls within the specified region but lies in the second of said contiguous bands. Apparatus according to claim 1, wherein the apparatus for each band has as one scan direction pitch 1 units and the other scan direction pitch as m units so that each of said bands has an area of 1 x m units. Apparatus according to claim 1 or claim 2, further comprising a memory (719) for storing the binary data obtained by binarizing the pixels in the first of said two successive image regions, the specified region associated with the pixel extending across said two successive image regions, and wherein said binarization means binarizes an object pixel in accordance with the relative values of the average density value stored in said memory (719) and the average density value obtained from the multi-value data of the pixels located in said second region. Apparatus according to claim 3, further comprising: error calculation means (703) for calculating the difference between the multi-level image data corrected by the error and the average density value used for binarizing the multi-level image corrected by the error; and an adder (705, 709) for adding the difference to the input data.

Inventors: TANIOKA HIROSHI, YAMADA YASUHIRO, TANIOKA, HIROSHI, YAMADA, YASUHIRO, TANIOKA, HIROSHI, C/O CANON KABUSHIKI KAISHA, YAMADA, YASUHIRO, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1990
Main classification: H04N1
IPC codes: H04N1