

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The OCR (Optical Character Recognition) project utilizes machine learning to convert scanned documents or images into editable digital text. The main objective is to automate the digitization and text extraction process, improving efficiency and accuracy in data entry, document management, and text analysis. The OCR software employs computer vision and natural language processing techniques to identify characters and patterns, and convert them into machine-readable format. The project involves training the algorithm on large datasets to enhance its accuracy and performance. OCR technology has broad applications in various industries, and its successful implementation can lead to increased productivity, reduced costs, and better access to information, driving innovation and growth.
Typology: Assignments
1 / 25
This page cannot be seen from the preview
Don't miss anything!


















i
“Optical Character Recognition” For the requirement of 6th^ Semester (4BCS603 – Mobile Application Development) B.Tech. in Computer Science and Engineering
Off Hennur - Bagalur Main Road, Near Kempegowda International Airport, Chagalahatti, Bengaluru, Karnataka- Academic Year - 2022-
ii
Chagalahatti, Bengaluru, Karnataka-
Signature of Course In-charge Signature of HOD Signature of Dean …………………… …………………… …………………… Dept. of CSE SoET, CMRU, Bangalore Dept. of CSE SoET, CMRU, Bangalore SoET, CMRU, Bangalore Name of the Examiners: Signature with Date:
iv
The satisfaction that accompanies the successful completion of this project would be incomplete without the mention of the people who made it possible, without whose constant guidance and encouragement would have made efforts go in vain. I express my sincere gratitude to my project guide Dr. T. Parameswaran, Associate Professor, Dept of CSE , without whose constant guidance and support the project would not be successful. I would like to express my thanks to Dr. Rubini P, Associate Professor and Head , Department of Computer Science and Engineering, School of Engineering and Technology, CMR University, Bangalore, for his encouragement that motivated me for the successful completion of Project work. I express my heartfelt sincere gratitude to Dr. V. R. Manjunath, Dean, School of Engineering and Technology, CMR University for his support. TABLE OF CONTENTS Pratham Sharma(20BBTCS115) Pratham Singh(20BBTCS116)
v
2.2 Problem Statement and I/O
5 Design 5 6 IMPLEMENTATION 6.1) Implementation 6 .2) Function used 6.3) Code
7 Result 7.1) Output 7.2) Feature
8 Conclusion 8.1) Conclusion and future work 8.2) Reference
vii
ABSTRACT The OCR (Optical Character Recognition) project is a software development project that utilizes machine learning algorithms to convert scanned documents or images containing printed or handwritten text into editable and searchable digital text. The main objective of the project is to automate the process of digitizing and extracting text from physical documents to increase efficiency and accuracy in data entry, document management, and text analysis. The OCR software uses computer vision techniques to identify characters and patterns in images, and then applies natural language processing to interpret the text and convert it into machine-readable format. The project involves training the OCR algorithm on large datasets of labeled text and images to improve its accuracy and performance. The OCR technology has broad applications in various industries, including finance, healthcare, and legal, where large volumes of paper documents are still prevalent. The project requires a team of skilled software developers, machine learning experts, and domain experts to work together to ensure the OCR software is accurate and reliable. Successful implementation of an OCR project can lead to increased productivity, reduced costs, and better access to information, thereby driving innovation and growth in various industries
2.2 Input/Output: The input a image containing words through the camera or accessing gallery.The output is the functional text which is on the image Application: Optical Character Recognition converts printed texts into digital image files Problem Statement: The problem statement for an OCR app is that traditional methods of digitizing text from physical documents are time-consuming and error-prone. Manual data entry is not only slow but also prone to human errors, which can lead to significant inaccuracies in the extracted data. Moreover, physical documents such as receipts, invoices, and contracts often have different formats and layouts, making it challenging to extract the relevant information accurately. OCR technology can solve these problems by automating the process of digitizing text from physical documents
Chapter III Literature Survey The OCR app was developed using the ArthurHub Image Cropping Library and Java programming language. The following reference documents were used during the development of the app: Android Developer Documentation: https://developer.android.com/docs/ Java Documentation: https://docs.oracle.com/javase/8/docs/api/ ArthurHub Image Cropping Library: https://github.com/ArthurHub/Android-Image-Cropper
Chapter V System Design Module Level Block Diagram: The OCR comprises two main modules: The User Interface module: This module includes the UI components that allow users to input the location name and view the weather information. The App Logic module: This module retrieves data through the library. FIG 5.1: MODULE LEVEL BLOCK DIAGRAM
Chapter VI Implementation: The implementation of an OCR (Optical Character Recognition) app involves the following steps:
android:visibility="gone" android:id="@+id/button_copy" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Copy Text" android:layout_margin="8dp"/> Main-Activity.java file: package com.example.ocrapp; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; import android.Manifest; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import android.util.SparseArray; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast;
import com.google.android.gms.vision.Frame; import com.google.android.gms.vision.text.TextBlock; import com.google.android.gms.vision.text.TextRecognizer; import com.theartofdev.edmodo.cropper.CropImage; import com.theartofdev.edmodo.cropper.CropImageView; import java.io.IOException; import java.security.PrivateKey; public class MainActivity extends AppCompatActivity { Button button_capture , button_copy; TextView textview_data; Bitmap bitmap; private static final int REQUEST_CAMERA_CODE = 100; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button_capture = findViewById(R.id.button_capture); button_copy = findViewById(R.id.button_copy); textview_data = findViewById(R.id.text_data); if(ContextCompat.checkSelfPermission(MainActivity.this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED){ ActivityCompat.requestPermissions(MainActivity.this,new String[]{ Manifest.permission.CAMERA },REQUEST_CAMERA_CODE); } button_capture.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { CropImage.activity().setGuidelines(CropImageView.Guidelines.ON).start(MainActivity.this); }
StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < textBlockSparseArray.size();i++){ TextBlock textBlock = textBlockSparseArray.valueAt(i); stringBuilder.append(textBlock.getValue()); stringBuilder.append("\n"); } textview_data.setText(stringBuilder.toString()); button_capture.setText("Retake"); button_copy.setVisibility(View.VISIBLE); } } private void copyToClipBoard(String text) { ClipboardManager clipboardManager = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText("Copied Data",text); clipboardManager.setPrimaryClip(clip); Toast.makeText(MainActivity.this, "Copied to Clipboard", Toast.LENGTH_SHORT).show(); } } AndroidManifest.xml file