Method, apparatus, system, and program for image processing capable of recognizing, reproducing, and enhancing an image, and a medium storing the program

A method, apparatus, system, and program for image processing are provided to perform operations of recognizing, reproducing, and enhancing an image, particularly one having character, symbol, or line-segment portions. An image obtainer obtains a multivalue image of color or grayscale. A brightness image generator generates a brightness image of the multivalue image, representing brightness values of respective pixels of the multivalue image. A topographic feature image generator generates a topographic feature image of the multivalue image, having a topographic feature corresponding to the brightness values. A topographic feature adder generates a binary image of the multivalue image, by using information contained in the topographic feature.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method, apparatus, system, and program for image processing, and more particularly, a method, apparatus, system, and program for image processing, capable of recognizing, reproducing, and enhancing an image.

2. Description of the Related Art

Future image processors will require a high ability of recognizing and reproducing an image, particularly one produced in low resolution.

For example, a color image is usually read by a color image scanner, taken by a digital camera (including the one incorporated in a portable phone), or copied by a digital color copier, with low resolution of about 200 dpi to 300 dpi, to achieve high image processing speed and to save a memory area. The low-resolution image is then transferred to another device as an image file having a predetermined format, such as TIF, JPEG, and GIF, for further image processing.

However, if the low-resolution image contains a character or line portion, that portion of the image may not be accurately recognized, or it may not be produced in high quality. This is particularly true when the image contains densely-arranged line segments, as the line segments may be wrongly recognized as a background of the image.

BRIEF SUMMARY OF THE INVENTION

The present invention provides an apparatus, method, system, and related computer program product or medium, for image processing, capable of recognizing, reproducing, and enhancing an image, particularly one having character, symbol or line segment portions.

In one exemplary embodiment, an image processor includes an image obtainer, a brightness image generator, a topographic feature image generator, and a topographic feature adder.

The image obtainer obtains an original image, preferably a multivalue image of color or grayscale. If the image obtainer receives a color multivalue image, the image obtainer converts the received image from a color image to a grayscale image.

The brightness image generator generates a brightness image of the multivalue image. The brightness image may be expressed in a XYZ coordinate system, with X corresponding to the main scanning directions of the respective pixels in the multivalue image, Y corresponding to the subscanning directions of the respective pixels in the multivalue image, and Z corresponding to the brightness values of the respective pixels in the multivalue image.

The topographic feature image generator generates a topographic feature image of the multivalue image, having a topographic feature corresponding to the brightness values of the brightness image. For example, the topographic feature image includes a peak/ridge region, a hillside region, and a valley/pit region. The peak/ridge region has a brightness value range higher than that of the hillside region. The valley/pit region has a brightness value range lower than that of the hillside region.

If the multivalue image can be divided into a character or line portion and a background portion, the valley/pit region of the topographic feature image corresponds to the character or line portion, while the peak/ridge region of the topographic feature image corresponds to the background portion.

The topographic feature adder generates a binary image of the multivalue image, by using information contained in the topographic feature of the topographic feature image. Specifically, by comparing the binary image and the topographic feature image, the topographic feature adder corrects the binary image such that the character/line portion of the binary image corresponds to the valley/pit region of the topographic feature image, and the background portion of the binary image corresponds to the peak/ridge region of the topographic feature image.

In another exemplary embodiment, the image processor may further include a high-resolution image generator, which generates a high-resolution image by increasing a resolution of the multivalue image.

In such a case, the binary image is generated from the high-resolution image.

Further, the brightness image may be generated from the high-resolution image, however, it may be generated from the multivalue image, as described above.

In another exemplary embodiment, the image processor may further include a pre-binary image generator, which generates a pre-binary image, having a number of brightness values less than a number of the brightness values of the multivalue image.

