- Research Article
- Open Access

# An Interactive Procedure to Preserve the Desired Edges during the Image Processing of Noise Reduction

- Chih-Yu Hsu
^{1}Email author, - Hsuan-Yu Huang
^{2}and - Lin-Tsang Lee
^{2}

**2010**:923748

https://doi.org/10.1155/2010/923748

© Chih-Yu Hsu et al. 2010

**Received:**1 December 2009**Accepted:**30 March 2010**Published:**4 May 2010

## Abstract

The paper propose a new procedure including four stages in order to preserve the desired edges during the image processing of noise reduction. A denoised image can be obtained from a noisy image at the first stage of the procedure. At the second stage, an edge map can be obtained by the Canny edge detector to find the edges of the object contours. Manual modification of an edge map at the third stage is optional to capture all the desired edges of the object contours. At the final stage, a new method called Edge Preserved Inhomogeneous Diffusion Equation (EPIDE) is used to smooth the noisy images or the previously denoised image at the first stage for achieving the edge preservation. The Optical Character Recognition (OCR) results in the experiments show that the proposed procedure has the best recognition result because of the capability of edge preservation.

## Keywords

- Optical Character Recognition
- Denoised Image
- Chinese Word
- Denoising Method
- Canny Edge Detector

## 1. Introduction

Digital images are noisy due to environmental disturbances. To ensure image quality, image processing of noise reduction is a very important step before analysis or using images. Optical Character Recognition (OCR) system is an example that is very sensitive to noise. The quality of documents influences the results of recognition. Image noise decreases the accuracy of the recognition of documentations by OCR (optical character recognition) software because of blurred edges. Great damage will be caused in defense and security applications when OCR software is used for the scanning and recognition of documents such as passports and ID cards in busy airports where speed and accuracy are critical for processing thousands of documents daily. The most important image processing technique for noise reduction is the image denoising method. The purpose of image denoising method is to increase signal-to-noise ratio (SNR) in an image. However noise reduction always induces blurred edges by an image denoising process. Development for edge-preserved image denoising method is necessary for OCR software. The paper is to develop a denoising procedure with the edge preservation capability. The OCR system is a research field in pattern recognition [1, 2] and is used to convert papers, books, and documents into electronic files [3]. Researchers developed several methods in order to remove these image noise including Gaussian noise, salt and pepper noise [4]. There are some image filters, which are used for image denoising [5, 6] and the Gaussian filter is a well-known one [7]. In the period between 1984 and 1987, Koenderink and Hummel showed how Gaussian filters removed noise that was equal to dispersion effects of the isotropic diffusion equation, so Gaussian filters are called Diffusion Filters.

Isotropic diffusion equations can reduce noise but blur the contours of images. In order to improve on this drawback, Perona and Malik improved the diffusion coefficient of isotropic diffusion filters to produce anisotropic diffusion filters (ADFs) with a function of image gradients in the 1990 [8]. The coefficients of isotropic diffusion equations are constants, but the diffusion coefficients of anisotropic diffusion equation decrease as image gradients increase. Anisotropic diffusion equations are more effective in edge preservation. Because the gradients of noises are larger, then the coefficients of anisotropic diffusion filters are smaller. This solution cannot solve the problem very well. Researches [9, 10] are continuously focusing on improving the diffusion coefficients. However, these methods may remove image noise, but edges cannot be preserved.

In this paper, we propose a new procedure including four stages. At the first stage of the procedure, any kind of denoising algorithm can be applied on an original noisy image to get a well-denoised image. At the second stage, an edge map can be obtained to find the edges of the object contours by the Canny edge detector applied on the previously denoised image at the first stage. Since the contour edges are not found completely, then the users maybe need interactively modify the edge map to keep the edges of the desired object contours. At the third stage, manually modify the edges of edge map to match the desired edges. At the final stage, a new method Edge Preserved Inhomogeneous Diffusion Equation is used to smooth the original noisy image or the previously denoised image at the first stage and achieve preserving desired edge. The proposed procedure has the edge preservation capability that makes OCR results the best in this experiment.

## 2. Mathematic Formulation

Section 2.1 introduces the digital image as a matrix, and one row can be considered as a signal. Section 2.2 introduces how to find the solutions of a one-dimensional inhomogeneous diffusion equation by using Fourier series. Section 2.3 proposed a flow chart of the EPIDE denoising method.

### 2.1. Digital Images and Signals

#### 2.1.1. One-Dimensional Signals

The letter is the left-location value of the Box Function and is value of the right location of the Box Function. The letter denotes the total number of Box functions and the symbol are coefficient constants.

#### 2.1.2. Fourier Series of Box Function

where the coefficients are represented by and equations.

### 2.2. One-Dimensional Inhomogeneous Diffusion Equation

