Abstract:
An image processing apparatus has elements for inputting pixel data and for processing the input pixel data. The processing element includes a device for quantizing the input pixel data to produce binary data, and a memory device for receiving the binary data as an address to produce an output indicating image tone of the input pixel data. Preferably, the memory receives as one address a plurality of binary data, corresponding to a plurality of input pixel data. A delay element can be included to enable the memory to receive the plurality of binary data at a single time. In particular, the pixel data tonality can be discriminated by using one or more high-order bits of input multi-bit pixel data.

Description:
This application is a continuation of application Ser. No. 07/662,503 filed Feb. 28, 1991, now abandoned which is a continuation of application Ser. No. 07/332,384, filed Apr. 3, 1989, now abandoned which is a continuation of application Ser. No. 06/819,132 filed Jan. 15, 1986, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to an image processing apparatus having an image discrimination function which is suitable for use as or in a copying machine, facsimile machine, reader or electronic file. 
     2. Description of the Prior Art 
     An apparatus for discriminating a tonality (property or characteristic of image) of a pixel under consideration by utilizing a density difference in the vicinity of the pixel under consideration, and an apparatus which divides one screen of input pixels into 4×4-pixel areas (blocks) and discriminates the tonality block by block, have been known. The former requires 6-bit operations and the latter requires two-dimensional complex operation. Accordingly, they are complex in construction and expensive. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to remove the above-mentioned drawbacks. 
     It is another object of the present invention to provide an image processing apparatus having an image discrimination function, which is simple in construction and inexpensive. 
     It is another object of the present invention to provide an image processing apparatus which produces a high quality of image. 
     It is another object of the present invention to provide an image processing apparatus which can exactly reproduce an original image. 
     It is another object of the present invention to provide an improved image processing apparatus having an image discrimination function. 
     It is another object of the present invention to provide an image processing apparatus which can exactly discriminate an image. 
     It is still another object of the present invention to provide an image processing apparatus having an image discrimination function which can process an image at a high speed. 
     It is a further object of the present invention to provide an image processing apparatus which can reproduce a high quality image with a simple construction. 
     According to the present invention, these objects are attained by providing an apparatus for discriminating the image tone, or nature, of an image, according to one aspect of the invention, by applying digitized image data to a memory as address data and reading out from the memory an indication of the image tone. According to a second aspect of the invention, the image data used as address data includes data pertaining not only to a pixel under consideration but also to pixels adjacent to that under consideration. According to a third aspect of the invention, a discrimination of image tone or nature is conducted on the basis of n upper bits of m-bit image data, where m is greater than n. 
     Other objects, features and advantage of the present invention will be more fully apparent from the following description of the preferred embodiments, taken in conjunction with the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 illustrates a method for discriminating an image in accordance with one embodiment of the present invention. 
     FIG. 2 shows one embodiment of an image processing apparatus according to the present invention. 
     FIGS. 3 and 4 illustrate other discrimination methods. 
     FIG. 5 shows a modification of the circuit of FIG. 2. 
     FIG. 6 illustrates a method for discriminating an image in accordance with a second embodiment. 
     FIG. 7 shows a second embodiment of image processing apparatus according to the invention, and 
     FIG. 8 shows another discrimination method. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 shows binary status of nine pixels including a pixel A (at the center) and peripheral pixels. A black pixel is represented by ◯ and a white pixel is represented by ◯. A method for discriminating an image in accordance with one embodiment of the present invention is explained with reference to FIG. 1. 
     In the present embodiment, whether the pixel A under consideration is an edge of a line image such as a character or not is discriminated by the number of white or black pixels in the five pixels consisting of the pixel A under consideration and four peripheral pixels (B-E) in the digitized, specifically, binary-coded or binarized (herein, the terms &#34;binarize&#34;, &#34;binarized&#34; and &#34;binarization&#34; are used as convenient terminology to refer to a process of converting image data into binary data, i.e., binary coding), image. 
     For example, when all of the pixel A under consideration and the peripheral pixels B-E are white or black, the pixel A under consideration is determined not to be the edge of a character, and in other cases, it is determined to be the edge of a character. 
     If the character is sharply binarized at the edge thereof in a one-dimensional direction even for one or two pixels, the quality of the reproduced character is significantly improved even if the character is dither-processed (subjected to gray level processing), although the edge must be two-dimensionally binarized. 
     In the present embodiment, the edge of the character is two-dimensionally discriminated by using the discrimination method described above to reproduce a high quality of character. 
     FIG. 2 shows an embodiment of the image processing apparatus which binarizes an image data and discriminates the image. 
     Numerals above lines indicate the numbers of bits of image data to be transported by the line in question. Numeral 1 denotes a document reader having a solid-state imaging device (sensor) 1a such as a CCD and an A/D converter 16 which quantizes an output from the sensor 1a to form 6-bit image data. The document reader 1 has a line sensor and electrically scans the document in a line direction (main scan direction), and mechanically scans the document in a direction normal to the line direction (i.e., in a sub-scan direction) to read the entire document. Numeral 3 denotes a simple binarization circuit which compares sequentially inputted 6-bit pixel data with a predetermined threshold (fixed threshold) to produce binary signals &#34;1&#34; and &#34;0&#34;. In the present embodiment, the image is discriminated in accordance with the binary data from the simple binarization circuit 3. The simple binarization circuit 3 sequentially produces the binary signals along the main scan direction X, and as the scan for the first line l1 is completed, the second line l2 is scanned. Numeral 4 denotes a dither processor which compares the sequentially inputted 6-bit pixel data with thresholds of a predetermined dither matrix to produce dither-processed binary data. The dither processor and the simple binarization circuit 3 are operated in parallel. Numerals 5 and 6 denote one-line delay RAM&#39;s for delaying the binary signal from the simple binarization circuit 3 by one line in the sub-scan direction, and numeral 7 denotes a one-line delay RAM for delaying the binary signal from the dither processor 4 by one line. Numerals 8-12 denote delayed flip-flops (D-F/F) which delay the binary outputs from the delay RAM&#39;s by one pixel in the main scan direction. 
     The pixels A-E shown in FIG. 1 can be simultaneously detected by the circuit of FIG. 2. Assuming that the pixel E is outputted from the D-F/F 8, then the pixel D is outputted from the one-line delay RAM 5, the pixel A under consideration is outputted from the D-F/F 9 which delays the output of the RAM 5 by one pixel, the pixel C is outputted from the D-F/F 10 which further delays the output of the D-F/F 9 by one pixel, and the pixel B is outputted from the D-F/F 11 which further delays the output of the RAM 6 by one pixel. The pixel data A-E simultaneously detected by the above arrangement are supplied to address terminals A0-A4 of a ROM 13. The ROM 13 contains &#34;0&#34;s and &#34;1&#34;s for the respective addresses so that whether the pixel A under consideration is the edge of the character or not is determined. 
     For example, when the data supplied to the addresses A0-A4 are all &#34;0&#34;s or all &#34;1&#34;s, it is determined not to be the edge of the character, and in other cases, it is determined to be the edge. In this case, &#34;0&#34;s are stored at addresses 00H (&#34;H&#34; represents &#34;hexadecimal&#34;) and 1FH and &#34;1&#34;s are stored at other addresses. The output &#34;1&#34; from the ROM 13 indicates that the pixel under consideration is determined to be the edge of the character, and the output &#34;0&#34; indicates that it is determined not to be the edge. 
     When the output of the ROM 13 is &#34;1&#34;, a signal &#34;1&#34; is supplied to a select terminal S of a multi-plexor 14 so that an input terminal A thereof, that is, the pixel under consideration binarized with the fixed threshold, is selected and supplied to a printer 15, which may be a well-known binary printer such as a laser beam printer and forms dots in accordance with input binary data to record an image. On the other hand, when the output of the ROM 13 is &#34;0&#34;, an input terminal B is selected, so that the dither-processed binary signal is selected. The delay RAM 7 and the D-F/F 12 are used to synchronize the output timing of the discrimination result and the pixel under consideration. 
     In this manner, the tonality can be discriminated pixel by pixel on a real time basis and the image can be binarized. In the present embodiment, the binary data is supplied to the ROM as the address and the ROM outputs the discrimination result. Accordingly, the scale of the circuit may be small; various algorithms other than the discrimination method described above can be applied. For example, as shown in FIG. 3, when only the pixel A under consideration is black and all of the peripheral pixels B-E are white, the black of the pixel A under consideration is determined to be a noise component and a dither-processed pixel A under consideration is selected. In this manner, the pixel under consideration can be discriminated by a positional relation between the black pixels and the white pixels. 
     A gray level area may be misdetermined to be the edge of the character. In the present embodiment, since the tonality is two-dimensionally discriminated pixel by pixel, an error which appears in a line of one to two pixels is not an obstacle to proper performance of the apparatus, because the periphery thereof is dither-processed. The errors can be reduced by appropriately selecting a discrimination level, such that, for example, the dither-processing is carried out when at least four of the five pixels including the pixel under consideration are &#34;0&#34; or at least four out of the five are &#34;1&#34;. 
     Alternatively, the four pixels adjacent to the pixel A under consideration and considered therewith may be those which are on diagonal lines as shown by F-I in FIG. 1. If the ROM has a sufficiently large capacity, eight adjacent pixels B-I shown in FIG. 1 may be used for the discrimination. The pixel A under consideration and the adjacent pixels B, E, J and K shown in FIG. 4 may be used to discriminate the tonality of the pixel under consideration. The simple binarization circuit 3 and the dither processor 4 may use not comparators but ROMs, and the 6-bit image data may be directly applied thereto as the addresses to output &#34;1&#34; and &#34;0&#34; discrimination results from the ROMs. 
     FIG. 5 shows a modification of the circuit of FIG. 2. The elements like to those shown in FIG. 2 are designated by the like numerals, and the explanation thereof is omitted. A portion not shown in FIG. 5 is similar to the corresponding portion of FIG. 2. The circuit of FIG. 5 is used when the discrimination algorithm for the pixel under consideration is relatively simple. As explained in connection with FIGS. 1 and 2, when all of the pixel A under consideration and the adjacent pixels B-E are white or black, the pixel A under consideration is determined not to be the edge of the character. Numeral 16 denotes a gate circuit or a programmable array, numeral 16a denotes an AND circuit and numerals 16b and 16c denote NOR circuits. The main operation of the circuit of FIG. 5 is similar to that of FIG. 2 and the explanation thereof is omitted here. 
     A second embodiment of the present invention is now explained. 
     FIG. 6 shows four pixels including a pixel A under consideration and its peripheral pixels. A method for discriminating the image in accordance with the second embodiment is explained with reference to FIG. 6. In the second embodiment, the tonality is discriminated pixel by pixel by using two high order bits of the quatized 6-bit image data. A maximum density L max and a minimum density L min are determined for the set of pixels consisting of the pixel A under consideration and the adjacent pixels B, C, D and E, to determine a density gradient ΔL. 
     
         If ΔL=L max-L min≧2                           (1) 
    
     
         (ΔL=2 or 3), 
    
     the pixel under consideration belongs to an edge of a line image such as a character. 
     
         If ΔL=L max-L min &lt;2                                 (2) 
    
     
         (ΔL=0 or 1), 
    
     the pixel under consideration belongs to a gray level area of a photograph. 
     When the pixel under consideration is determined to be the edge of a character, the pixel under consideration is binarized using a fixed threshold, and when the pixel under consideration is determined to be the gray level area of the photograph, the pixel under consideration is binarized using dither processing. 
     As described above, if the edge of the character is sharply binarized in a one-dimensional direction even for one or two pixels, the quality of the reproduced character is significantly improved even if the character is dither-processed (gray level processing), although the edge has to be two-dimensionally processed. 
     In the second embodiments, the above discrimination method is used to two-dimensionally identify the edge of characters to reproduce a high quality of character. 
     FIG. 7 shows the circuit of the second embodiment of the image processing apparatus, which binarizes the image data and carries out the discrimination described above. Numerals above lines indicate the numbers of bits of image data carried by those lines. Numeral 21 denotes a document reader including a solid-state imaging device (sensor) 21a such as a CCD and an A/D converter 21b for quantizing. an output of the sensor 21a to form 6-bit pixel data. The document reader 21 has a line sensor and electrically scans the document in a line direction (the main scan direction) and mechanically scans the document normally to the line direction (the sub-scan direction) to read the entire document. Numeral 23 denotes a simple binarization circuit which compares sequentially inputted 6-bit pixel data with a predetermined threshold (fixed threshold) to produce binary signals &#34;1&#34; and &#34;0&#34;. In the present embodiment, the simple binarization circuit 23 sequentially produces the binary signals along the main scan direction X, and as the scan for the first line l1 is completed, the second line l2 is scanned. Numeral 24 denotes a dither processor which compares the sequentially inputted 6-bit pixel data with thresholds of a predetermined dither matrix to produce dither-processed binary data. The dither processor and the simple binarization circuit are operated in parallel. Numeral 27 denotes a one-line delay RAM for delaying the binary signal from the simple binarization circuit 23 by one line in the sub-scan direciton, and numeral 28 denotes a one-line delay RAM for delaying the binary signal from the dither processor 24 by one line. Numerals 35 and 36 denote delayed flip-flops (D-F/F) which delay the binary outputs from the delay RAM&#39;s 27 and 28 by one pixel in the main scan direction. 
     Numerals 25 and 26 denote delay RAM&#39;s which receive two high order bits of the 6-bit pixel data supplied from the document reader 21 and delay then by one line in the sub-scan direction, and numerals 29-32 denote D-F/Fs which delay the 2-bit pixel data supplied from the document reader 21 and the delay RAMs 25 and 26 by one pixel in the main scan direction. 
     In the second embodiment, the discrimination circuit is constructed by the delay RAMs 25 and 26, the D-F/F&#39;s 29-32 and the ROM 33 to discriminate the tonality pixel by pixel. Assuming that the pixel D adjacent to the pixel A under consideration is outputted from the D-F/F 29, then the pixel E is outputted from the one-line delay RAM 25, the pixel A under consideration is outputted from the D-F/F 30 which delays the output of the RAM 25 by one pixel, the pixel C is outputted from the D-F/F 32 which further delays the output of the D-F/F 30 by one pixel, and the pixel B is outputted from the D-F/F 31 which further delays the output of the RAM 26 by one pixel. By this arrangement, the 2-bit density data for the pixel A under consideration and the adjacent pixels B, C, D and E can be simultaneously detected. Those pixel data A-E are supplied to address terminals A0-A9 of a ROM 33. 
     The ROM 33 contains &#34;0&#34;s and &#34;1&#34;s for the respective addresses so that whether the pixel A under consideration is the edge of the character or not is determined. 
     The ROM 33 has addresses which correspond to all cases in which the five pixels A-E changes within two bits (0-3), and &#34;0&#34; or &#34;1&#34; discrimination results for the respective addresses. 
     Thus, the ROM 33 carries out the processing corresponding to the operation of L max-L min and the discrimination of the tonality in accordance with the operation result. In the second embodiment, the discrimination result is &#34;1&#34; when the pixel under consideration is determined to be the edge of the character, and the discrimination result is &#34;0&#34; when it is determined to be the gray level area. 
     When the output of the ROM 33 is &#34;1&#34;, a signal &#34;1&#34; is supplied to a select terminal S of a multiplexor 34 so that an input terminal A thereof, that is, the pixel under consideration binarized with the fixed threshold is selected and supplied to a printer 37, which may be a well-known binary printer such as a laser beam printer and forms dots in accordance with input binary data to record an image. On the other hand, when the output of the ROM 33 is &#34;0&#34;, an input terminal B is selected so that the dither-processed binary signal is selected. The delay RAMs 27 and 28 and the D-F/F&#39;s 35 and 36 are used to synchronize the output timing of the discrimination result and the pixel under consideration. 
     In this manner, the tonality can be discriminated pixel by pixel on real time basis and the image can be binarized. In the present embodiment, the two high order bits of the 6-bit pixel data are supplied to the ROM as the address and the ROM outputs the discrimination result. Accordingly, the scale of the circuit may be small. Again various algorithms other than the discrimination method described above can be applied. For example, if the pixel under consideration has a maximum or minimum density, it may be determined to be the gray level area even if the density difference ΔL is 2 or 3. In this manner, by considering the positional relation of the maximum and minimum densities, the image can be discriminated with a higher precision. 
     Alternatively, four pixels adjacent to the pixel A under consideration may be set on diagonal lines as shown by F-I in FIG. 6. If the ROM has a sufficiently large capacity, eight adjacent pixels B-I shown in FIG. 6 may be used for the discrimination. The pixel A under consideration and the adjacent pixels B, E, J and K shown in FIG. 8 may be used to discriminate the tonality of the pixel under consideration. The simple binarization circuit 23 and the dither processor 24 may use, not comparators, but ROMs, and the 6-bit image data may be directly applied thereto as addresses to output the results. 
     The present invention is not limited to the illustrated embodiments but various modifications thereof may be made within the scope of the appended claims.