For example, the pre-binary image includes on pixels, off pixels, and TBD (“To Be Determined”) pixels. The on pixels correspond to the character or line portion of the multivalue image. The off pixels correspond to the background portion of the multivalue image. The TBD pixels correspond either to the character or line portion and the background portion of the multivalue image. In other words, the TBD pixels are determined to be the on pixels when the TBD pixels correspond to the valley/pit region of the topographic feature image. On the other hand, the TBD pixels are determined to be the off pixels when the TBD pixels correspond to the peak/ridge region of the topographic feature image.

In such a case, the binary image is generated from the pre-binary image.

Further, the brightness image may be generated from the pre-binary image, however, it may be generated from the multivalue image, as described above.

In another exemplary embodiment, the image processor may further include a brightness slope detector, a slope memory, and a first outline adjuster. The brightness slope detector detects brightness slope values of the respective pixels of the high-resolution image created by the high-resolution image generator. The slope memory stores the brightness slope values. The first outline adjuster enhances and smoothens the outline of the character portion, using the brightness slope values read out from the slope memory.

In another exemplary embodiment, the image processor may further include a second outline adjuster. The second outline adjuster further enhances and smoothens the outline of the character portion, especially by reducing jagginess of the outline, or sharpening the corner of the outline.

In addition to the above-described image processor, the present invention may be implemented as a method, a system, a computer program product, and a computer readable medium, as will be apparent to those skilled in the art, without departing from the scope and spirit of the appended claims.

DETAILED DESCRIPTION OF THE INVENTION

In describing preferred embodiments illustrated in the drawings, specific terminology is employed for the sake of clarity. However, the disclosure of this patent specification is not intended to be limited to the specific terminology so selected and it is to be understood that each specific element includes all technical equivalents that operate in a similar manner. Referring now to the drawings, wherein like reference numerals designate identical or corresponding parts throughout the several views, a description is given for image processors1A to1J according to preferred embodiments of the present invention.

The image processors1A to1J are capable of recognizing, reproducing or enhancing a multivalue image received from the outside. The multivalue image preferably includes a character (symbol), and/or a line segment, and may be provided in color or in grayscale.

As shown inFIG. 1, the image processor1A includes an image obtainer11, a brightness image generator12, a topographic feature image generator13, and a topographic feature adder14.

The image obtainer11receives a multivalue image of color or grayscale. If it receives a color multivalue image, the image obtainer11converts the color multivalue image to a grayscale multivalue image, using a color/grayscale converter111incorporated therein.

The brightness image generator12generates a brightness image from the grayscale multivalue image. The brightness image may be expressed, mathematically, as a one-valued function Z=f(X, Y), wherein X corresponds to a main scanning direction of the multivalue image, Y corresponds to a subscanning direction of the multivalue image, and Z corresponds to a brightness value of the multivalue image. In other words, the brightness image expresses the brightness values of respective pixels of the multivalue image as elevation (shown in the z axis) with respect to the pixel position (shown in the xy plane). For example, if the multivalue image is 8-bit, the brightness values range from 0 to 256 grayscale levels, with lower values (that is, darker areas of the image) having lower elevations, and higher values (that is, lighter areas of the image) having higher elevations.

The topographic feature image generator13generates a topographic feature image from the brightness image. For example, the brightness image having the 256 brightness values may be interpreted as an elevation image having various topographic regions, such as a peak region, a ridge region, a hillside region, a valley region, and a pit region. These topographic regions of the multivalue image may be interpreted as the topographic feature extracted from the multivalue image based on the brightness values.

The topographic feature adder14generates a binary image from the multivalue image, by using the topographic feature of the topographic feature image. Since the topographic feature contains information regarding the brightness values of the multivalue image, it can compensate the information loss generally caused during the binarization process. In this way, the multivalue image may be accurately reproduced in a binary form.

Referring toFIG. 2, the image processor1B is similar in structure to the image processor1A, except for the addition of a high-resolution image generator15. The high-resolution image generator15generates a high-resolution image from the grayscale multivalue image, by expanding the resolution of the multivalue image using an interpolation technique. The topographic feature adder14then generates a high-resolution binary image, by adding the topographic feature to the high-resolution image.

