Image processing method

Abstract: Image processing method for smoothing without dulling edge. Convolution areas of predetermined size are successively read out, pixels in each convolution area are divided into a plurality of groups, the median value of each group is calculated, the median value of the median values of the groups is calculated and the last median value is defined as a representative value of the convolution.

Description: FIELD OF THE INVENTION The present invention relates to an image processing method, particularly for smoothing without dulling edge. BACKGROUND OF THE INVENTION For eliminating noises in an image, a local averaging method for smoothing is usually applied, because this method can be easily executed by a software of a local spatial calculation. In the resent large scale image processing system, an image is processed for the above smoothing in 32msec. The local averaging method dulls edges of a configuration and make the image unclear as well as of low resolution. In order to solve this problem, various smoothing methods without dulling edge are proposed. Nagao method, local selecting method of pixels, hysteresis smoothing method, median filter method and E-filter method in frequency space. Among the above, median filter method is well known because of its high quality of the process result. It is known from "IEEE Computer Society Conference on Pattern Recognition and Image Processing, Chicago, 31.5-2.6.1978, p. 137-141; P.W. Marenda : A separable median filter for image noise smoothing" to use a separable median filter which allocates to the center value of a window, the median of the precalculated row medians. It is known from "IEEE international conference on acoustics, speech, and signal processing, 1984, San Diego , 19-21.3.1984, vol.2, p. 20.11.1-4, G.R. Arce et al. : Median filters analysis for 2 dimensional recursively filtered signals" to make the first grouping in a separable median filter vertically or alternatively horizontally. A cross-shaped window, of dimension 3*3, for a median filter, is known from "Communications of the ACM, vol. 27, n°8, August 1984, p. 807-818, NY (US); D.R.K. Brownrigg : The weighted median filter". However, the smoothing methods without dulling edge, including median filter method, need long process time and are difficult to be executed by a hardware. These methods cannot be applied to processes that is to be processed in high process speed. SUMMARY OF THE INVENTION Therefore, the present invention has an object to provide an image processing method for smoothing without dulling edge. The invention is set out in claim 1 of the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 shows the first type grouping of the first embodiment of the present invention; Fig. 2 shows the second type grouping of the embodiment; Fig. 3 shows the third type grouping of the embodiment; Fig. 4 shows the fourth type grouping of the embodiment; Fig. 5 shows the fifth type grouping of the embodiment; Fig. 6 shows dot patterns comparing the process result of the first grouping with the conventional median filter; Fig. 7 shows dot patterns comparing the process result of the second grouping with the conventional median filter; Fig. 8 shows a printer output for comparing process result of the first grouping with the conventional median filter; Fig. 9 to 13 show other printer outputs; Fig. 14 shows 3x3 convolution for describing the second embodiment; Fig. 15 shows 5x5 convolution for describing the second embodiment; Fig. 16 shows a dot pattern to be deleted by the second embodiment; and Fig. 17 shows a dot pattern not to be deleted. PREFERRED EMBODIMENT OF THE PRESENT INVENTION Exemplary preferred embodiments of the image processing method according to the present invention will be described in detail hereinafter. In Figs 1 (1) and (2), 3x3 convolutions to be read out are shown, in which references a, b, and c are given to pixels. These references represent groups for separating pixels. Each group includes 3 pixels vertically or horizontally aligned. As for 3x3 convolution including 9 pixels, the number of combinations of grouping for generating 3 groups each of which include 3 pixels is calculated as follows; 9 C 3 x 6 C 3 /3!=280 All types of groupings are shown in Figs 1 to 5. The grouping in Fig. 1 is the most simple type. For each grouping, the smoothing without dulling edge is performed by the following calculation. Med{Med{a,a,a}, Med{b,b,b}, Med{c,c,c}} where, a : Density of each pixel in the group represented by the reference "a"; b : Density of each pixel in the group represented by the reference "b"; c : Density of each pixel in the group represented by the reference "c"; and Med: Operator for extracting median value. In this calculation, the total number N1 of sorting times is, N1=(1/2)n(n-1) 2 where, n is the number of groups as well as number of pixels in each group, "3" in this case. While, the conventional median filter for nxn convolution needs the total number N2 of sorting times as follows; N2=(1/2)n 2 (n 2 -1) N1 is smaller than N2/n, so the process time of the first embodiment has much higher process speed than the conventional median filter. In the 3x3 convolution, the first embodiment has a process speed 6 times of that of the conventional median filter. Figs 8 to 13 show printer outputs of a process result by the embodiment and by the conventional median filter. Fig. 8 shows a process result for an image without noises. In Fig. 8, each dot is represented by "@", the original image is (A), the process result by the conventional median filter is (B) and the process result by the embodiment is (C). In the image (B) and (C), "%" represents a pixel generated by the processing but not included in the original image. The number of pixels in (B) is 13, while the number in (C) is 1. From the number, the processing of this embodiment is much better in the quality of the process result than the conventional median filter. A ratio of the number of correct, or not changed, pixels divided by total pixel number of original image without noises is an index for evaluating the quality of the process result. This ratio is now called "preservation ratio". The preservation ratio of the embodiment is 99.9%, while the ratio of the conventional median filter is 99.3%. The images to be processed (A) in Figs 9 to 11 include noises of 5%, the image to be processed (A) in Figs 12 and 13 include noises of 10%. In Table 1, the preservation ratio of the embodiment and the conventional median filter with respect to images (A) in Figs 8 to 13 are totally compared. Image to be processed Noise % Process result of the embodiment Process result of the conventional median filter Error pixels Preservation ratio(%) Error pixels Preservation ratio(%) Fig. 8 0 1 99.9 13 99.3 Fig. 9 5 18 99.0 30 98.2 Fig. 10 5 18 99.0 28 98.4 Fig. 11 5 22 98.7 39 97.8 Fig. 12 10 50 97.1 54 96.9 Fig. 13 10 53 97.0 53 97.0 The preservation ratio represents the elimination quality as well, because the preservation ratio is identical with the identification ratio of the processed image to the original image without noises. The reason why the processing according to the present invention has high quality is that the processing evaluates pixels in more macro point of view than the conventional median filter. As for the dot pattern in Fig. 6 (1), the center pixel at the right angle convex corner is deleted in the conventional median filter. As for the dot pattern in Fig. 6 (2), a center pixel is added on the right angle concave corner in the conventional median filter. This is a problem of the conventional median filter in preserving the original image. While in the processing of the first embodiment, the dot patterns in Figs 6 (1) and (2) are preserved as they are. Fig. 2 shows the second grouping of the first embodiment. By this grouping, the process result is similar to that of the first grouping. In Figs 7 (1) to (3), dot patterns are shown, which are processed to be higher quality image by the second grouping than the first grouping. In Figs 7(4) to (13), there are shown patterns occasionally better in the process result of the second grouping than the first. The patterns rotationally or axially symmetric to the patterns in Figs 7 (4) to (13) are the same. Figs 7 (1), (6) and (7) are patterns corresponding to an acute concavity with 45 degree. Such configuration is hardly exist in a natural image. The corner point in the concavity can be deemed to be a pixel accidentally deleted. The processing according to the second grouping can fill the corner point with a pixel of configuration's density. Fig. 7 (2) shows a T-shaped pattern. The center pixel of the vertical line of the T-shape should not be deleted. In the reversed dot pattern, the corresponding pixel should not be filled with configuration's density. The processing according to the second grouping generates the process result of the T-shaped pattern meeting to the above requirement. The rotationally or axially symmetric patterns are processed the same. Fig. 7 (3) shows a rotated and reversed L-shaped pattern. The center pixel of the vertical line of the T-shape should not be filled with configuration's density. In a not reversed pattern, the center pixel should not be deleted. In the conventional median filter, the center pixel in the reversed pattern is filled with configuration's density. While in the first embodiment according to the grouping of Figs 2 (1) to (7), (9) to (11), (15) to (17) and (20) to (23), the process result meets the above requirement. Fig. 7 (4) shows a reversed steplike pattern. The pixel on the step corner is filled with configuration's density, in the processing according to the first grouping. While the processing according to the grouping in Figs 2 (12) to (14), (18) to (20), (24) and (26) processes the pattern so as not to fill the pixel on the step corner. The not reversed pattern, rotational symmetric pattern of reversed or not reversed pattern, and axially symmetric pattern of reversed or not reversed pattern are adequately processed by the grouping above, as well. Fig. 7 (5) to (7) show a low trapezoid line pattern. The pixel inside of the trapezoid should be filled with configuration's density. In the reversed pattern, the inside of the trapezoid should be deleted. In the conventional median filter, or in the processing according to the first grouping, the inside pixel is kept as it is. According to the second grouping, the inside pixel is changed, meeting to the above requirement. The reversed pattern, the rotationally symmetric pattern of the reversed or not reversed pattern, and the axially symmetric pattern of the reversed or not reversed pattern are adequately processed, as well. Fig. 7 (8) shows a reversed Y-shaped pattern. The cross point of Y-shape should not be filled with configuration's density. However, the conventional median filter and the processing according to the first grouping fill the above cross point. While, the processing according the the second grouping keeps the cross point as it is. Fig. 7 (9) shows a rotated and reversed short foot L-shaped pattern with an additional dot. The center pixel of the vertical line of the L-shape should not be filled with configuration's density. However, in the processing according to the first grouping, the center pixel is filled with configuration's density. While, according to the second grouping, the center pixel is not filled. Fig. 7 (10) shows a reversed high step-like pattern. The middle pixel of the step should not be filled with configuration's density. However, according to the first grouping, the middle pixel is filled. While, according to the second grouping, the middle pixel is not filled. Fig. 7 (11) shows a rotated and reversed low T-shaped pattern. The center pixel of the horizontal line of T-shape should not be filled with configuration's density. However, according to the first grouping, the center pixel is filled. While, according to the second grouping the center pixel is not filled. The reverse pattern of Figs 7 (8) to (11), a rotationally symmetric pattern of reversed or non reversed pattern, and axially symmetric pattern of reversed or not reversed pattern are processed adequately according to the second grouping, as well. Fig. 7 (12) shows a reversed box with one dot hole. The center pixel corresponding to the hole should be deleted so as to make the box holeless. However, the conventional median filter and the processing according to the first grouping keep the center pixel as it is. While, according to the second grouping of Figs 2 (14), (15), (19), (21), (26) and (27), the center pixel is deleted. The reversed pattern of the pattern in Fig. 7 (12), rotationally symmetric pattern of reversed or not reversed pattern and axially symmetric pattern of reversed or not reversed pattern are adequately processed, as well. Fig. 7 (13) shows a crossing pattern. The center pixel of the crossing should not be deleted. However, the center pixel is deleted, according to the first grouping. While the center pixel is not deleted according to the grouping in Figs 2(1), (3), (4), (6), (7), (9) to (12), (14), (19), (21) to (24) and (26). The second grouping has process results 88% similar to that of the first grouping. Particularly the grouping in Figs 2 (2), (4), (5), (8), (13), (15), (17), (18), (20), (25) and (27) include a lot of better process results than that of the first grouping. The process result of the third grouping (Fig. 3), the fourth grouping (Fig. 4) and the fifth grouping are identical in 86% pattern, 83% pattern and 81% pattern, respectively, with the process result of the first grouping whose high quality has already proved. Furthermore, the second to the fifth grouping have process result 90% identical with the conventional median filter. Hereinafter, the second embodiment is described in detail. In Fig. 14, a 3x3 convolution is shown with references a to i in the order along the scan line. The following calculation is performed in the second embodiment. Med{d, Med{b, e, h}, f} or Med{b, Med{d, e, f}, h} where, b, d, e, f, h: Density of the pixels designated by these references. The median calculation in the above formula (2) is simplified as follows; Med{b, e, h} = Max{Min{b, e}, Min{e, h}, Min{h, b}} or Med{b, e, h} = Min{Max{b, e}, Max{e, h}, Max{h, b}} The above calculations (2) and (3) mean a median calculation of a horizontal and vertical crossing pattern. This calculation is much simpler and takes much shorter calculation time than the first embodiment. When the center pixel of the convolution is positioned on the cross point of the crossing, the calculation represents the total characteristics of the convolution. The crossing may be changed to be oblique crossing. The calculation for oblique crossing is as follows; Med{a, Med{c, e, g}, i} or Med{c, Med{a, e, i}, g} Fig. 15 shows a 5x5 convolution in which references a to y in the order along the scan line are given. The crossing pattern median calculation can be applied to the 5x5 convolution, as well. The calculation is performed as follows; Med{k, l, Med{c, h, m, r, w}, n, o} or Med{c, h, Med{k, l, m, n, o}, r, w} or Med{e, i, Med{a, g, m, s, y}, q, u} or Med{a, g, Med{e, i, m, q, u}, s, y} Table 2 shows the process result of the formula (2), (3), (6), (7) and the conventional median filter, with respect to the pattern in Figs 16 (a) to (j) and Figs 17 (a) to (l). Pattern Formula (2) Formula (3) Formula (6) Formula (7) Conventional Median Filter Fig.16 (a) 0 0 0 0 0 (b) 0 0 0 0 0 (c) 0 1 0 0 0 (d) 0 0 0 0 0 (e) 1 1 0 0 0 (f) 0 1 0 0 0 (g) 1 1 0 0 1 (h) 0 0 1 1 0 (i) 1 1 0 0 1 (j) 1 1 1 1 1 Fig.17 (a) 1 1 1 1 1 (b) 1 1 1 1 1 (c) 1 1 1 1 1 (d) 1 1 1 1 1 (e) 1 1 1 1 1 (f) 1 1 0 0 0 (g) 0 0 0 0 0 (h) 0 0 0 0 0 (i) 0 0 0 0 0 (j) 0 0 0 0 0 (k) 0 0 0 0 0 (l) 0 0 1 1 1 The patterns in Fig. 16 are processed by the formula (2), (3), (6) and (7) similar to the conventional median filter. With respect to the patterns in Fig. 17, the calculation results of the formulas have advantages that one-dot lines crossing the convolution are usually preserved.

