Skip to content

saurabh-360/SwiftOCR-8.2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
saurabh-360
Jan 9, 2017
cda82a6 · Jan 9, 2017

History

5 Commits
Jan 9, 2017
Jan 9, 2017
Jan 9, 2017
Jan 9, 2017

Repository files navigation

SwiftOCR-8.2

The project helps to get started with swiftOCR in xcode 8.2, swift 3 from here https://github.com/garnele007/SwiftOCR

Steps to start

  1. Make a new project in Xcode 8.2
  2. Copy the frameworks folder from this repository, or from the original repo you find here https://github.com/garnele007/SwiftOCR.

Framework

  1. Paste it in your projct folder(right where you find the .xcodeproj file).

  2. Go inside the frameworks folder, you will find three files

1. SwiftOCR.xcodeproj 
2. SwiftOCR(folder)
3. SwiftOCRTests(folder)

Building the project with SwiftOCR

  1. Drag and drop the SwiftOCR.xcodeproj file into your project inside the project (Make sure you do not create the workspace, this happens if you drop the file outside the project)

pasteswiftocr

  1. Now go to frameworks->SwiftOCR->GPUImage-master->framework, you will find GPUImage.xcodeproj there.
  2. Drag and drop this file too into the project. gpuimagepaste

The tricky part, Adding frameworks

  1. Go to targets->General scroll down to Embedded Binaries
  2. Click +Add
  3. Type GPUImage.framework, select the one that is outside the scope of you project (having iOS)

selectgpuimage

  1. Click +Add again, and type Swiftocr.framework, and select again the one with iOS.

selectswiftocr

  1. import SwiftOCR in before using it, and use it on and image like this (i Have used it on the image imageTest)
 self.ocrInstance.recognize(UIImage.init(named: "imageTest")!) { [weak self] recognizedString in
            DispatchQueue.main.async {
                print(recognizedString)
                print(self?.ocrInstance.currentOCRRecognizedBlobs ?? "Recoginzed Blob is empty")
            }
        }

refer https://github.com/garnele007/SwiftOCR for more options.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published