Referring toFIG. 3, the image processor1C is similar in structure to the image processor1A, except for the addition of a pre-binary image generator16. The pre-binary image generator16generates a pre-binary image from the grayscale multivalue image, instead of directly generating the binary image having 0 and 1 values using only the topographic feature adder14. More specifically, the pre-binary image generator16generates a pre-binary image, having 0, 1 and −1 values, with the −1 value corresponding to the pixel that cannot be determined to be 0 or 1, without having information regarding the topographic feature. Thus, the pixel having the −1 value is determined in the binarization operation performed by the topographic feature adder14, using the topographic feature provided by the topographic feature image generator13.

Referring toFIG. 4, the image processor1D is similar in structure to the image processor1A, except for the addition of the high-resolution image generator15and the pre-binary image generator16. The pre-binary image generator16generates a pre-binary image, using the high-resolution image created by the high-resolution image generator15, in a similar manner as described above.

Referring toFIG. 5, the image processor1E is similar in structure to the image processor1D, except for the addition of a brightness slope detector17and a first outline adjuster18. The brightness slope detector17detects a brightness slope value of each pixel contained in the high-resolution multivalue image, and stores it in a slope memory117. Using information from the brightness slope value, the first outline adjuster18enhances and smoothens the edges or outlines in the image. In this example, the binarization operation may be performed by the first outline adjuster18, rather than by the topographic feature adder14.

Referring toFIG. 6, the image processor1F is similar in structure to the image processor1E, except for the addition of a second outline adjuster19. The second outline adjuster19further smoothens the edges or outlines in the image, particularly by reducing jagginess of the edges or outlines and adjusting a crossed point (intersection) of vertical and horizontal lines in the image.

Referring toFIG. 7, the image processor1G is substantially similar in structure to the image processor1B ofFIG. 2. Compared to the image processor1B, the brightness image generator12operates differently, such that it generates a brightness image from the high-resolution image created by the high-resolution image generator15.

Referring toFIG. 8, the image processor1H is substantially similar in structure to the image processor1D ofFIG. 4. Compared to the image processor1D, the brightness image generator12operates differently, such that it generates a brightness image from the high-resolution image created by the high-resolution image generator15.

Referring toFIG. 9, the image processor1I is substantially similar in structure to the image processor1E ofFIG. 5. Compared to the image processor1E, the brightness image generator12operates differently, such that it generates a brightness image from the high-resolution image created by the high-resolution image generator15.

Referring toFIG. 10, the image processor1J is substantially similar in structure to the image processor1F ofFIG. 6. Compared to the image processor1F, the brightness image generator12operates differently, such that it generates a brightness image from the high-resolution image created by the high-resolution image generator15.

Any of the image processors1A to1J and other image processors according to the present invention may be incorporated in an image processing system110shown inFIG. 11. The image processing system110includes a CPU (central processing unit)20, a memory21, a HDD (hard disk drive)22, a removable disk23, a display24, a keyboard25, a pointing device26, and a network interface27. The above devices are interconnected via a bus28.

The CPU20controls an entire operation of the system110. The memory21includes a ROM (read only memory) and a RAM (random access memory). The HDD22includes any kind of storage device, and stores various image processing programs or instructions to be operated by the CPU20. The image processing programs include, for example, an image obtaining program, a brightness image generating program, a topographic feature image generating program, a topographic feature adding program, a high-resolution image generating program, a pre-binary image generating program, a brightness slope detecting program, a first outline adjusting program, and a second outline adjusting program (hereinafter, collectively referred to as an “image processing program”). In other words, the above-described image processors1A to1J are implemented as the image processing program in this exemplary embodiment.

The removable disk23is any kind of removable media, such as a floppy disk, a compact disk, and a magneto-optical disk, and stores a multivalue image, for example, to be processed by the system110. The display24includes a liquid crystal display, for example, capable of displaying the message from the CPU20or the multivalue image read out from the removable disk23. The keyboard25is any kind of device that allows a user to input an instruction. The pointing device26includes, for example, a mouse, allowing a user to point out the message or an image displayed on the display24. The network interface27allows the system110to communicate with other devices or apparatus via a communication line or a network.

