Abstract
This paper discusses the binarization restoration algorithms of ancient Chinese Rubbings image. According to the location of the image features, such as color, edge, stroke width and pixel location feature, the binary restoration algorithm of digital rubbings based on threshold segmentation and morphology is discussed. If the difference between the text and the background is larger and more obvious distinguish in images, Otsu threshold segmentation method can be directly used. For images with more background noise, shadows and uneven illumination, threshold segmentation cannot achieve effective segmentation and reasonable denoising, a set of algorithms associated with the pixel position of adaptive segmentation, morphological method, connected domain and mean filtering combined of binarization restoration are needed. The experimental results show that this algorithm is very effective for image with complex and large area noise.
Introduction
Ancient Chinese calligraphy inscription images have unique expression form with high degree artistic achievement and rich cultural connotation. Due to various reasons, a lot of inscriptions have the status such as dirty surface of paper, broken inscriptions, which make the writing diffuse, incomplete. It is difficult to achieve purpose by using the usual image segmentation method. With the help of image processing, pattern recognition and other technologies for binary processing, can make it more convenient to analysis and process the Chinese characters and calligraphy strokes etc. artistic elements, so that accurately identify these words from a variety of background. At the same time, it provides accurate and complete Chinese character model with high artistic and historical value, reproduce as much as possible the ancient rubbings cultural relics.
Image binarization is to propose what we are interested in from the background image [1], that is, image segmentation. Image segmentation is widely used, but up to now, no one segmentation method suitable for all images. Depending on the characteristics of the image, different division methods are required. Different images need using different segmentation methods according to their own characteristics [2]. At present, image segmentation methods mainly include threshold method, [3, 4], edge detection [5, 6], mathematical morphology [7], and so on. These classical image segmentation methods, such as simple threshold segmentation, cannot solve the problem of noise. Mathematical morphology is mainly used for expansion and corrosion; edge detection cannot get coherent strokes. These cannot adapt to the complex segmentation of rubbing images. With the development of technology, some new algorithms have begun to be applied to image segmentation. Such as fuzzy clustering [8, 9, 10], support vector machine [11], genetic algorithm [2], neural network [12, 13], etc. In order to obtain the ideal segmentation effect, it is usually necessary to comprehensively use multiple segmentation methods. Clustering and support vector machines are mostly suitable for multi-class classification, and neural network algorithm takes too long time. For Rubbings image segmentation algorithm, the threshold method is more suitable, but the simple threshold method cannot achieve good results, many researchers have done a lot of research on the synthesis algorithm based on the threshold method. On the basis of Otsu, [14, 15] respectively adopt iterative algorithm and enhanced target variance method to segment foreground and background, which have better effect on weak target recognition, but cannot solve the text part. In [16], a new adaptive region histogram correction technique is proposed, which can automatically enhance the contrast of the image [17, 18] have studied the binarization of document images with shadows and degradation, but [17] only aims at the regular document processing, and [18] only applies to the threshold method which can distinguish the foreground and background images, not to the multi-noise images in rubbing images [19, 20] proposed the binarization of the degraded document images. In [19] is based on the combination of Otsu and NiBlack document image binarization hybrid algorithm to binaries the degraded broken documents. In [20] uses the concept of boundary and edge detection method to locate the region of interested object, which is also not suitable for rubbing images. The image of ancient rubbing images in China has a unique font structure and high artistic value. In addition to the appropriate threshold selection, it also needs to remove its unique noise and reproduce its artistic value.
The remaining parts of this paper are arranged as follows: In Section 2, the first step of feature extraction about rubbing Image – gray scale, then threshold segmentation algorithm is researched. In Section 3, rubbing image binarization algorithm, our method is proposed, some of experimental results are shown. In Section 4, the results of experimental are analyzed and discussed. Conclusions are described in Section 5.
Threshold segmentation of rubbing image
Image pre-processing
Image binarization is a key step from image processing to reducing computation. Image pre-processing is the premise of digital image processing. Usually, many images need to be converted into grey images before binary processing. One pixel has three colours in colour image, and only one grey value needs to store. Grayscale processing of images is an important technology in computer vision. Accurate binarization not only reproduces the artistic value of the image, but also provides the basis for further processing (such as recognition), which is an important step in machine vision processing.
It extracts image information through computer technology; determines whether each image has a certain image characteristics. The result is that the points on the image are divided into different subsets, which often belong to isolated points, continuous curves or continuous regions. In order to binary colour image, usually, colour image is first converted to grey image. Histogram graphical display different pixel values on the frequency of occurrence of different brightness values, for the colour image can display three colours independently histogram, as shown in Fig. 1. By greying the colour image, the subsequent processing process can be accelerated; the conversion formula is shown in Eq. (1).
The results are rounded, for the grey image range is [0
Rubbing image and color histogram.
Grey-scale image and its histogram.
The advantage of threshold segmentation is that the calculation is simple and the operation efficiency is high. It has been widely used in the occasion of needing pay attention to the operational efficiency. Image threshold segmentation is one of the most common methods and is the most basic and widely used technique in image segmentation. It is particularly useful for target and background of image have different levels of grey scale.
Not only does it greatly reduce the amount of data, it also greatly simplifies subsequent analysis and processing. In many cases, it is also the necessary reprocessing process for image analysis, feature extraction and pattern recognition [21] etc. According to the characteristics of rubbing image, the threshold binarization algorithm is adopted in the initial binarization.
Iterative threshold segmentation
Iterative algorithm adopts the idea of approximation algorithm. Concrete steps are as follows:
Find the minimum grey value in the image
The image is divided into the target and background according to the threshold initial value
Get the new threshold If After step4,
Iterative threshold segmentation is an improvement on bimodal algorithm, which is easy to be optimized.
Otsu is proposed by the Japanese scholar Otsu. Its essence is the maximum inter-class variance algorithm based on grey image to find the global threshold. According to the particularity of the rubbings image [22], this paper adopts Otsu as initial binarization algorithm. And on this basis, the subsequent denoising and restore the image are carried out.
The grey level is set [0, …,
The average grey value of
The average grey value of
The mathematical expectations of two categories:
Threshold segmentation.
Otsu threshold segmentation.
So the variance
According to the standard of the maximum between-cluster variance, change
As an effective way, histogram is often used to find the binarization threshold of grey image. If a histogram in grey image is displayed as two peaks, the threshold of binarization is between the two peaks. Figure 3 shows the image of the threshold segmentation result, (a) the global binarization segmentation based on the midpoint of the two peaks in the grey scale as a threshold, (b) an iterative algorithm, and (c) using the Otsu algorithm. Figure 4 shows the image of the threshold segmentation of Otsu.
The difference between the text and the background is larger and more obvious distinguish tablet images, we can directly use the Otsu [23] for the difference between the text and the background is larger and more obvious distinguish tablet images. For the text and the background is not much difference, the image is more noisy, simple Otsu segmentation can’t meet the requirements, as shown in Fig. 5.
Otsu threshold segmentation method.
Algorithm flow chart.
From Fig. 5, a lot of noise with illegible handwriting can be seen after binarization in the image, which caused great distress for us on protection, learning, researching the rubbing image. Because of the particularity of the rubbing image, usually there is much noise in the image after Otsu segmentation, and the text itself still have a lot of loopholes. The research on binarization restoration of digital inscriptions image is mainly focused on noise elimination, such as eliminating noise in image, smoothing the inscription image, and eliminating the “hole” in the text. Mean filter is the best linear filter using the mean square error criterion. It eliminates the image noise and blurs the edge of the target, weakening the details of the text, which is not conducive to the accurately extract the text. Choosing different nonlinear filters (morphological [24], median filtering), can remove the salt and pepper noise of document image. However, when large structural elements are used, morphological operations may damage the integrity of the edge of the text and graphics components, can also lead to edge degradation. Adaptive median filter can preserve the edge features but requires a long time [25]. After removing the noise, we need to extract the feature information of the image, and then take the appropriate method to binary the original image, the next problem is how to remove the noise while maintain the edge of the image.
In order to not only maintain the edge of the image characteristics, but also to eliminate background noise, remove the text inside the hole. After repeated experiments, mathematical morphology open operation (first corrosion denoising, re-expansion of the hole) is used for the initial filtering. Selecting the appropriate structural element can preserve the edge of the image, but there is a lot of noise after filtering. That is shown as in Figs 8 and 9. If the background noise is needed to remove more completely, we need to increase the structural element; this will destroy the image edge. In Figs 8 and 9, whether 3
Morphology is composed by algebraic operators, its basic operations have expansion (or expansion), corrosion (or erosion) expansion after corrosion is the open operation; corrosion after expansion is closure operation. Opening operations generally smooth out the contours of the image, weakening the narrowed portion, and removing fine protrusions. Closed operation is also smooth the outline of the image, in contrast to the open operation, it generally fuses the narrow gap to remove the hole and fills the gap on the contour.
Corrosion
Corrosion is the most basic operation of morphology. Its operation is realized based on the meaning of filling structure unit. The process of using structure unit padding depends on a basic Euclidean space operation-shift [26]. The translational distance
From a geometric point of view,
Equation (11) is a geometric sense of the definition of corrosion operations, there is a more important form of expression is defined from the arithmetic point of view.
As can be seen from Eq. (12), corrosion can be obtained by translating the input image by
Expansion is the dual operation of corrosion, which can be defined by the erosion of the complement.
Where
The equivalent of expansion is defined as:
Taking into account the need to retain the text of the stroke information, the algorithm uses morphological open operation, which can not only remove a lot of noise, while preserving image edges. It is prepared for the next connected domain filtering.
By labelling the connected area of white pixels (objects) in a binary image, each individual connected area is identified as a block, and we can further obtain the block outline, rectangles, centroid, invariants And other geometric parameters. The filtering step of the connected region is as follows:
Calculate the area of the image connected domain. Calculate the number of image connected domains. Find the filter threshold The filtered image is filtered with a mean of 5 Output image.
Segmentation effect of various algorithms.
Experimental results.
Experimental results.
Test is used Lenovo T460 notebook, CPU for Intel Core i5 6200U, 4G running memory, the algorithm runs on matlab2016a. Many new algorithms have appeared in recent years, but they are not well suitable for our rubbing images segmentation. Figure 7 shows several algorithms, including Otsu, median filtering, mean filtering and genetic algorithm. As can be seen, the segmentation effect is not ideal, there are many noises. Figure 8 from left to right, Fig. 9 from top to bottom, are the original colour image, threshold segmentation method of binary initial map, median filter, mean filter, morphological filtering and my method. From the figure we can see that this method is significantly better than other methods. Since there is no standard graphics library to verify the accuracy of segmentation, here we can see that the method used in this paper for complex images, segmentation effect is very good; almost all the noise is removed, and the edge of the text is retained.
Conclusions
Based on the threshold segmentation and the combination of the connected domain and the morphology, this paper segments rubbing image with a lot of serious noise, not only it removed much of background noise, but also fill in the small hole in the stroke, While preserving the edge of the image, and the original image is restored as much as possible. A set of algorithms associated with the pixel position of adaptive segmentation, morphological method, connected domain and mean filtering combined of binarization restoration are needed. The experimental results show that this algorithm is very effective for image with complex and large area noise.
Footnotes
Acknowledgments
The authors are thankful to the science and technology project of Jiangxi Provincial Education Department in 2016 (2016 GJJ16110) for providing the necessary funds for this work.
