NMAC427 / SwiftOCR

Fast and simple OCR library written in Swift
Apache License 2.0
4.61k stars 481 forks source link

Does Nothing #107

Open AdrianBinDC opened 6 years ago

AdrianBinDC commented 6 years ago

I got it installed using Xcode 9 (Build 9A235) via CocoaPods.

I import SwiftOCR as follows:

import SwiftOCR I have a UIImageView that displays images on the ViewController without issue:

@IBOutlet weak var imageView: UIImageView!

I tried declaring an instance of both in the class and in a method:

let swiftOCRInstance = SwiftOCR()

I have a method I used to do OCR that gets called:

  func performOCR() {

    // tried this in local scope and class scope
   // let swiftOCRInstance = SwiftOCR()

    swiftOCRInstance.recognize(imageView.image!) { recognizedString in
      print(recognizedString)
    }
  }

I don't get any errors, not output in console...nothing...it's like a black hole. 🙄🔫

AdrianBinDC commented 6 years ago

Oops...I take it back...Just looked at CPU usage and it's 100%. I was under the impression this is fast. I let it run for a minute...this is a picture taken with an iPhone, so it's not ginormous.

ccosnean commented 6 years ago

Same issue, The completion block is never called.