FIG. 12illustrates an exemplary case of connecting the system110with other devices or apparatus. InFIG. 12, the system110is connected locally to a printer112, a scanner113, and a facsimile114. The system110is further connected to another system115via a network116.

The printer112is any kind of printer capable of printing an image received from the system110, including a multifunctional printer. However, if the printer112functions as a multifunctional printer, it also has a function of inputting a multivalue image to the system110, for example.

The scanner113is any kind of scanner, capable of optically reading an image to be processed by the image processor.

The facsimile114is any kind of facsimile apparatus, capable of providing an image to the system110or receiving an image from the system110.

The system115may include any kind of device or apparatus, including a personal computer, facsimile, printer, or scanner, as long as it is connected to the system110via the network116. The system115may include another image processor of the present invention, for example. The network116is preferably the Internet, however, it is not limited to such example.

When the CPU20is powered on, the RAM loads the image processing program from the HDD22to start an image processing operation according to a preferred embodiment of the present invention.

As mentioned above, the system110can incorporate various forms of image processor, however, the following description assumes that the image processor1F ofFIG. 6is incorporated in the system110. In other words, the image processing program according to the image processor1F ofFIG. 6is executed.

Referring now toFIG. 13, a general image processing operation of the image processor1F is explained.

In Step S101, the image obtainer11reads out a multivalue image from the removable disk23. In this example, the multi-value image is previously stored in the removable disk23, however, the image obtainer11may receive a multivalue image from any other device or apparatus, such as the printer112, the scanner113, the facsimile114, or the system115, connected to the system110via the network interface27.

FIG. 14illustrates an exemplary multivalue image, having English alphabet characters.FIG. 15illustrates an exemplary multivalue image, including three kanji characters (equivalent to Chinese characters) C1, C2, and C3and one hiragana character (a type of Japanese character) C4.

In Step S102, the image obtainer11determines whether the multivalue image is a color image. If it is a color image, the operation moves to Step S103, and otherwise to Steps S104and S107.

In Step S103, the color/grayscale converter111converts the multivalue image from a color image to a grayscale image.

In Step S104, the high-resolution image generator15generates a high-resolution image by using an interpolation technique of any kind. Examples of the interpolation technique includes bicubic, bilinear, nearest neighbor, spline, etc. In this specific example, bilinear interpolation is applied to the multivalue image to increase its resolution. Further, the edges of the interpolated image are smoothened using an anti-alias filter, such as a 3 pixels by 3 pixels linear filter.

In Step S105, the brightness slope detector17detects a specific brightness slope of each pixel of the high-resolution multivalue image, and stores the detected slope values in the slope memory117.FIG. 16illustrates the brightness slope corresponding to the character images ofFIG. 15. In this case, the greater brightness slope values are indicated as darker areas, and smaller brightness slope values are indicated as lighter areas.

In Step S107, the brightness image generator12generates a brightness image from the multi-value image, in a similar manner described referring toFIG. 1.

In Step S108, the topographic feature image generator13generates a topographic feature image of the multivalue image, based on the brightness image created in the previous step.FIG. 17illustrates the topographic feature image corresponding to the multivalue image ofFIG. 15. Compared to the image ofFIG. 15, which is expressed in 256 grayscales, the image ofFIG. 17is expressed in three areas of black, gray (shaded), and white.

The black, gray (shaded), and white areas each indicate the topographic feature of the multivalue image ofFIG. 15. In other words, the white areas indicate a peak/ridge region of the image, corresponding to higher brightness values. The black areas indicate a valley/pit region of the image, corresponding to lower brightness values. The gray areas indicate a hillside region of the image, corresponding to medium brightness values.

In Step S106, the pre-binary image generator16generates a pre-binary image based on the high-resolution multivalue image created in Step S104.