Claims: Image processing method for smoothing a configuration comprised of pixels without thereby dulling edges of the configuration, comprising the steps of: calculating for each pixel of the configuration a median value from pixel-values contained in a n x n-calculation window centered on the respective pixel characterised in that said calculating comprises the steps of: first calculating the median value of pixels arranged on a first line crossing the center of the window, and second calculating the final median value by calculating the median value of the value obtained by the first calculation and values of pixels arranged on a line which is substantially orthogonal to the first line, wherein the median value of the first calculation is obtained by calculating minimum values of all three different pixel pairs of the first line and determining the maximum value therefrom. Image processing method for smoothing a configuration comprised of pixels without thereby dulling edges of the configuration, comprising the steps of: calculating for each pixel of the configuration a median value from pixel-values contained in a n x n-calculation window centered on the respective pixel characterised by said calculating comprises the steps of: first calculating the median value of pixels arranged on a first line crossing the center of the window, and second calculating the final median value by calculating the median value of the value obtained by the first calculation and values of pixels arranged on a line which is substantially orthogonal to the first line, wherein the median value of the first calculation is obtained by calculating the maximum values of all three different pixel pairs of the first line and determining therefrom the minimum value. Image processing method according to claim 1 or 2 wherein said calculation window is a 5 x 5-window. Image processing method according to claim 1 or 2 wherein said calculation window is a 3 x 3-window.

Inventors: KUMAGAI RYOHEI, KUMAGAI, RYOHEI, KUMAGAI, RYOHEI C/O EZEL INC.
Applicants: SHARP KK, YOZAN INC, SHARP KABUSHIKI KAISHA, YOZAN INC.
Application year: 1989
Main classification: G06T5
IPC codes: G06T5, H03H17