We want to solve the problem of finding the intensity of every row in an image. At both sides of the interval , the intensity values are set to be zero. By adding the inhomogeneous terms into the diffusion equation with the derivative of Delta functions, the proposed denoising method is called the Edge Preserved Inhomogeneous Diffusion Equation (EPIDE) method.

#### 2.2.1. Diffusion Equation Formulation

where the variables are spatial coordinates and is time, but the temperature now is replaced by the intensity in an image that is function of the position and time , and is a constant called the "thermal diffusivity" of the material. The function is an inhomogeneous term that will be explained in (7).

The function is a Dipole distribution and is derivative of the Delta (or impulse) function .

where step function can be approximated by , and , .

where , , and are constants.

Equation (10) is an inhomogeneous diffusion equation used to preserve the edges. In (4), (7), and (10), the locations of edges and can be decided by the location of edge pixels in the signal that is one row in an image. Since in the edge locations it is not easy to obtain a noisy image, some images preprocessing techniques and Canny Edge detection method [15] are used to find the edge map of the object contours. The locations and are decided by the edge map. Modifying the edge map, the user can decide to keep the contours for their requirements.

#### 2.2.2. Fourier Series Solutions

Then solution is obtained by substituting this formula for into (13).

### 2.3. Proposed Procedure

The goal of the proposed procedure with four stages is to preserve the desired edges during the image processing of noise reduction, so EPIDE method plays an important role. However, the edges of object contours in an image should be extracted previously for EPIDE method. Canny edge detector can automatically find some edges in images. Since the contour edges are not all found, then the users want to interactively modify the edges capture all desired object contours.

Figure 5 shows the flow chart of the three stages. At the first stage, any kind of denoising algorithm can be applied on a noisy image (N) to get a previously denoised image (P). At the second stage, an edge map (E) can be obtained to find the edges of the object contours by the Canny edge detector applied on the previously denoised image at the first stage. At the third stage, modified edge map (I) captures all the desired edges manually. The flow chart to get a denoised image at the final stage with EPIDE method is shown in Figure 6.

At the final stage, the EPIDE method is used to smooth the noisy image (N) or the previously denoised image (P) with the modified edge map (I). Both in -direction and -direction, two images and are generated by the EPIDE method. Finally a denoised image (D) can be obtained by an average combination of the image and .

## 3. Experimental Results

There are four test images "Nine Square Regions", "Number and Character", "Chinese Words", and "BarCode" corrupted by Gaussian noise with zero mean.

### 3.1. The Peak Signal-to-Noise Ratio (PSNR)

The functions and are original and denoised image, respectively. The numbers and are the size of an image.

### 3.2. Results and Discussions

Section 3.2.1 shows the denoised results of noise reduction test. Section 3.2.2 compares the denoised results of the proposed procedure with those of wavelet and ADF denoising methods. Section 3.2.3 describes the third stage in the proposed procedure. Section 3.2.4 shows the OCR application by the proposed procedure.

#### 3.2.1. Noise Reduction Test

The test image "Nine Square Regions" is a synthetic image shown in Figure 7(a). Figure 7(b) is the test image corrupted by adding Gaussian noise with variance 0.01. Figure 7(d) is the test image corrupted by adding salt and pepper noise with the density 0.05. Figure 7(f) is the test image corrupted by adding Poisson noise. Figures 7(c), 7(e), and 7(g) are images denoised by proposed procedure to preserve edges.

#### 3.2.2. Comparison with Algorithms

RMSE and PSNR (dB) values of the denoised images by EPIDE, Wavelet, and ADF methods. There are four test images "Nine Square Regions", "Number and Character", "Chinese Words", and "BarCode".

Image | Nine Square Regions | Number and Character | Chinese Words | BarCode | ||||
---|---|---|---|---|---|---|---|---|

RMSE | PSNR | RMSE | PSNR | RMSE | PSNR | RMSE | PSNR | |

Noise Image | 21.809 | 21.358 | 23.885 | 20.568 | 40.206 | 16.045 | 18.197 | 22.931 |

EPIDE | 9.5896 | 28.495 | 19.133 | 22.495 | 23.340 | 20.769 | 10.127 | 28.021 |

Wavelet | 13.549 | 25.493 | 20.379 | 21.947 | 38.319 | 16.453 | 32.994 | 17.762 |

ADF | 16.397 | 23.835 | 19.602 | 22.285 | 35.022 | 17.244 | 36.27 | 16.940 |

#### 3.2.3. Interactively Modified Edge Map

RMSE and PSNR (dB) values of denoised images B, D, H and I.

B | D | H | I | |
---|---|---|---|---|

RMSE | 6.3711 | 3.7040 | 3.6321 | 3.1651 |