More specifically, in this example, instead of generating a binary image including on pixels (having 1 values) and off pixels (having0values), the pre-binary image generator16generates a pre-binary image including on pixels (having 1 values), off pixels (having 0 values), and TBD pixels (having −1 values), as follows.

First, a target pixel (x, y) is selected. Then, a target window including the target pixel (x, y) at its center and neighboring pixels surrounding the target pixel is selected. The size of the target window, i.e., the number of neighboring pixels, should be determined so as to accurately obtain the brightness value of the target pixel. In this example, it is determined depending on the resolution of the high-resolution multivalue image relative to the resolution of the multivalue image.

Using brightness values of the pixels within the target window, the brightness mean m(x, y) and the brightness standard deviation s(x, y) of the target pixel (x, y) are calculated, respectively.

The target pixel (x, y) is determined to be the on pixel, the off pixel, or the TBD pixel, based on the mean m(x, y) and the standard deviation s(x, y).

For example, if the target pixel (x, y) is equal to or less than m(x, y)+k0*s(x, y), the target pixel is determined to be the on pixel, having 1 value. In this case, k0 is an arbitrary parameter having a value between −1 and 1. If the target pixel (x, y) is larger than m(x, y)+k0*s(x, y) and smaller than m(x, y)+k1*s(x, y), the target pixel is determined to be the TBD pixel, having −1 value. In this case, k1 is another arbitrary parameter having a value between 0 and 2, but it is larger than the parameter k0. In any other cases, the target pixel is determined to be the off pixel, having 0 value.

In the character images shown inFIGS. 14 and 15, the on pixels correspond to character outlines, the off pixels correspond to background portions, and the TBD pixels correspond to the pixels that cannot be determined to be the character outlines or the background portions. In other words, the TBD pixels are determined to be either the on or off pixels, using the topographic feature extracted in Step S108.

FIG. 18illustrates the pre-binary image corresponding to the exemplary multivalue image ofFIG. 14, andFIG. 19illustrates the pre-binary image corresponding the exemplary multivalue image ofFIG. 15.

Both images indicate the on pixels as black, the off pixels as white, and the TBD pixels asgray (shaded). The image ofFIG. 19, which includes the kanji characters, contains a larger number of the TBD pixels when compared to the image ofFIG. 18, including the alphabetic characters, which indicates that the kanji characters have line segments more dense than those of the alphabetic characters.

To determine the values of the TBD pixels, the topographic feature adder14compares the target TBD pixel in the pre-binary image with the corresponding pixel in the topographic feature image in Step S109.

In the alphabet image ofFIG. 18, the TBD pixels are mainly present in the horizontal line segment of the letter “e”. Since those TBD pixels all correspond to the valley/pit portions of the topographic feature image (not shown), the TBD pixels are determined to be the on pixels, as shown inFIG. 20. Thus, addition of the topographic feature can compensate the information loss that generally occurs during the conventional binarization process.

This advantage may be clearly understood, by comparingFIGS. 20 and 22.FIG. 22is an exemplary binary image generated from the multivalue image ofFIG. 14, without adding the topographic feature. As shown inFIG. 22, without the topographic feature, the TBD pixels are wrongly interpreted as the off pixels.

In the kanji and hiragana character image ofFIG. 19, the TBD pixels are rather scattered. For the purpose of description, portions having a large number of the TBD pixels are selected, as indicated by C11, C21, C31, C32, and C41.

The TBD pixel portions C11, C21, C31, C32, and C41are determined to be the on or off pixels, using the topographic feature image ofFIG. 17.

The TBD pixel portion C11, which corresponds to the white areas of the topographic feature image, is determined to be the off pixel. The TBD pixel portion C21, which corresponds to the black areas of the topographic feature image, is determined to be the on pixel. The TBD pixel portion C31, which corresponds to the black areas of the topographic feature image, is determined to be the on pixel. The TBD pixel portion C32, which corresponds to the black areas of the topographic feature image, is determined to be the on pixel. The TBD pixel portion C41, which corresponds to the white areas of the topographic feature image, is determined to be the off pixel.

