Sei sulla pagina 1di 17

IMAGE TEXT SEARCH

A mini project report submitted by

DEREK CHRISTY JOSEPH (URK17CS281)

in partial fulfillment for the award of the degree of

BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING

under the supervision of

Mr. J. Andrew, M.E, (Ph.D.), Assistant Professor

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING
KARUNYA INSTITUTE OF TECHNOLOGY AND SCIENCES

(Declared as Deemed to be University -under Sec-3 of the UGC Act, 1956)


Karunya Nagar, Coimbatore - 641 114. INDIA

MAY 2019

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

BONAFIDE CERTIFICATE

This is to certify that the project report entitled, “Image Text Search” is a bonafide record of
Mini Project work done during the academic year 2018-2019 by
DEREK CHRISTY JOSEPH (URK17CS281)

in partial fulfillment of the requirements for the award of the degree of Bachelor of Technology
in Computer Science and Engineering of Karunya Institute of Technology and Sciences.

Submitted for the Viva Voice held on _________________

Coordinator
Head of the Department

ACKNOWLEDGEMENT

First and foremost, I praise and thank the ALMIGTHY GOD whose blessings have

bestowed in me the will power and confidence to carry out my project.


I am grateful to our beloved founders Late. Dr. D.G.S. Dhinakaran, C.A.I.I.B, Ph.D and

Dr. Paul Dhinakaran, M.B.A, Ph.D, for their love and always remembering us in their

prayers.

I extend my thanks to our Vice Chancellor Dr. P. Mannar Jawahar, Ph.D and our

Registrar Dr. Elijah Blessing, M.E., Ph.D, for giving me this opportunity to do the project.

I would like to thank Dr. Prince Arulraj, M.E., Ph.D., Dean, School of Engineering

and Technology for his direction and invaluable support to complete the same.

I would like to place my heart-felt thanks and gratitude to Dr. J. Immanuel John Raja,

M.E., Ph.D., Head of the Department, Computer Science and Engineering for his

encouragement and guidance.

I feel it is a pleasure to be indebted to, Mr. J. Andrew, M.E, (Ph.D.), Assistant

Professor, Department of Computer Science and Engineering for being my guide and to

provide his invaluable support, advice and encouragement.

I also thank all the staff members of the Department for extending their helping hands to

make this project a successful one.

I would also like to thank all my friends and my parents who have prayed and helped me

during the project work.

(i)
ABSTRACT

The phones and tablets storages can quickly get full due to apps, photos, videos and documents.
Many lower-end devices contain a few gigabytes of storage, making this even more of a
problem. Also, searching for photos which contains images like a hard copy of a document, a
quote, notes, etc., can be a daunting task. The purpose of this app is to search and easily delete
images that contain some text content. The app uses an Optical Character Recognition(OCR)
framework created by Google, which is officially known as the Mobile Vision API. The
Mobile Vision API can detect and extract text from images. This API can detect text in any
Latin language (French, German, English, etc.). The app takes a word or a phrase as an input
from the user, the images are scanned for the word, if the word matches it returns the image
file. The results appears in a thumbnail list. The user can then select multiple images and delete
them, or can open an image to view or share it. This app makes deleting images in bulk easy
which results in managing the phone storage problem in an efficient and easy way. Also, now
one can search for a document, quote or screen shots easily in a cluster of images.
(ii)

CONTENTS

Acknowledgment i
Abstract ii

1. Introduction 1
1.1 Introduction
1.2 Objectives
1.3 Motivation
1.4 Overview of the Project

2. Analysis and Design 2


2.1 Functional Requirements
2.2 Non-Functional Requirements
2.3 Architecture
2.4 Use case diagram
2.5. Sequence Diagram

3. Implementation . 3
3.1. Modules Description
3.2. Implementation Details
3.3. Tools used

4. Test results 4

5. Conclusions and Further Scope 5

6. References

1. Introduction

1.1 Introduction
We are living in a digital era where we produce about 2.5 quintillion bytes of data daily.
Our smartphone storages are overflowing with apps, pictures, videos, etc. Instant
messaging apps like WhatsApp has around 4.5 billion photos and 1 billion videos shared
in it per day. But most of the photos, gifs and videos shared in these apps are not worth
occupying the phones storage space. Also, if we want to search for some important
screen shot of a document or some quote, it can really be a tedious job.

1.2 Objectives

To create an android application which can search, share and delete images with text
on it.

1.3 Motivation

Searching for images such as a screen shot of a document or a form, or memes in the
phone gallery can be a daunting task. Also, tons of images with text like ‘good morning’
for example, are not worth occupying the phone storage space after once we’ve seen it.

As we all know the phone gets slow and laggy when on low internal storage space. To
get rid of this problem we often need to move or delete some files. Generally the
unnecessary images and videos that gets accumulate in our phone’s gallery through apps
like whatsapp and consume a lot of storage space.

1.4 Overview of the project

This android application is basically a search engine, which uses Optical Character
Recognition often abbreviated as OCR, to read text from images. When the user enters a
search, all the images stored locally on the phone are scanned. Once the text is detected,
the recognizer then determines the actual text in each block, and segments it into lines
and words. If the search matches it is displayed on the screen. The recognizer can detect
text in Latin based languages (French, German, English, etc.). The resultant images then
can be viewed, shared or can be permanently deleted.
(1)

2. Analysis and Design

2.1 Functional Requirements

 Ability to search images in phone storage

 Ability to detect and read text from images

 Select multiple items to delete at once

 Ability to share images to other apps

2.2 Non-Functional Requirements

 Access to the phone storage with read permission

 Neat User Interface (UI)

 Robust

2.3 Architecture
(2)

2.4 Use Case Diagram


2.5 Sequence Diagram

(3)

3. Implementation
3.1 Modules Description

SearchTask

Public class SearchTask extends AsyncTask<String, String, String>

It contains methods :-

private void getImages();

private boolean searchText(String path, String text);

protected void oonProgressUpdate(String… values);

protected void onPostExecute(String s);

protected String doInbackground(String… strings);

Methods

private void getImages() - It uses a cursor to traverse the


MediaStore to get images and pass the images to method
boolean searchText(path,text). If the searchText method returns
true the image is updated in the RecycleViewer.

Private boolean searchText(String path, Strin text) - It uses a


textRecognizer and scans for the selected queries if the query
matches the function returns true
Public void deleteImages(View view) - deletes the selected image

Public void selectAllImages() - selects all the images in the result list
view.

(4)

Public void cancelSearch(View view) - cancels the Search


AsynTask ( i.e runs on a different thread) if running.

Public void search(View view) - creates a new Async SearchTask.

3.2 Tools used

 Android Studio

4. Results
(5)
(6)

5. Conclusion and Further Scope

This app currently looks up images from WhatsApp only, but it can be
extended to search the whole device.

This app uses a brute force approach for searching images which takes O(n)
time, this makes the searching slow, instead we can use some better
algorithm or methodology to search in lesser time.

6. References

https://developer.android.com/reference/android

https://developers.google.com/vision/android/text-overview
(7)

Potrebbero piacerti anche