Method of smoothing image data

Abstract: Original image data items a₁, a₂, ... a N with respect to a series (which may be a horizontal row) of pixels in a two-di­ mensional image are smoothed by converting a n to a′ n which is the median value of a n , (a′ n-1 + α), and (a′ n-1 - α) (where a′ n-1 is a converted data item which is produced by convert­ ing the original image data item a n-1 to a median value, and α is a constant), converting a n to a″ n which is the median va­ ue of a n , (a″ n+1 + α), and (a″ n+1 - α) (where a″ n+1 is a convert­ ed data item which is produced by converting the original image data item a n+1 to a median value), and determining the mean value A n of the converted data items a′ n and a″ n with respect to the same pixel and employing the determined mean value A n as smoothed data.

Description: The present invention relates to a method of smoothing image data according to claim 1. Various methods of smoothing image data have heretofore been known in the art for decreasing or eliminating fluctuations or noise in image data. Study on data compression (highly efficient data coding) for efficient transmission and recording of image data has made much progress in recent years. In such data compression, the data smoothing is employed as a pretreatment process to increase a data compression efficiency. More specifically, by smoothing image data in predictive coding, the differential is reduced and the number of codes therefor may be reduced, and by smoothing image data in orthogonal transform coding, the converted data is concentrated in a low-frequency range. Therefore, the region in which the code length may be short is widened, and hence the data compression rate may be increased. Among image data smoothing methods which are often employed normally are mean smoothing and median smoothing. According to the mean smoothing process, the image data of each pixel of a two-dimensional image is replaced with the mean value of data of a plurality of pixels (pixels within a mask size) including the pixel to be replaced. In the median smoothing method, the median value of each data item is used instead of the mean value in the above replacement process. In the proceedings of the Fourth International Joint Conference on Pattern Recognition, November 7 to 10, 1978, Kyoto, Japan, pages 502 to 504, BO JUSTUSSON: "Noise Reduction by median filtering", a median filter is disclosed that only works with pixel values directly. A moving median and moving average are compared as two different picture processing methods. For normal white noise, a median filter should preserve edges whilst a moving average should blur them. For both kinds of filters different fields of applications are disclosed. In the proceedings of the seventeenth Annual Allerton Conference on Communication, Control and Computing, October 10 to 12, 1979, pages 886 to 894 a non-linear filtering technique namely median filtering and its application to speech and picture processing is disclosed. Moreover, some fast methods of median filtering as radix method, selection network method and histogram method are explained. With such mean and median smoothing methods, those areas in which image data variations are large and small are uniformly smoothed. Therefore, if a high data moving effect were to be obtained, the area with a small image data variation Would be excessively smoothed, thus losing image details. If such a difficulty were to be avoided, the area with a large image data variation would not be smoothed sufficiently. Any large variation left in image data after it has been smoothed is responsible for the prevention of an increase in the data compression rate. It is therefore an object of the present invention to provide a method of smoothing image data capable of obtaining a high data smoothing effect whilst allowing image details to be left in smooth image data, and of greatly increasing the data compression rate particularly when the method is applied to image data compression. This object is solved by the features of Claim 1. The horizontal row of pixels and the vertical column of pixels used herein simply represent respective directions which intersect each other and hence may mean vertical and horizontal directions respectively, which are generally defined dependant on the size, contents, and arrangement of an actual two-dimensional image to be processed by the method of the present invention. With the image data smoothing method of the present invention according to Claim 1, the difference between data items of adjacent pixels falls within a prescribed range at all times, thereby providing a good data smoothing effect. Where the method of the present invention is employed as a pre-treatment process for image data compression, the difference always comes within a prescribed range in predictive coding, or converted data items tend to concentrate in a low-frequency range in orthogonal transform coding, so that the data compression rate can be increased sufficiently. If the difference between data items of adjacent pixels is small, the values of these data items remain as they are, and hence image details will not be eliminated. Advantages embodiments of the invention are disclosed by the sub-claims. The above and other objects, features and advantages of the present invention will become more apparent from the following description when taken in conjunction with the accompanying drawings in which preferred embodiments of the present invention are shown by way of illustrative example. Figure 1 is a block diagram of a system for carrying out an image data smoothing method according a first embodiment of the present invention; Figure 2 is a flowchart of processing steps of the image data smoothing method of the first embodiment; Figure 3 is a diagram of a matrix of pixels; Figure 4 is a graph explaining how an image data smoothing method of the invention is effective; Figure 5 is a block diagram of a system for carrying out an image data smoothing method according a second embodiment of the present invention; Figure 6 is a flowchart of processing steps of the image data smoothing method of the second embodiment; Figure 7 is a block diagram of a system for carrying out an image data smoothing method according a third embodiment of the present invention; and Figure 8 is a flowchart of processing steps of the image data smoothing method of the third embodiment. DESCRIPTION OF THE PREFERRED EMBODIMENTS Like or corresponding parts are denoted by like or corresponding reference characters throughout several views. Figure 1 shows a system such as a computer system for carrying out a method of smoothing image data according to a first embodiment of the present invention. Figure 2 illustrates an operation sequence of the system shown in Figure 1. Original image data a stored in an image file 10 such as an optical disk, a magnetic disk, or other image information storage medium is input to and stored in each of line buffer memories 11, 21 (steps P1 in Figure 2). The original image data a is data of each pixel x of a two-dimensional image F as shown in Figure 3. Original image data items a which correspond to a horizontal row of pixels in the pixel matrix shown in Figure 3 are successively applied to both line buffer memories 11, 21. More specifically, original image data items a₁, a₂, ... a N of pixels x(1, 1), x(1, 2), ... x(1, n), ... x(1, N) in the uppermost horizontal row in Figure 3 are first input to the line buffer memories 11, 21. As is apparent from Figure 3, the pixel x(m, n) represents the pixel in the mth row from above and in the nth column from left in (M x N) pixels of the image F. After the original image data items a₁, a₂, ... a N have successively been stored in the line buffer memory 11, the original image data items a₁ and a₂ are first read out and fed to a processor 12 (step P2). The processor 12 comprises a known comparator and compares the two original image data items a₁ and a₂ while being supplied with a constant α from a constant generator 13. The processor 12 then outputs: +α if a 2 - a 1 >α (a 2 -a 1 ) if |a 2 - a 1 | ≦ α -α if a 2 -a1 < - α (step P3). The output from the processor 12 is fed to an adder 14 in which it is added to the original image data item a₁ read out of the line buffer memory 11 (step P4). The output from the adder 14 is delivered to the line buffer memory 11 and then replaces the original image data item a₂ (step P5). The data item which has replaced the original image data item a₂ is referred to as a converted data item a'₂. When the original image data item a₂ is replaced with the converted data item a'₂, the addresses of the image data items stored in the line buffer memory 11 are shifted one by one as indicated by the arrow T in Figure 1 (step P6). Then, next two image data items are fed from the line buffer memory 11 to the processor 12. Since the addresses where the two image data items are to be read out of the line buffer memory 11 are fixed, an original data item a n before it is replaced and a converted data item a' n-1 after replacement are generally applied to the processor 12. The processor 12 is then responsive to the two supplied data items a n and a' n-1 for issuing outputs in the same manner as when the original image data items a₁, a₂ are supplied. In general, the processor 12 issues the following outputs: (1) +α if a n - a' n-1 > α (2) (a n - a' n-1 ) if |a n - a' n-1 | ≦ α (3) -α if a n - a' n- 1 < - α The output from the processor 12 is fed to the adder 14, and added thereby to the image data item a' n-1 read out of the line buffer memory 11. The output (converted data item) a' n from the adder 14 is sent to the line buffer memory 11 where it replaces the image data item a n . Therefore, the original image data item a n is converted to the data item a' n which is: a' n = a' n-1 +α for a' n = a n (no change) for a' n = a' n-1 - α for Stated otherwise, the original image data item a n is converted to a' n which is the median value of a n , (a' n-1 + α) and (a' n-1 - α). After the data item replacement, the addresses of the image data items stored in the line buffer memory 11 are shifted one by one as described above. Thereafter, the steps P2 through P6 are repeated (N-1) times so that the original data items a₂, a₃, ... a N are converted respectively to converted data items a'₂, a'₃, ... a' N . The original data item a₁ is converted to a data item a'₁, but remains to be of the same value. The series of the converted data items a'₁, a'₂, ... a' N is read out of the line buffer memory 11 (step P7) and sent to a mean processor 15. The line buffer memory 21 also contains the original image data items a₁, a₂, ... a N , which are processed in the steps P2 through P7 of Figure 2 by a processor 22, an adder 24, and the constant generator 13, the processor 22 and the adder 24 being identical to the processor 12 and the adder 14, respectively. However, the original image data items aN and a N-1 are first read from the line buffer memory 21 into the processor 22, and the data item a N-1 is replaced as a result of the comparison procedure. More specifically, If a N-1 a N >α, the processor 22 issues +α and a N-1 is replaced with a" N-1 = a N + α. If |a N-1 - a N | ≦ α, the processor 22 issues (a N-1 - a N ) and a N-1 remains to be of the same value but is changed to as a" N-1 . If a N-1 - a N < -α, the processor 22 issues - α and a N-1 is replaced with a" N-1 = a N -α. Thus, the processor 22 generally outputs: (1) +α if a n - a" n+1 > α (2) (a n - a" n+1 ) if |a n - a" n+1 | ≦ α (3) - α if a n - a" n+1 < - α Therefore, the original image data item a n stored in the line buffer memory 21 is converted to the data item a" n which is: a" n = a" n+1 + α for a" n = a n (no change) for a" n = a" n+1 - α for Stated otherwise, the original image data item a n is converted to a" n which is the median value of a n , (a" n+1 + α), and (a" n+1 - α). After the data item replacement, the addresses of the image data items stored in the line buffer memory 21 are shifted one by one. The steps P2 through P6 are repeated (N-1) times so that the original data items a₁, a₂, ... a N-1 are converted respectively to converted data items a"₁, a"₂, ... a" N-1 . The original data item a N is converted to a data item a" N , but remains to be of the same value. The series of the converted data items a"₁, a"₂, ... a" N is read out of the line buffer memory 21 into the mean processor 15. The mean processor 15 processes the converted data items a'₁, a'₂, ... a' N from the line buffer memory 11 and the converted data items a"₁, a"₂, ... a" N from the line buffer memory 21 to determine the mean values of the converted data items with respect to the same pixels. For example, the converted data items a'₁ and a"₁ with respect to one pixel are processed to obtain their mean value A₁: A 1 = (a' 1 + a" 1 )/2 (step P8). The mean values A₁, A₂, ... A N thus obtained are output from the mean processor 15 as smoothed data items of the original image data items a₁, a₂, ... a N (step p9). After the smoothed data items A₁, A₂, ... A N with respect to the Uppermost horizontal row of pixels x(1, 1), x(1, 2), ... x(1, N) shown in Figure 3 have been issued, original image data items a₁, a₂, ... a N with respect to the second horizontal row of pixels x(2, 1), x(2, 2), ... x(2, N) are delivered from the image file 10 to the line buffer memories 11, 21, and smoothed data items A₁, A₂, ... A N are determined by processing the original image data items a₁, a₂, ... a N in the same manner as described above. The data processing cycles are successively executed until original data items with respect to the lowermost horizontal row of pixels x(m, 1), x(m, 2), ... x(m, n) shown in Figure 3 are processed. The mean processor 15 outputs smoothed data A with respect to all pixels of the image F. The smoothed data A is fed to an image reproducing apparatus for reproducing the image or is subjected to image data compression, for example. Characteristics of the smoothed data will be described with reference to Figure 4. Figure 4 shows original image data items a₁, a₂, ... a N (before being smoothed) with respect to the respective pixels in one horizontal row, converted data items a'₁, a'₂, ... a' N , converted data items a"₁, a"₂, ... a" N , and smoothed data items A₁, A₂, ... A N with respect to the respective pixels in one horizontal row. As illustrated in Figure 4, the difference between adjacent data items in each of the series of the converted data items a'₁, a'₂, ... a' N and a"₁, a"₂, ... a" N falls within α. With the difference between adjacent data items falling within α, each of the series of the converted data items varies in a pattern different from that of the series of the original data items a₁, a₂, ... a N (as.if the data items were shifted to the right or left). Since a smoothed data item A n is obtained by averaging converted data items a' n and a" n , the series of smoothed data items A₁, A₂, ... A N varies in a pattern close to that of the original image data items. Therefore, the constant α may be of the same value or substantially the same value when the converted data a' n and the converted data a" n are found (this holds true for constants β, γ, described later on). An image data smoothing method according to a second embodiment of the present invention will be described with reference to Figures 5 and 6. Original image data items a₁, a₂, ... a N with respect to a horizontal row of pixels of an image F are sent from the image file 10 to the line buffer memories 11, 21 and processed in exactly the same manner as in the first method, and hence the mean processor 15 issues smoothed data items A₁, A₂, ... A N . Smoothed data A with respect to all horizontal pixel rows are temporarily stored in a frame memory 51 shown in Figure 5 (step P10 in Figure 6). Original image data a with respect to the same image F is also input to line buffer memories 31, 41. More specifically, original image data items a₁, a₂, ... a m , ... a M with respect to a vertical column of pixels x(1, n), x(2, n), ... x(m, n), ... x(M, N) shown in Figure 3 are applied to and stored in the line buffer memories 31, 41. A processor 32 supplied with a constant β from a constant generator 33 and an adder 34 process these original image data items a₁, a₂, ... a m , ... a M (stored in the line buffer memory 31) in exactly the same manner as the processor 12 and the adder 14 process the original image data item a₁, a₂, ... a n , ... a N in a horizontal row. The original image data a m stored in the line buffer memory 31 is converted to data a' m , which is: (1) a' m = a' m-1 + β when a m - a' m-1 > β. (2) a' m = a m when |a m - a' m-1 | ≦ β (3) a' m = a' m-1 - β when a m - a' m-1 < - β a' m-1 indicates converted data which is produced after the original image data a m-1 has been converted as described above. The original image data item a₁ where m = 1 remains as it is and is referred to as a converted data item a'₁. The original image data items a₁, a₂, ... a m , ... a M with respect to the vertical column of pixels, which are also stored in the line buffer memory 41, are processed by a processor 42 and an adder 44 in exactly the same manner as the original image data items a₁, a₂, ... a n , ... a N in a horizontal row are processed by the processor 22 and the adder 24. The original image data a m stored in the line buffer memory 41 is converted to data a" m , which is: (1) a" m = a" m+1 + β when a m - a" m-1 > β. (2) a" m = a m when |a m - a" m+1 | ≦ β. (3) a" m = a" m+1 - β when a m - a" m+1 < - β. a" m+1 indicates converted data which is produced after the original image data a m+1 has been converted as described above. The original image data item a M where m = M remains as it is and is referred to as a converted data item a" M . The converted data items a"₁, a"₂, ... a" M and a'₁, a'₂, ... a' M are sent to a mean processor 35 that is identical to the mean processor 15. The mean processor 35 determines the mean values of the converted data items with respect to the same pixels. For example, the converted data items a'₁ and a"₁ with respect to one pixel are processed to obtain their mean value B₁: B 1 = (a' 1 + a" 1 )/2 The mean values B₁, B₂, ... B M thus obtained are output from the mean processor 35 as smoothed data items of the original image data items a₁, a₂, ... a M and are temporarily stored in a frame memory 52 (step P10 in Figure 6). The processing cycle is repeated to store the smoothed data items B with respect to the pixels of all vertical columns of the image F. Thereafter, the smoothed data B and the smoothed data A, which bear the two-dimensional image, are read out of the frame memories 52, 51, respectively, into a mean processor 53 which then determines the mean values of the smoothed data items A, B for the respective pixels. More specifically, assuming that the smoothed data items in respect of one pixel are given as Ap, Bp (p represents a two-dimensional pixel position), Mean value Cp = (Ap + Bp)/2 The mean values C are determined with respect to all pixels of the image F, and are issued as final smoothed data items from the mean processor 53. The final smoothed data items are delivered to an image processing apparatus for image reproduction or subjected to image data compression. Since the smoothed data items C are obtained in a two-dimensional plane, they represent smoother data than the smoothed data items A obtained by the first method. The system shown in Figure 5 includes a processing section for smoothing data items with respect to horizontal rows of pixels and another processing section for smoothing data items with respect to vertical columns of pixels. However, the system may have only a single processing section which can be commonly employed for smoothing data items at different times with respect to both horizontal and vertical rows and columns of pixels. An image data smoothing method according to a third embodiment of the present invention will be described with reference to Figures 7 and 8. In the third method, smoothed data items A can be obtained in the same manner as they are obtained in the first or second method. Smoothed data items A which bear a two-dimensional image are temporarily stored in the frame memory 51 as shown in Figure 7, and thereafter are input to and stored in the line buffer memories 31, 41. In these line buffer memories 31, 41, the smoothed data items A are stored respectively as data items A₁, A₂, ... A m , ... A M with respect to respective pixels x(1, n), x(2, n), ... x(m, n), ... x(M, n) in a vertical column. The processor 32 and the adder 34 process the smoothed data items A₁, A₂, ... A m , ... A M in exactly the same manner as they process the original image data items a₁, a₂, ... a m , ... a M in the second method. Similarly, the processor 42 and the adder 44 process the smoothed data items A₁, A₂, ... A m , ... A M in exactly the same manner as they process the original image data items a₁, a₂, ... a m , ... a M in the second method. The smoothed data A m stored in the line buffer memory 31 is therefore converted to data A' m , which is: (1) A' m - A' m-1 + γ when A m - A' m-1 > γ. (2) A' m = A m when |A m - A' m-1 | ≦ γ. (3) A' m = A' m-1 - γ when A m - A' m-1 < - γ. Stated otherwise, the smoothed data item A m is converted to the median value of A m , (A' m-1 + γ), and (A' m-1 - γ). A' m-1 indicates converted data which is produced after the smoothed data A m-1 has been converted as described above. γ indicates a constant applied by the constant generator 33 to the processor 32. The average data item Am stored in the line buffer memory 41 is also converted to data A" m , which is: (1) A" m = A" m+1 + γ when A m - A" m-1 > γ. (2) A" m = A m when |A m - A" m+1 | ≦ γ. (3) A" m = A" m+1 - γ when A m - A" m+1 < - γ. Stated otherwise, the smoothed data item A m is converted to the median value of A m , (A" m+1 + γ), and (A" m+1 - γ). A" m+1 indicates converted data which is produced after the smoothed data A m+1 has been converted as described above. The converted data items A"₁, A"₂, ... A" M and A'₁, A'₂, ... A' M thus obtained are sent to the mean processor 35, which determines the mean values of the converted data items with respect to the same pixels. For example, the converted data items A'₁ and A"₁ with respect to one pixel are processed to obtain their mean value D₁: D 1 = (A' 1 + A" 1 )/2 The mean values D₁, D₂, ... D M thus obtained are output from the mean processor 35 as final smoothed data items of the original image data a. Since the smoothed data items D are obtained in a two-dimensional plane, like the final smoothed data items C produced by the second method, they represent smoother data than the smoothed data items A obtained by the first method. The system shown in Figure 7 may have only a single processing section which can be commonly employed for smoothing data items of pixels in a horizontal row (original image data a) and smoothing data items of pixels in a vertical column (smoothed data A) at different times. Although certain preferred embodiments have been shown and described, it should be understood that many changes and modifications may be made therein without departing from the scope of the appended claims.

Claims: A method of smoothing image data, comprising the steps of: i) providing original image data items a₁, a₂ ....., a N with respect to a certain series of pixels in a two-dimensional image, and a constant α > 0; ii) converting a n to a' n (a₁=a'₁;n=2,.....,N) which is the median value of, i.e. the second largest value among, a n , (a' n-1 +α), and (a' n-1 -α) for all n; iii) converting a n to a" n (a N =a" N ;n=N-1,.....,1) which is the median value of, i.e. the second largest value among, a n , (a" n+1 +α), and (a" n+1 -α) for all n; and iv) determining the mean value A n = a' n + a'' n 2 of the converted data items a' n and a" n with respect to the same pixel and employing the determined mean value A n as smooth data. A method of smoothing image data according to claim 1, characterized in that the image data items a₁,a₂,.....,a N represent a horizontal row of pixels and with the further steps of: v) providing original image data items a₁, a₂,....a M with respect to a vertical column of pixels which extends transversely to said horizontal row, and a constant β > 0; vi) converting a m to a' m (a₁=a'₁,m=2,....,M) which is the median value of, i.e. the second largest value among, a m ,(a' m-1 +β), and (a' m-1 -β) for all m; vii) converting a m to a" m (a M =a" M ,m=M-1,.....,1) which is the median value of, i.e. the second largest value among, a m , (a" m+1 +β), and (a" m+1 -β) for all m; viii) determining the mean value B m = a' m + a'' m 2 of the converted data items a' m and a" m with respect to the same pixel; and ix) determining the mean value C = A + B 2 of the mean values A, B with respect to the same pixel and employing the determined mean value as smooth data. A method of smoothing image data according to claim 1, characterized in that the original image data items a₁, a₂,....,a N represent a horizontal row of pixels and with the further steps; v) arranging determined mean values A₁, A₂,......,A M in a vertical column of pixels which extends transversely to said horizontal row, and a constant γ > 0; vi) converting A m to A' m (A₁=A'₁,m=2,...,M) which is the median value of, i.e. the second largest value among, A m , (A' m-1 +γ), and A' m-1 -γ) for all m; vii) Converting A m to A" m (A M =A" M ,m=M-1,.....,1) which is the median value of, i.e. the second largest value among, A m , (A" m+1 +γ), and (A" m+1 -γ) for all m; and viii) determining the mean value D m = A' m + A'' m 2 of the converted data items A' m and A" m with respect to the same pixel and employing the determining mean value as smooth data.

Inventors: TANAKA NOBUYUKI C O FUJI PHOTO, TANAKA, NOBUYUKI C/O FUJI PHOTO FILM CO., LTD
Applicants: FUJI PHOTO FILM CO LTD, FUJI PHOTO FILM CO., LTD.
Application year: 1987
Main classification: G06T15
IPC codes: H04N7, G06T5, G06T1