FIG. 21illustrates the resultant binary image, after adding the topographic feature ofFIG. 17to the pre-binary image ofFIG. 19. As shown inFIG. 21, addition of the topographic feature can compensate the information loss that generally occurs during the conventional binarization process.

FIG. 23illustrates an exemplary binary image generated from the multivalue image ofFIG. 15, without adding the topographic feature. As shown inFIG. 23, without the topographic feature being added, the TBD pixel portions C21, C31, and C32are wrongly interpreted as the off pixels.

In Step S110, the first outline adjuster18enhances and smoothens the character outline in the binary image. The character outline is defined as a boundary line between the on pixels and off pixels of the binary image. In this example, enhancing and smoothing operations are performed, using the active contour model, or the so-called “snake”.

The snake can be defined as a parameterized curve v(s)=(x(s), y(s)), where x(s) and y(s) are x-y coordinate functions of the parameter s ranging from 0 to 1. The snake is controlled by minimizing the following energy function:
E=∫(α(s)Econt+β(s)Ecurv+λ(s)Eimage)ds,
wherein α, β, and λ are predetermined parameters, which are all set to 1, specifically in this example.

In the above function, Econt controls stretch of the snake. Particularly, it causes a sequence of points in the snake to be arranged in a predetermined space interval. Ecurve controls smoothness of the snake. Particularly, it reduces curvature, or increases a curvature radius, of the point sequence in the snake. Eimage attracts the snake to contours with large image gradients. In other words, Eimage may be expressed as −GH(v(s)), where GH corresponds to the brightness slope that has been calculated and stored in Step S105. As shown inFIG. 24, the character outline of the multivalue image has greater brightness slope values.

Using the above snake algorithm, the character outline of the binary image is enhanced and smoothened.FIG. 25illustrates the binary image corresponding to the image ofFIG. 21, created based on the character outline corrected through this step. ComparingFIGS. 21 and 25, it can be easily noticed that image quality of the binary image is greatly enhanced.

The same can be said for another exemplary image ofFIG. 20. The resultant binary image ofFIG. 26, obtained after applying the snake algorithm to the binary image ofFIG. 20, is superior in smoothness to the image ofFIG. 20.

In Step S111, the second outline adjuster19further smoothens the character outline in the image, particularly smoothening aliased or jaggy edges and sharpening a cross section of vertical and horizontal character lines. In this specific example, such operations are performed using the following clustering technique.

For descriptive purposes, the exemplary case is considered of a kanji character C5illustrated inFIG. 27. The character C5includes jaggy outlines, and rounded corners indicated as “CNR”. In this example, one of the corners CNR is particularly selected to be a target character outline for jag reduction and cross-section correction, as illustrated inFIG. 28A.

First, each of the points p(i) forming the target character outline is labeled, based on its tangential line direction.

The sequence P of points p(i) may be mathematically expressed as p(0), p(1), p(2), . . . p(n−1).

In the above expression, the parameter i represents an index number corresponding to a location of the target point in the point sequence P. The parameter n represents the number of points on the point sequence P.

If the tangential direction of a target point p(i) is close to 0, 90, 180, or 270 degrees, the target point p(i) is given a label L(i) having a value of 0, 1, 2, or 3, respectively. Otherwise, the target point p(i) is given a label L(i) having a value of −1. In other words, if the tangential direction is a value ranging from [(jπ/2)−d] to [(jπ/2)+d], the target point p(i) is labeled the L(i) equal to j. In the above function, the parameter d has an arbitrary value sufficiently small relative to the value π/2, and the parameter j is an index number selected from 0, 1, 2, and 3.

For example, if the target point p(i) has the tangential direction that is close to the horizontal axis, the target point p(i) is labeled 0 or 2. If the target point p(i) has the tangential direction that is close to the vertical axis, the target point p(i) is labeled 1 or 3. In any other cases, the target point p(i) is labeled −1.

