A Novel Approach for Image Cropping and Automatic Contact Extraction from Images Prof. Vaibhav Tumane *, {Dolly Chaurpagar, Ankita Somkuwar, Gauri Sonone, Sukanya Marbade } # Assistant Professor, Department of Computer Science and Engineering,* Nagpur Institute of Technology # Department of Information Technology, Nagpur Institute of Technology vaibhav.tumane1987@gmail.com Abstract: In this paper, we are implementing such cropping techniques by which a user can crop images in any of polygon shape on mobile phones. Now a days, Optical Character Recognition (OCR) becoming very important for converting images into text form. At present, various image cropping applications provides facility to crop images in squares, rectangles and circles. By using OCR techniques we are developing an application which will convert images into editable format and detect 10 digits mobile number to auto save it in mobile contacts. Text data present in multimedia contains useful information for automatic annotation, indexing. Extracted information used for recognition of the overlay or scene text from a given video or image. In this paper, firstly, we are applying OCR to extract text information from the images. Secondly, we are applying a content filtering algorithm that will detect a 10digit mobile number and automatically stored in our device. INTRODUCTION Developing a technique where the text is extracted from visiting card image. User can able to find the contact by providing the visiting card image where this process gives good flexibility of work in daily life. Text localization and recognition in images is important for searching information in image. To obtain satisfactory results, using the optical character recognition (OCR) technique which helps to extract text from images. The Optical Character Recognition is the process of identification of texts from images or electronic document. Now-a-days cropping of image in the mobile is easy but there are so many limitations to crop image. As like shape of cropping, shape of cropping can change as per the given condition. The perfect predefined shapes are circle, triangle, square, rectangle but if we need to crop image in the shape of bike or any other different shape then it becomes very difficult to crop properly or impossible in smartphone. For this situation user needs new technique which can crop the surface in any shape on mobile device. If scanned image is of good quality it is easy to extract text from images. To extract text from images we need OCR (Optical Character Recognition) technique which is used to extract text from images. It extracts text from image and make text file which is use to process algorithm and result is given to the user. Text data present in multimedia contain useful information for automatic annotation, indexing. Extracted information used for recognition of the overlay or scene text from a given video or image. Initially we capture image 132
of the document which is required by creating web server online using JavaScript. Then the captured image will be stored, after the image by OCR the image will be converted text format and after that 10 digit number will be detected.the detected number will stored to the Google contacts. On synchronization of mobile contacts with Google contacts the contact numbers will be appeared on mobile. Similarly, if more than one contact number is present in image file it will detect all contact numbers and create a.csv file and generate it on mail. PROBLEM DEFINITION The most prominent challenge faced by user is to extract text from image. Recognition of the text from a given image due to variations like differences in size, style, orientation, and alignment. The low image contrast and complex background makes the problem of automatic text extraction. Image contains text of any font, but problem is to know which shape is equal to ASCII code. Cropping the image in any customized shape on mobiles as per user. Detecting the contact from given image and automatically save in mobile contacts. Extraction, enhancement, and recognition of the text from a given image. Generally normal human communicates with new people everyday and build their contacts regularly so they require to save contacts manually which can become time taking and difficult also there is a possibilities to loss the data as well. In present system, the methodology to extract a contacts number from a given image is not available. Therefore we are developing a technique which will extract contacts from images and extraction of the data involves detection, localization, tracking, save it in Google contacts. OBJECTIVES TO STUDY Use of OCR technique which focuses on extraction of text from images and detection of digits of mobile number. OCR is used when recreating a similar document present on paper as a document in electronic form. The converted text files take less space than the original image file and can be indexed. Hence the use of OCR adds an advantage to the user who had to deal with conversion of great amount of paper works into electronic form. RESEARCH DESIGN Application is divided into a two parts: A. Customize image cropping B. Auto save contacts from images Browse image/ input Read image Calculate pixels RGB Mark-in method Crop image Select boundary area Line draw function Mouse click event Fig.(A) Customize image cropping 133
Start Camera Take a Snapshot Save image Browse image Apply OCR Extract Number Detect 10digit Save in Google Contacts Sync Mobile with Google Auto save Contacts into mobile from Google contacts Fig. (B) Auto save contacts from images METHODOLOGY 1. Create user interface design for cropping 2. Image extraction as per customized cropping. 3. Formatted image save into database 4. Web server camera detection. 5. Detect mobile number from captured image. 6. Auto save 10 digits mobile numbers into Google contacts. 1. Create user interface design for cropping User interface design consist of three command button, two textbox for showing the mouse movement, three picture box shows the original picture, the zoom image, the cropped image and menu bar for image loading. 134
2. Image Extraction as per customized cropping Cropping image using point to point mark-in method and line draw function and give x, y coordinate to the image. After it shows the selected area by using x and y coordinate and the line draw function. Cropped image shown in the picture box by selected area. 3. Formatted image save into database The cropped image shown in output crop picture box is saved into database for further use if any. The images are store in various file formats like jpeg, rtf, riff, gif, etc. 4. Web server camera detection By using java script and html we created a program for detection of web camera on any machine or mobile and using a src="webcam.js". We use WebcamJS is a small standalone JavaScript library for capturing still images from your computer's camera, and delivering them to you as JPEG or PNG Data URIs. Creating web server online Created an online web server using Java Script and uploading the URL http://www.gadsgs.in/. After that we captures the image of any business card or visiting card and gives that particular captured image as input with the help of webcam.js we capture image using JavaScript Webcam API and upload it on web server. Automatic detection of camera from web server By activating the camera from the machine or mobile we allow the camera to capture image. The image captured by the camera is loaded on web server and it processed for detection. 5. Detect mobile number from captured image OCR is a technique used to extract text from image. Thinning Thinning is used in OCR to clean the input image and removes the dark points from it Content filtering The OCR is of detect the 10 digit mobile number from converted text format of image is per forms using content filtering algorithm. Content filtering algorithm detects the only digit from the given input and extracts these 10 digits from image. 6. Auto save 10 digit mobile number into Google contacts The detected 10 digit mobile number automatically saved into Google contacts. Also provides a small text box to contact save as with particular name editing and contacts display in mobile phone using Google contacts sync. 135
SNAPSHOTS Fig. (a) User Interface Fig. (b) Load Image Fig. (c) Crop Image 136 Auto save Contacts in mobile from Google contacts
Fig. (d) Take Snapshot Fig. (e) Number detection by OCR 137
Fig. (f) Generated email with.csv file CONCLUSION It concludes that, the application will work on two domains. First is image cropping, in that user will take image as a input in mobile and crop it in any customized shape. The cropped image will be generated in the form of output. Secondly, image is converted into text by OCR method and 10 digits are detected from it and automatically saved into mobile device. REFERENCES [1]G. Vamvakas, B.Gatos, N. Stamatopoulos, and S.J. Perantonis A Complete Optical Character Recognition Methodology for Historical Documents Computational Intelligence Laboratory, Institute of Informatics and Telecommunications, National Center for scientific Research. [2]Ayatullah Faruk Mollah, Nabamita Majumder, SubhadipBasuand Mita Nasipuri Design of an Optical Character Recognition System for Camera-based Handheld Devices (July 2011) Department of Computer Science and Engineering. [3] A. F. Mollah, S. Basu, N. Das, R. Sarkar, M. Nasipuri, M. Kundu, A Fast Skew Correction Technique for Camera Captured Business Card Images, Proc. of IEEE INDICON- 2009 [4]http://code.google.com/p/tesseract-ocr 138
[5] A. F. Mollah, S. Basu, M. Nasipuri, Segmentation of Camera Captured Business Card Images for Mobile Devices, Int l J. of Computer Science and Applications, 1(1), pp. 33-37, June 2010. [6] MdZahidul Islam and Amit Kumar Mondaly Towards a Standard Bangle Photo OCR: Text Detection and Localization Computer Science and Engineering 139