summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--OCRImage/main.swift11
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