Next, the points p(i) having the same label values L(j) are grouped into a cluster C(j), as expressed in the following:
C(j)=(p(kj),p(kj+1), . . . ,p(kj+mj−1)),

wherein the parameter j represents an indexed number of the cluster C(j), p(kj) represents the first point of the cluster C(j), and the parameter mj represents the number of points included in the cluster C(j).

Referring now toFIG. 29, an exemplary operation of clustering is explained.

In Step S201, a point p(i) is selected, particularly the one corresponding to a first point on the target character outline. The selected point p(i) thus has the index value i of k0, and is assumed to belong to a first cluster C(j), having the index value j of 0.

In Step S202, a target point p(kj) is selected, particularly the one adjacent to the point p(k0). The target point p(kj) is assumed to belong to the cluster C(j), with the index value j having the value 1, 2, or 3. At the same time, the number of points in the cluster C(j), expressed as m(j), is set to 1.

In Step S203, the point adjacent to the target point p(kj) is identified and given the index value of (kj+1).

Step S204checks whether the number of points in the cluster C(j), i.e., the value m(j), is smaller than the value n, which is the number of points in the target character outline. In other words, Step S204determines whether all the points on the target character outline have been identified. If the number of points in the cluster C(j) is larger than the value n (“NO” in Step S204), it is determined that the all points have been identified, and the process moves to Step S205. Otherwise, the process moves to Step S207.

Step S207determines whether the label L(j+1) given to the point(kj+1) matches the label L(j) given to the point(kj) of the cluster(j). If yes, the process moves to Step S208to determine that the point(kj+1) belongs to the cluster(j), otherwise the process moves to Step S209to start a new cluster(j+1).

In Step S208, the value m(j), which is the number of points in the cluster(j), is incremented by one, and the process moves to Step S203to repeat the Steps S203to S208.

In Step S209, the index number j of the cluster(j) is incremented by one. In other words, the point(kj+1) is determined to belong to the cluster(j+1). Then, the process moves to Step S202to repeat Steps S202to S207.

Step S205checks whether the value of the label L(0) given to the starting point(k0) of the cluster(0) matches with the value of the label L(n−1) given to the last point(n−1) of the cluster(j). If yes, the process moves to Step S206, otherwise, the process ends.

In Step S206, the cluster(0) including the point(k0) and the cluster(j) including the point(n−1) are grouped into one cluster. By this step, the index number k0of the point(k0) is renumbered to (kj−n), and the value m0, which is the number of the points included in the cluster(0) is renumbered to (0+j), and the process ends.

This operation of clustering may be summarized as follows:

To group the target cluster(j) and the previous cluster C(j−1) together, the first point p(kj) of the cluster(j) must be equal to the last point p(kj−1+mj−1) of the previous cluster C(j−1). To group the target cluster(j) and the following cluster C(j+1) together, the last point p(kj+mj−1) of the cluster(j) must be equal to the first point (kj+mj) of the following cluster C(j+1).

In the above-described case, since the target cluster(j) and the previous cluster C(j−1) belong to different clusters, the label L(kj−1+mj−1) given to the last point p(kj−1+mj−1) of the previous cluster C(j−1) must be different from the label L(j) given to the first point p(kj) of the cluster C(j). Any of the points included in the target cluster C(j) is assigned the same value of the label, thus satisfying L(kj)=L(kj+1)=. . . L(kj+mj−1). Since the target cluster(j) and the following cluster C(j+1) belong to different clusters, the label L(kj+mj−1) given to the last point p(kj+mj−1) of the cluster C(j) must be different from the label L(kj+1) given to the first point p(j+1) of the next cluster C(j+1).

In the exemplary case illustrated inFIG. 28A, a plurality of clusters a to i are created through the above-described operation. In this case, the clusters b and d are labeled with 0 and 2, respectively. The clusters f and h are labeled with 1 and 3, respectively. The clusters a, d, e, g and i are all labeled with −1.

