ENHANCING AND DETECTING THE DIGITAL TEXT BASED IMAGES USING SOBEL AND LAPLACIAN PL.Chithra 1, B.Ilakkiya Arasi 2 1 Department of Computer Science, University of Madras, Chennai, India. 2 Department of Computer Science, University of Madras, Chennai, India. ABSTRACT: This paper focuses on enhancing and detecting a text in digital images. Since digital images have some shimmer and shades. Therefore it has some complex background to detect a text. This paper produces a solution to enhance a text by removing noise using filters and improves the sharpness by gradients using Sobel and Laplacian method. This method provides better results by improving blurred and shimmer based digital text images as well as it is applicable for normal text images. Normally, Text detection and recognition are usually done in handwriting images, and historical documents with various languages like Tamil, English, Telugu, and Hindi. Similarly for numbers is also applicable. Recent days all the process is moving to digital process like swiping, ATM, mobile, and LED boards in railway stations and buses. Since it is necessary to enhance and detect texts in digital images. To achieve this better result, this paper generates a combination of gradients using Sobel and Laplacian. Keywords: Enhancement, Shimmers, Sobel and Laplacian filters, and Digital text Images. [1] INTRODUCTION The text data presented in images contains very useful information s. Extracting these kinds of information s by enhancing and detecting a text in given image. Text contained in images can have different styles, colors, intensity, fonts and languages. Therefore it is complex detect a text s in digital images. OCR (Optical Character Recognition) is the mechanical convention of images such as typed, printed and handwritten texts. OCR is widely applicable for passport documents, bank statements, and computerized receipts. Early day s OCR may be Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 1
traced to entail telegraphy and creating reading devices for blinds [1]. Detection and recognition of text from an image like Marathon contest is challenging because of abnormal poses created by background and number font variations [2]. Since Marathon becomes a new trend for creating awareness about heath to the public. A method for segmenting text and nontext in Indus documents based on the fact that compare to non text components text components are less cursive [3]. To improve recognition of text line characters, many handwritten text recognition component use the baseline information. Abnormal baseline detection reduces the performance of the recognition. For baseline detection in a text line, at first, detect the set of numerous contour points (S points) of the text line [4]. Changes in character font sizes, restricted spacing between text blocks, and convoluted structure are main causes of the wide common over-segmentation and under-segmentation errors [5]. Text detection and recognition in underprivileged standard video is a challenging problem due to dubious blur and malformation effects caused by camera and text movements. This affects the overall rendering of the text detection and recognition methods [6]. Commonly text images are divided into three types such as document images, scene images, and digital images. Document images contain text and graphics, these images are originated by scanners and cameras. Scene images can have text images such as advertising boards and banners [7]. Digital images are generated by system software. Compared with document images and scene images, digital images can have wide defects such as more complex foreground and backgrounds, low and high resolutions, loss of compression and severe edge softness. To overcome these situations this paper suggests enhancing the digital text by gradients using Sobel and Laplacian methods. Recent years, consequence progress has been made in detecting text scene images. Region based methods are also called as sliding window based methods. Since, sliding window is generally used to detect all possible texts. Sliding window is also known as texture based methods [8]. GA and HS algorithms are used for text and character recognition respectively [9]. Factors that should be noted while detecting and extracting the text in an image are Font Style, Size, Thickness, Color, Background, Alignment, Language, Illumination, and noise. Mining text information from natural images is difficult and challenging task due to image conditions and diversity of texts [10]. The rest of this paper is organized as follows. Section 2 describes the proposed methodologies of this paper; Section 3 presents Image Pre processing, Section 4 Yields Image Enhancement techniques, Section 5 presents Experimental Results, Section 6 present the Conclusion of this paper. [2] PROPOSED METHODOLOGIES Flow chart of Proposed Method for digital text enhancement and detection is shown in following [Figure-1]. Getting input images Methodologies Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 2
Pre-processing Enhancements Scaling Rotation Histogram equalization Filter for Salt & Pepper noise Sharpening Translation Gradient Sobel method Laplacian Method Extracting each detected digital texts Detecting digital text in images Figure: 1. Flow chart for digital text enhancement and detection [3] IMAGE PRE PROCESSING Getting improvised digital images The main aim of pre-processing is to improve an image data by suppressing unwanted distortions or enhance in image. Therefore, image can be used for further processing like smoothing and sharpening. Image Pre-processing techniques used are scaling, transforming, zooming, resizing and converting images to grey scale images. [Figure - 2] shows some Image pre-processing. (a) Original image (b) Scaling (c) Rotation Figure: 2. Examples for some pre processing images [4] IMAGE ENHANCEMENT Image enhancement is used for improvising the quality of image. It is a technique most widely used in many applications. Sometimes images captured from satellites and digital camera has less contrast, brightness and noise because of illuminations. Main goal of image enhancement is to improvise the blurred and noisy image by sharpening and removing noise Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 3
that present in the image. Here, this paper suggests some image enhancement techniques such as histogram equalization, filtering to remove salt and pepper noise, and sharpening. [4.1] HISTOGRAM EQUALIZATION Pixel brightness transformation is one of the image enhancement techniques. It modifies pixel brightness and transformation depends on the properties of pixel itself. Other is grey scale transformations. It changes the brightness without changing a position in the image such that grey scale transformation does not depend on the position of the pixel in the image. A typical grey scale transformation is histogram equalization. Histogram equalization automatically determines a transformation function to generate an output image as a uniform histogram. Here, this paper suggests doing histogram equalization for digital text images. [Figure-3] Shows histogram of grey scale image and [Figure 4] Shows histogram equalized image. (a)grey scale image (b) Histogram Figure: 3. Histogram for grey scale image (a) Enhanced histogram image (b) Histogram Equalized Figure: 4. Histogram equalization Histogram is a simple way to improve the dark or blurred image by spreading out the frequencies in an image. It is also known as equalizing the image; the equation (1) shows histogram equalization. S k= T(r k).(1) Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 4
Here, r k represents input intensity and S k represents processed intensity. [4.2] NOISE REMOVING FILTERS To remove noise like salt and pepper, and Gaussian noise in an image usually mean and median filters are used. This paper includes median filter to remove noise and to make sharpness in image it includes Sobel and Laplacian filters to improve quality of image. Noise occurs usually variation in brightness of color information. Typically, median filter takes the midpoint value in a given set of values. Sometimes median filter works better than the average filter. Median filter is one of the widely used and most important filters to remove random valued impulse noise. The merit of using this filter is that the corresponding median value replaces the corrupted value pixel in noisy image. The median value is calculated by sorting all the pixel value into ascending order first and then replaces the corresponding calculated pixel value with middle pixel value. One of the easiest spatial filtering operations is mean filter it is also known as average filter. It replaces the centre value of the mask with the average value of all its nearest pixels value together with itself. Advantage and disadvantage of various filters are explained in [Table-1]. FILTERS ADVANTAGE DISADVANTAGE Median Filter It is a non-linear filter It is used to remove salt and pepper noise It is simple and easy to implement Non-linear filters are very effective to remove impulse noise. More powerful than linear filter. It does not protect the details of image. Some details in image can be removed using mean filter. Difficult to design than linear filter. Arithmetic mean/average Filter It is a linear filter Fast and simple to calculate. Easy and simple to work with and use in further calculations. It is used to remove impulse noise Perceptive to extreme values. It is not suitable to wide series type of data. Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 5
Wiener filter Many adaptive filters can use this filter. It tries to minimize the mean square error. Gaussian filter It is very effective for removing noise. It is a linear low pass filter. It is efficient in computational. It is faster than median filter. The design of this filter requires prior information about the statistics of the data to be processed. It is optimum only when the statistical characteristics of the input data matched with prior information. It reduces edge blurring /edge detection. Table: 1. Advantage and disadvantage of various filers used in image processing [4.3] SHARPENING This paper mainly focuses on sharpening since; digital images have some lighting conditions, color contrast and resolutions. Here, sharpening is done in two ways by gradient direction and gradient magnitude by using Sobel and Laplacian with sharpening an image. Sharpening of an image is generated by simply suppressing the low-level frequencies. Similarly smoothing of an image is produced by simply suppressing the high-level frequencies. [4.3.1] SOBEL AND LAPLACIAN Normally filtering is a technique for modifying an image, image processing usually implements filtering such as smoothing and sharpening. A new image can be obtained by applying a Laplacian to an image that highlights edges and other discontinuities. The result obtained by Laplacian filtering is not an enhanced image. In order to get enhanced final image, work more by subtracting a result obtained from Laplacian filter with original image to get a final sharpened enhanced image. Simple way to improvise the visual quality of an image is by highlighting the high frequency components of an image. Image sharpening is an enhancement technique that highlights edges and fine details in an image. Typically Sobel filter are used for edge detection. Sobel operator used in [Figure-5] is commonly used. Laplacian operator is used to find edges in an image. Sobel operator mask are first order derivative but Laplacian operator mask are second order derivative these are the distinct between Sobel and Laplacian operator. Laplacian has two further classification first is positive Laplacian and other is Negative Laplacian. In positive Laplacian, it has standard mask in which center element of the Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 6
mask should be negative values and corner elements of mask should be zero values. In negative Laplacian, it also has standard mask in which center element should be in positive value.all the elements in corner should be zero and rest of all the elements should be -1 in mask. But both positive and negative Laplacian mask should not be applied at the same time. Sobel operator is used for detecting the edges and Laplacian operator are used for highlighting the edges. [Figure-6] shows positive and negative Laplacian mask. -1 0 1 1/8-2 0 2 1/8-1 0 1 S x Figure: 5. Sobel operator mask 0 1 0 1-4 1 0 1 0 (a)positive Laplacian mask Figure: 6. Laplacian operator mask. 1 2 1 0 0 0-1 -2-1 S y 0-1 0-1 4-1 0-1 0 (b) Negative Laplacian mask [5] EXPERIMENTAL RESULT The experimental results shown in this paper provides better results for enhancing, detecting and extracting a digital text images are shown in [Figure-7], [Figure-8 ]and [Figure-9]. To show and prove these experimental results data are collected from online with various digital images. (a) original image (b) Histogram equalized image Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 7
(c) Grey scale image (d) Gradent using Sobel in X axis with noise (e) Gradients using Sobel in Y axis with noise (f) Gradients using Sobel in X axis without noise (g) Gradients using Sobel in Y axis without noise (h) Gradient magnitude using Sobel method Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 8
(i) Gradient direction using Sobel method (j) Laplacian Figure:7. Enhancing digital text images (k) sharpened digital text image (a) Original image (b) Histogram equalized image (c) Grey scale image Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 9
(d) Gradent using Sobel in X (e) Gradients using Sobel in Y (f) Gradients using Sobel in X axis axis with noise axis with noise without noise (g) Gradients using Sobel in (h) Gradient magnitude using (i) Gradient direction using Sobel Y axis without noise Sobel method method (j) Laplacian (k) sharpened digital text image (l) Detected digital text images Figure:8. Enhancing and Detecting digital text images Figure: 9. Extracted digital text images [6] CONCLUSION Normally digital color text image have some resolutions based on some lighting conditions and noises. Therefore, this paper decides to overcome these situations. In most of Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 10
the existing paper widely focusing on historical documents, handwriting recognition and character recognition use various methods since, this paper focusing on digital text. Digital text is generated by software s. The future work can apply some other method and try to improvise detecting digital text with color and also apply compression. REFERENCES [1] https://en.wikipedia.org/wiki/optical_character_recognition [2] P. Shivakumara, R. Raghavendra, Longfei Qin, K.B. Raja, Tong Lu, Umapada Pal, A new multimodal approach to bib number/text detection and recognition in Marathon images, pattern recognition,(2017), pg 479-491. [3] A.S. Kavitha, P. Shivakumara, G.H. Kumar, Tong Lu, Text segmentation in degraded historical document Images EIJ,(2016), pp 189-197. [4] D.Chakraborty, Umapada Pal, Baseline detection of multi-lingual unconstrained handwritten text lines, pattern recognition letters,(2016), pp 74-81. [5] H.Dai-Ton, N.Duc-Dung, L. Duc-Hieu, An adaptive over-split and merge algorithm for page segmentation, pattern recognition letters, (2016), pp 137-143. [6] V. Khare, P. Shivakumara, P. Raveendran, M. Blumenstein, A blind deconvolution model for scene text detection and recognition video, Pattern Recognition, (2016), pp 128-148. [7] Uma B. Karanje, Rahul Dagade, Survey on Text Detection, Segmentation and Recognition from a Natural Scene Images,International Journal of Computer Applications, vol 108-no-13,(2014), pp 39-43. [8] Y.W.Zhijiang Zhang, Wei Shen, Dan Zeng, Mei Fang, Shifu Zhou, Text detection in scene images based on exhaustive segmentation,signal processing: Image Communication,(2017), pp 1-8. [9] M.Y. Potrus, U.K. Ngah, B.S. Ahmed, An evolutionary harmony search algorithm with dominant point detection for recognition-based segmentation of online Arabic text recognition, Ain Shams Engineering Journal, (2014), pp 1129-1139. [10] Matko Sari c, Scene text segmentation using low variation extremal regions and sorting based character grouping, Neurocomputing, (2017),pp 56-65. Author[s] brief Introduction PL.Chithra is currently working as an Associate Professor in the Department of Computer Science, University of Madras, Chennai 600 005. She is actively engaged in doing research in the field of digital image enhancement, segmentation and compression. Her area of interest includes digital signal processing, pattern recognition and Network security. B.Ilakkiya Arasi is currently studying M.Phil. Computer Science in the Department of Computer Science, University of Madras, Chennai 600 005. She is actively engaged in doing research in the field of digital image enhancement, segmentation and biometric techniques. Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 11
Corresponding Address- (Pin code and Mobile is mandatory) Dr.PL.Chithra Associate Professor Department of Computer Science University of Madras Chennai 600 005 Off. 044-25399627 Mob. 9176202211 Mailid: chitrasp2001@yahoo.com B.Ilakkiya Arasi M.Phil Scholar Department of Computer Science University of Madras Chennai 600 005 Mob. 9003273228 Mailid: ilakkiyaarasi0523@gmail.com Sonali Gupta and Komal Kumar Bhatia (Bold, Font 10, Time New Roman) 12