Improvement of binarization performance using local otsu thresholding

ABSTRACT


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 [1][2][3]. 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 (noise removal). Many degraded documents had to be enhanced by using denoising and binarization process thus make the manuscript easier to segment [4]. 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 [5]. 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 [6], Niblack [7], Nick [8], Sauvola [9] and some latest techniques such as Nina [10], Lu [11] and Su [12]. In earlier research, Otsu method was benchmark methods for binarizing document by determining global thresholding. All of the methods were tested on DIBCO databases. 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 [13][14][15][16]. 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 [13]. 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 [10]. 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.

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.

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 [17]. In this technique, we used Wiener filter [18] 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. In this experiment, we used 47x47 window size. The area of foreground (text) 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: is the new image after background estimation performed and refers to the acquisition image while 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 [19]. 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: where ωi represent pixels in the class and µi 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 267 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 document.
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 precision.

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.

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 and 79.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. 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 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   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 has 98.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 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.4%. 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   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.14%. 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 recall. 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 6 shows the result of binarizing documents which contained extremely noise due to water spilling. 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 has 61.54% of precision and 58.93% of recall, while Sauvola in third place with 44.9% of precision and 39.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. Generally, the proposed method has better performance of segmented Jawi character from a noisy background. 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.

CONCLUSION
This paper presented an improvement of binarization technique for binarizing degraded Jawi ancient document. 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 techniques. 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.