PSNR | 32.049 | 36.757 | 36.928 | 38.123 |

#### 3.2.4. The Proposed Procedure Applications

The results of the above experiments demonstrate the effective of our proposed denoising procedure. In next section, theoretical explanations are described to show why the proposed denoising procedure works well for any kind of noise.

#### 3.2.5. The Denoising Capability of the Diffusion Equation

## 4. Conclusion

The contribution of the paper is to propose a procedure to smooth the noisy or denoised image with any kind of denoising algorithm for desired edge preservation. To achieve preservation of designed edges, the inhomogeneous terms of the diffusion equation are formulated by the derivative of the Delta function. Fourier series is used to obtain the exact solution of the diffusion equation. The exact solution is a function of time and its value is the intensity of each pixel in an image. The Delta functions in the diffusion equation are used to locate the positions of edge pixels for each object in the image. To locate contour pixels for each object, it is necessary to use some image preprocessing methods and an edge detection method to find the edges of the object contours. Since the contour edges are not all found, then the user can interactively modify the edge map to keep the desired object contours. The proposed denoising method with edge preservation capability has the best OCR result in the experiment compared to the results from the wavelet denoising method and anisotropic diffusion filters.

## Declarations

### Acknowledgment

The authors thank National Science Council (NSC) for partial financial support (NSC 97-2115-M-324-001) and (NSC 98-2115-M-324-001).

## Authors’ Affiliations

## References

- Weideman WE, Manry MT, Yau HC: A comparison of nearest neighbor classifier and a neural network for numeric handprint character recognition.
*Proceedings of the IEEE International Conference on Neural Networks, 1989, Washington, DC, USA*Google Scholar - Tappert CC: Recognition System for Run-on Handwritten Characters. US patent no. 4731857, International Business Machines Corporation, Armonk, NY, USA, March 1988Google Scholar
- Hahn S-H, Lee J-H, Kim J-H: A study on utilizing OCR technology in building text database.
*Proceedings of the 10th International Workshop on Database and Expert Systems Applications, 1999*582-586.Google Scholar - Gonzalez RC, Woods RE:
*Digital Image Processing*. Prentice-Hall, Upper Saddle River, NJ, USA; 2002.Google Scholar - Welk M, Weickert J: Semidiscrete and discrete well-posedness of shock filtering. In
*Mathematical Morphology*. Springer, Berlin, Germany; 2005.Google Scholar - Guillon S, Baylou P, Najim M, Keskes N: Adaptive nonlinear filters for 2D and 3D image enhancement.
*Signal Processing*1998, 67(3):237-254. 10.1016/S0165-1684(98)00042-5View ArticleMATHGoogle Scholar - Yuan YB, Vorburger TV, Song JF II, Renegar TB: A simplified realization for the Gaussian filter in surface metrology. In
*Proceedings of the 10th International Colloquium on Surfaces, January-February 2000, Chemnitz, Germany*. Edited by: Dietzsch M, Trumpold H. Shaker; 133.Google Scholar - Perona P, Malik J: Scale-space and edge detection using anisotropic diffusion.
*IEEE Transactions on Pattern Analysis and Machine Intelligence*1990, 12(7):629-639. 10.1109/34.56205View ArticleGoogle Scholar - Weeratunga SK, Kamath C: A comparison of PDEbased non-linear anisotropic diffusion techniques for image denoising.
*Image Processing: Algorithms and Systems II, January 2003, Santa Clara, Calif, USA, Proceedings of SPIE*Google Scholar - Gerig G, Kubler O, Kikinis R, Jolesz FA: Nonlinear anisotropic filtering of MRI data.
*IEEE Transactions on Medical Imaging*1992, 11(2):221-232. 10.1109/42.141646View ArticleGoogle Scholar - Kanwal RP:
*Generalized Functions: Theory and Applications*. 3rd edition. Birkhäuser, Boston, Mass, USA; 2004.View ArticleMATHGoogle Scholar - Folland GB:
*Fourier Analysis and Its Applications*. Brooks/Cole, Pacific Grove, Calif, USA; 1992.MATHGoogle Scholar - Sen M:
*Analytical Heat Transfer*. Department of Aerospace and Mechanical, Engineering University of Notre Dame, Notre Dame, Ind, USA; 2008.Google Scholar - Bracewell R:
*The Fourier Transform and Its Applications*. 2nd edition. McGraw-Hill, New York, NY, USA; 1986.MATHGoogle Scholar - Canny J: A computational approach to edge detection.
*IEEE Transactions on Pattern Analysis and Machine Intelligence*1986, 8(6):679-698.View ArticleGoogle Scholar - http://home.megapass.co.kr/~woosjung/Product_JOCR.html

## Copyright

This article is published under license to BioMed Central Ltd. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.