Next, one of the clusters a to i is selected for jag reduction. If the cluster b or d is selected, the Y coordinate of each point in the selected cluster is obtained, and the mode of Y coordinate values is determined. Thereafter, the Y coordinate values of the respective points are adjusted according to the mode. More specifically, if the difference between the Y coordinate value of the target point and the mode (|Y(kj+1)−M|) is equal to or less than 1, the Y coordinate value of the target point is adjusted to be the mode.

If the cluster f or h is selected, the X coordinate of each point in the selected cluster is obtained, and the mode of X coordinate values is determined. In a similar manner as described above, the X coordinate values of the respective points are adjusted according to the mode.

In this way, the clusters b, d, f and h can be smoothened as illustrated inFIG. 28B.

Next, the cross section of the vertical and horizontal character outlines, i.e., the corner “CNR”, is adjusted for sharpness. In this example, such a cross section corresponds to the cluster interposed between the cluster labeled with 0 or 2 and the cluster labeled with 1 or 3, satisfying the following conditions:

The label L(j−1) given to the previous cluster(j−1) must be equal to or greater than 0; the label L(j) given to the target cluster(j) must be less than 0; the label L(j+1) given to the following cluster(j+1) must be greater than 0; and the label L(j−1) is not equal to the label (j+1).

If the number of points included in the target cluster is small, as in the cluster e ofFIG. 28A, the adjacent clusters d and f may be extended until they meet each other. In this way, the sharpened corner can be created, as illustrated inFIG. 28B. Based on this corrected character outline, the binary image ofFIG. 30is generated based on the image ofFIG. 27. ComparingFIG. 27andFIG. 30, it is easily noticed that the image ofFIG. 30is superior to the image ofFIG. 27in image quality.

In Step S112, the image processor1F converts a vector image to a raster image. The image processor1F then outputs the resultant binary image, for example, to the display24in the system110, or any other device connected to the system110.

FIG. 31Aillustrates another exemplary multivalue image, including kanji characters and hiragana characters.FIG. 31Billustrates the exemplary binary image corresponding to the multivalue image, after applying the above-described image processing. Particularly, in this case, the original image ofFIG. 31Ahas the resolution of 200 dpi, while the processed image ofFIG. 31Bhas the resolution of 800 dpi. It can be easily noticed that each character of the original image ofFIG. 31Ais accurately reproduced in the processed image ofFIG. 31B, with enhanced image quality.

In addition to the exemplary systems illustrated inFIGS. 11 and 12, any of the image processors1A to1J (hereinafter, collectively referred to as the “image processor 1”) may be operated with an exemplary system illustrated inFIG. 32.

In this case, the image processor1is incorporated into an image reader3, such as an OCR, capable of recognizing an image, particularly the one including characters and symbols.

The image reader3additionally includes a binary image obtainer32, a character/line extractor33, a character storage device341, a line storage device342, and an image output device35.

The binary image obtainer32receives a high-resolution binary image from the image processor1. The character/line extractor33extracts a portion of the image, including characters and/or lines. The character storage device341stores the character portion in a character code format. The line storage device stores the line portion in a vector or raster format. The image output device35outputs the character portion and the line portion to other devices connected to the image reader3, separately from each other, or after combining the character and line portions.

If the original image processed by the image processor1is a color image, the image reader3may store color information in a memory (not shown) along with the character or line portion of the image. In such a case, the image output device35may output the image in color, by adding the color information to the character and/or line portion.

For example, the above description emphasizes on the general image forming operation performed by the image processor1F ofFIG. 6, however, an image forming operation of the present invention. is not limited to such example.

Further, image processing techniques described above according to the present invention may be combined with other conventional techniques, such as filtering, contrast enhancement, model-based image restoration, resolution expansion, etc., as will be apparent to those skilled in the art.

The present invention claims priority to Japanese patent application No. JPAP2003-290614 filed on Aug. 8, 2003, in the Japanese Patent Office, the entire contents of which are incorporated by reference herein.