diff options
author | dianshi <dianshi@main.lv> | 2021-03-25 09:34:27 +0000 |
---|---|---|
committer | dianshi <dianshi@main.lv> | 2021-03-25 09:34:27 +0000 |
commit | 1a2eec656ca41515d985a114053ffbc3cf9d1971 (patch) | |
tree | 98032f2016aff2c2e32945f482a7c9d212d211c6 | |
parent | 6e7acb16e75bd6628f9db15be4949e283cc18db8 (diff) | |
download | OCRImage-main.tar.gz OCRImage-main.zip |
Cleaned up from commented out codemain
-rw-r--r-- | OCRImage/main.swift | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/OCRImage/main.swift b/OCRImage/main.swift index e103c38..4d0cc2d 100644 --- a/OCRImage/main.swift +++ b/OCRImage/main.swift @@ -2,7 +2,7 @@ // main.swift // OCRImage // -// Created by Jacky Jack on 04/03/2021. +// Created on 04/03/2021. // import Foundation @@ -55,13 +55,8 @@ class TextOCR { var pieces:[TextPiece] = [] var err:NSError? - //guard let cgImage = - - //let requestHandler = VNImageRequestHandler(url: url) var textRequest = VNRecognizeTextRequest(completionHandler: recognizeTextHandler(request:error:)) - - //let request = VNRecognizeTextRequest(completionHandler: recognizeTextHandler); var handler = VNImageRequestHandler(url: url) do { try handler.perform([textRequest]) @@ -127,10 +122,6 @@ if options.debug { print("OCR Input file: \(inputFile)") } - -//Try to open file from URL -//var runPath = Bundle.main.executablePath! - //return true if file excists func checkIfFileExists(_ fname: String) -> Bool { let fm = FileManager.default |