International Journal of Electrical and Computer Engineering (IJECE) Vol. No. February 2019, pp. ISSN: 2088-8708. DOI: 10. 11591/ijece. Improvement of binarization performance using local otsu thresholding Khairun Saddami1. Khairul Munadi2. Yuwaldi Away3. Fitri Arnia4 1Postgraduate Program in Engineering. Syiah Kuala University. Indonesia 2,3,4Department of Electrical and Computer Engineering. Syiah Kuala University. Indonesia Article Info ABSTRACT Article history: Ancients document usually contains multiple noises such as unevenbackground, show-through, water-spilling, spots, and blur text. The noise will affect the binarization process. Binarization is an extremely important process in image processing, especially for character recognition. This paper presents an improvement to Nina binarization technique. Improvements were achieved by reducing processing steps and replacing median filtering by Wiener filtering. First, the document background was approximated by using a Wiener filter, and then image subtraction was applied. Furthermore, the manuscript contrast was adjusted by mapping intensity of image value using the intensity transformation method. Next, the local Otsu thresholding was For removing spotting noise, we applied labelled connected The proposed method had been testing on H-DIBCO 2014 and degraded Jawi handwritten ancient documents. It performed better regarding recall and precision values, as compared to Otsu. Niblack. Sauvola. Lu. Su, and Nina, especially in the documents with show-through, water-spilling and combination noises. Received Jun 9, 2018 Revised Sep 1, 2018 Accepted Sep 16, 2018 Keywords: Ancient document binarization Handwritten Jawi document Improved binarization method Local otsu thresholding Copyright A 2019 Institute of Advanced Engineering and Science. All rights reserved. Corresponding Author: Fitri Arnia. Department of Electrical and Computer Engineering. Faculty of Engineering. Syiah Kuala University. Jl. Syech Abdurrauf No. Banda Aceh. Indonesia. Email: f. arnia@unsyiah. INTRODUCTION The consequence of interaction among nations centuries ago leaving various types of heritage, one of those is ancient documents. This document contains information on history, science, war tactics and stories of inspiration. South East Asia is a region which had many types of heritages such as the ancient document, which was written in the Malay language by using Jawi alphabets. Jawi characters are a variance of the Arabic alphabet that has six additional characters to cover the sound of the Malay language. Jawi alphabets had been used for centuries in South East Asia. Jawi ancient documents are saved in some countries like Indonesia. Malaysia. Germany. The Netherlands, and USA . Some of the ancient documents were saved in digital image format. To preserve information and knowledge in Jawi ancient document, an application that can recognize text in image format is required. The application that transforms the image into a digital text is called Optical Character Recognition (OCR). In building OCR, several steps such as pre-processing, segmentation, feature extraction and pattern recognition are required. The pre-processing procedure is important because it will establish the OCR become more accurate. Some of the pre-processing steps that play the important role in OCR application are binarization and denoising . oise remova. Many degraded documents had to be enhanced by using denoising and binarization process thus make the manuscript easier to segment . Journal homepage: http://iaescore. com/journals/index. php/IJECE Int J Elec & Comp Eng ISSN: 2088-8708 Generally, there are two types of digital document: noisy and noiseless document and binarizing a noisy document is more challenging than that noiseless ones. In ancient documents, the noise not only caused by the digitalization process but also due to the age of the documents. Examples of noise that contained in an ancient document are uneven-background, blurring-text, text-fading or the combination of them . Others caused by water spilling, spot, fox, text-fading, and show-through. Previously, several methods had been developed to transform an ancient document image into a binary image. Some of the techniques are Otsu . Niblack . Nick . Sauvola . and some latest techniques such as Nina . Lu . and Su . In earlier research. Otsu method was benchmark methods for binarizing document by determining global thresholding. All of the methods were tested on DIBCO However. DIBCO has less noise in the document than Jawi ancient document. So that, these techniques had to be retested in ancient Jawi manuscript that contains miscellaneous noise. The noise came from the variety condition. Several researchers tested the method for Jawi ancient document . The result of this testing informed the existing method did not perform well for Jawi ancient document. To improve denoising method. DCT was applied ahead existing techniques . In this paper. DCT has collaborated with Otsu. Niblack. Nick, and Sauvola binarization technique. The result showed the DCT makes the method perform better than without applying the DCT. This paper proposes an improvement technique of Nina binarization . Nina introduced six steps of document binarization technique which shown in Figure 1. Nina proposed median filtering for background estimation, contrast compensation, bilateral filtering, recursive Otsu and despeckling. Therefore, this paper suggests a modification Nina binarization method by replacing median filtering with Wiener filtering for background estimation, improving contrast variation with mapping high saturation method and displaced recursive Otsu by local Otsu. Furthermore, bilateral filtering step and despeckling algorithm are removed. Figure 1. Nina binarization method THE PROPOSED METHOD In this section, we describe the proposed method of document binarization. Figure 2 shows the proposed technique procedure for ancient manuscript binarization. Overviewed the proposed method as shown in Figure 3. Figure 2. The proposed method Improvement of binarization performance using local otsu thresholding (Khairun Saddam. A ISSN: 2088-8708 Figure 3. Overviewed the proposed method Background approximation and subtraction The first step of binarization in cleaning degraded ancient document is to approximate the background of the document. Background approximation step was introduced by Hutchison . In this technique, we used Wiener filter . to estimate the background. The main idea of Wiener filtering for approximate the image background is to remove the entire noise or others component that showed in a nontext area. The size of a window of Wiener filtering will affect the background approximation performance. this experiment, we used 47x47 window size. The area of foreground . was determined by bold region. Removing the background was performed by subtracting the approximating background from the image. The result of estimated background image was given by: yaycu = ya Oe yayayaA yaycu is the new image after background estimation performed and ya refers to the acquisition image while yayayaA is the background approximation image by using Wiener filter. Contrast adjustment After we get the result of the background estimation procedure, the input image was enhanced the image contrast by mapping the intensity of grayscale image value to new image value by using intensity transformation method . Image contrast was adjusted to increase the difference between text and noise. This difference will raise the threshold performance efficiently. Figure 3c showed image contrast adjustment processing and the result gets an image in high contrast. Local otsu thresholding The next stage in this technique is local Otsu thresholding. Once we get the result of the contrast adjustment we use the local Otsu thresholding. This thresholding is local thresholding of Otsu binarization. We set the window of block processing manually but we use this window use for each image. Before performing local Otsu thresholding, we applied Wiener filtering for removing the noise. The main idea of local Otsu thresholding is to process the image by applying Otsu technique on a local window. In this case. Otsu method will get different threshold on each window size, it depends on image condition. Otsu technique has proven as an effective algorithm in binarizing a document. Otsu method was described as: E2 yaA . cN) = O1 . cN)O2 . cN)[AA1 . cN)OeAA2 . cN)]2 . where Oi represent pixels in the class and AAi represent mean of the class. Spotting removal Spotting removal is a process to remove unnecessary spot noise from the binary image. In the proposed method, spotting removal is to remove the unnecessary small shape that occurred in the image. This procedure concept is all object less than 50 pixels will remove from the image. Figure 3e shows the result of Int J Elec & Comp Eng. Vol. No. February 2019 : 264 - 272 Int J Elec & Comp Eng ISSN: 2088-8708 noise removal. The deficiency of this performance might be the dot from a character will be removed from the image, but it will remove the image noise effectively without using any filtering. RESEARCH METHOD The proposed binarization technique was tested on H-DIBCO database and five types of degraded ancient Jawi document. The noisy document content five kinds of degraded Jawi document: spot, showthrough, text-fading, water spilling, and the combination of noise. Figure 4 shows noises on Jawi ancient . Figure 4. Examples of the noise in Jawi ancient document . text-fading noise. show-through noise. spot noise. water spilling noise. the combination of nois. This binarization technique was evaluated by using recall and precision methods . ycyceycaycaycoyco = yaya yayaAya Recall is a number of characters correctly detected per total number of characters detected and precision is the number of characters correctly detected per total number of characters in a document. CD is total numbers of character in a document that recognized correctly. GT is the total number of ground-truth in the document. CBC is the total number of detected including correctly and broken character. This method used to evaluate how good the technique extracted the ground truth from a noisy image. The result represented by six parameters: Ground truth character (GT), correct detected character (CD), broken character (BR), missing character (M), precision and recall. F-measure is the harmonic mean of recall and RESULTS AND ANALYSIS In this section, we presented and discussed the result of research. The result is seperated into two sub section: HDIBCO 2014 dataset and ancient Jawi dataset. Improvement of binarization performance using local otsu thresholding (Khairun Saddam. A ISSN: 2088-8708 HDIBCO 2014 dataset The proposed method was tested on H-DIBCO 2014 database and compared it to Otsu. Niblack. Sauvola. Lu. Su and Nina binarization technique. The results are shown in Table 1. The recall and precision value is the average value of recognition rate. The proposed method had recognition rate 76. 60% of recall 52% of precision. In second placed. Otsu method had accuracy 66. 54% of precision and recall. Otherwise. Niblack is the lowest recognition rate with accuracy is 0% of recall and precision. Figure 5 showed binarization result on H-DIBCO 2014 database. Table 1. Result of H-DIBCO 2014 (Average Resul. Methods OTSU NIBLACK SAUVOLA NINA PROPOSED Precision Recall The result showed the proposed method had the highest recognition rate. Otsu method is in second place of accuracy. On the database, local binarization such as Niblack and Sauvola had a worse result. Most of the broken characters result caused by reducing shape that performed by binarization technique such as Lu and Su. Figure 5 shows examples of the result H-DIBCO 2014 binarization by using Otsu. Niblack. Sauvola. Lu. Su. Nina and the proposed method. Figure 5. The result of H-DIBCO binarization performance: . original image. Otsu method. Niblack . Sauvola method. Lu method. Su method. Nina method. the proposed method Ancient jawi dataset Figure 6 provides a comparison of the image that binarized by using Otsu. Niblack. Sauvola. Lu. Su. Nina and the proposed techniques. The result of the experiment method shows in Table 2 to Table 6 Table 2 shows the result of binarizing documents which contained combination noise. The result shows that the proposed method has the best result of recall and precision. The proposed technique has 98. 4% of precision Int J Elec & Comp Eng. Vol. No. February 2019 : 264 - 272 Int J Elec & Comp Eng ISSN: 2088-8708 and recall. Sauvola technique is in the second place that has 97. 58% of precision and recall, while Su in third place with 97. 17% of precision and recall. The lowest accuracy of precision and recall is in Niblack Niblack has 33. 1% of precision and recall. Table 2. Result of Combination Noise Binarization Methods OTSU NIBLACK SAUVOLA NINA PROPOSED Precision Recall Figure 6. Examples of binarized Jawi ancient document . op: from left to right . riginal image, otsu, niblack, and sauvola technique. , bottom: from left to right . u, su, nina, and proposed technique. ) Table 3 informs the result of binarizing documents which contained show-through noise. The result indicates that the proposed technique has the highest result of recall and precision. The proposed technique 34% of precision and recall. Sauvola technique was in the second place that has 95. 04% of precision and recall, while Su was in third place with 91. 73% of precision and recall. The lowest accuracy of precision and recall has in Niblack technique. Niblack has 1. 41% of precision and 8. 12% of recall. Table 3. Result of Show-through Noise Binarization Methods OTSU NIBLACK SAUVOLA NINA PROPOSED Precision Recall Table 4 provides the result of binarizing documents which contained spot noise. The result refers that the proposed method has the highest result of recall with accuracy 92. The highest result of precision was in the ancient documents that binarized by using Su technique. It has 93. 24% of accuracy while the proposed technique has 92. 4 % of accuracy. The result informs, although Su technique has better performance in the precision result. Su technique is worse in the recall. By using Su method, the binarizing document of spot noise has miss three characters, but the proposed method can recognize all of the Improvement of binarization performance using local otsu thresholding (Khairun Saddam. A ISSN: 2088-8708 The lowest accuracy of precision and recall has in Niblack technique. Niblack has 8. 54% of precision and 7. 6% of recall. Table 4. Result of Spot Noise Binarization Methods OTSU NIBLACK SAUVOLA NINA PROPOSED Precision Recall Table 5 provides the result of the binarizing manuscript which contained text-fading noise. The result shows that the proposed technique has the highest result of recall with accuracy of 44. The highest result of precision was in the document that binarized by using Nina technique which 59. 26% of accuracy, while the proposed method has 48. 52% of accuracy. The result informs, although Nina technique has better performance in the precision result. Nina technique is worse than the proposed method in the By using Nina method, the binarizing manuscript of text-fading noise image has missed 60 characters while the proposed method only missed 20 characters. The lowest accuracy of precision and recall are in Niblack technique. Niblack has 5. 2% of precision and 3. 6% of recall. Table 5. Result of Text-fading Noise Binarization Methods OTSU NIBLACK SAUVOLA NINA PROPOSED Precision Recall Table 6 shows the result of binarizing documents which contained extremely noise due to water The result indicates that the proposed method has the highest result of recall and precision. The proposed technique has 61. 9% of precision and 60. 71% of recall. Nina technique was in the second place that 54% of precision and 58. 93% of recall, while Sauvola in third place with 44. 9% of precision and 28% in recall. The lowest accuracy of precision and recall has in Otsu technique. Otsu has 7. 14% of precision and 1. 78% of recall. Table 6. Result of Water Spilling Noise Binarization Methods OTSU NIBLACK SAUVOLA NINA PROPOSED Precision Recall Generally, the proposed method has better performance of segmented Jawi character from a noisy Comparing to Otsu. Niblack. Sauvola. Lu. Su, and Nina methods, the proposed technique is the highest for recall and precision the character from the document, except in documents with spot and textfading noises. However. Su missed more characters in spot noise and Nina in text-fading noise comparing to the proposed method. Lu and Su were performed well in denoising character document but performed worse for bold character or too thin character because Lu and Su techniques reduce shape of the characters. Int J Elec & Comp Eng. Vol. No. February 2019 : 264 - 272 Int J Elec & Comp Eng ISSN: 2088-8708 CONCLUSION This paper presented an improvement of binarization technique for binarizing degraded Jawi ancient This technique combined Wiener filtering for background estimation, image contrast adjustment, and local Otsu thresholding to extract the text from the background and spot noise removal. Five noise types were tested in the experiments: spot, text-fading, show-through, water spilling and the combination of noises. Meanwhile, this technique also tested on H-DIBCO 2014 database. The proposed technique was compared to Otsu. Niblack. Sauvola. Lu. Su and Nina binarization The result showed that the proposed technique got the highest value of recall and precision, especially in documents with show-through, water-spilling and combination noises. Furthermore, the proposed method also had the highest recall in spot and text-fading noises. ACKNOWLEDGEMENTS This research is funded by Ministry of Research. Technology, and Higher Education, the Republic of Indonesia, under Pendidikan Magister Menuju Doktor untuk Sarjana Unggul (PMDSU) scheme. REFERENCES