5 Commits

Author SHA1 Message Date
Michael a80b08a3eb change tesseracts initializer for pod validating 2016-10-11 16:40:17 +03:00
Michael d398597796 simple pod installation 2016-10-11 15:43:13 +03:00
Michael f61eb87b0c update podspec ver 2016-10-07 18:52:12 +03:00
Michael 7861d1d07d update podspec 2016-10-07 18:43:03 +03:00
Michael 9d00d8090a updated .swift-version 2016-10-07 18:42:32 +03:00
554 changed files with 2301 additions and 47388 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ playground.xcworkspace
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
Pods/
# Carthage
#
Regular → Executable
+1 -1
View File
@@ -1 +1 @@
2.3
3.0
Regular → Executable
View File
Regular → Executable
+1 -3
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'DocumentsOCR'
s.version = '1.0.0'
s.version = '1.0.4'
s.summary = 'A Swift framework for machine readable documents recognition'
# This description is used to generate tags and improve search results.
@@ -42,6 +42,4 @@ Pod::Spec.new do |s|
s.dependency 'TesseractOCRiOS', '~> 4.0.0'
s.dependency 'PodAsset'
s.dependency 'GPUImage'
s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO' }
end
Regular → Executable
View File
Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Regular → Executable
View File

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View File
View File
Regular → Executable
View File
View File
View File
View File
View File
View File
+4
View File
@@ -24,6 +24,10 @@ extension UIImage {
return image
}
var recognitionImage: UIImage {
return UIImage(cgImage: self.cgImage!, scale: self.scale, orientation: UIImageOrientation.left)
}
func save(_ path: String) {
let png = UIImagePNGRepresentation(self)
try? png?.write(to: URL(fileURLWithPath: path), options: [.atomic])
View File
+6 -4
View File
@@ -23,10 +23,9 @@ open class Utils {
}
static func mrCodeFrom(image: UIImage, tesseractDelegate: G8TesseractDelegate? = nil) -> String? {
let path = bundle.path(forResource: "eng", ofType: "traineddata")
tesseract.delegate = tesseractDelegate!
tesseract.image = image
tesseract.image = image.recognitionImage
tesseract.recognize()
@@ -75,8 +74,11 @@ open class Utils {
if !FileManager.default.fileExists(atPath: destinationURL.path) {
createTessdataFrom(trainDataPath!, toDirectoryURL: tessdataURL, withDestinationURL: destinationURL)
}
let tesseract = G8Tesseract(language: "eng", configDictionary: [:], configFileNames: [], absoluteDataPath: tessdataURL.path, engineMode: .tesseractOnly, copyFilesFromResources: false)
NSLog("\(cacheURL.path)")
NSLog("\(tessdataURL.path)")
NSLog("\(destinationURL.path)")
let tesseract = G8Tesseract(language: "eng", configDictionary: [:], configFileNames: [], cachesRelatedDataPath: "tesseract/tessdata", engineMode: .tesseractOnly)
var whiteList = DOConstants.alphabet.uppercased()
whiteList.append("<>1234567890")
View File
View File
View File
View File
View File
View File
+12 -5
View File
@@ -1,23 +1,30 @@
{
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++35C8851",
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "B3A2403691ADE80CF46872AA6E39C39881A146F4+++4805E2C",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
},
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
"F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++35C8851" : 9223372036854775807,
"F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++39A176C" : 9223372036854775807,
"F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++665569A" : 9223372036854775807
"F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++665569A" : 9223372036854775807,
"B3A2403691ADE80CF46872AA6E39C39881A146F4+++4805E2C" : 9223372036854775807,
"F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++35C8851" : 9223372036854775807
},
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "9E0F3260-D4E0-4DA4-8DD8-16B33507544C",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++35C8851" : "DocumentsOCR\/",
"F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++39A176C" : "",
"F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++665569A" : ""
"F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++665569A" : "",
"B3A2403691ADE80CF46872AA6E39C39881A146F4+++4805E2C" : "documents-ocr-ios-master\/",
"F58CA8BF9748A2452CAED5EE1AD1443C7F6654F4+++35C8851" : "DocumentsOCR\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "DocumentsOCR",
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Example\/DocumentsOCR.xcworkspace",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/appintheair\/documents-ocr-ios",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "B3A2403691ADE80CF46872AA6E39C39881A146F4+++4805E2C"
},
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/appintheair\/passport-ocr-ios",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
View File
View File
View File
View File
View File

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View File
View File

Before

Width:  |  Height:  |  Size: 566 KiB

After

Width:  |  Height:  |  Size: 566 KiB

View File
View File

Before

Width:  |  Height:  |  Size: 406 KiB

After

Width:  |  Height:  |  Size: 406 KiB

View File
View File

Before

Width:  |  Height:  |  Size: 572 KiB

After

Width:  |  Height:  |  Size: 572 KiB

View File
View File

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 209 KiB

View File
View File
View File
Regular → Executable
View File
View File
View File
View File
View File
View File
Regular → Executable
+3
View File
@@ -1,6 +1,9 @@
use_frameworks!
target 'DocumentsOCR_Example' do
pod 'TesseractOCRiOS', :git => 'https://github.com/appintheair/Tesseract-OCR-iOS'
pod 'DocumentsOCR', :path => '../'
pod 'SVProgressHUD'
+13 -5
View File
@@ -1,28 +1,36 @@
PODS:
- DocumentsOCR (0.7.0):
- DocumentsOCR (1.0.3):
- GPUImage
- PodAsset
- TesseractOCRiOS (~> 4.0.0)
- GPUImage (0.1.7)
- PodAsset (0.12.0)
- SVProgressHUD (2.0.3)
- TesseractOCRiOS (4.0.0)
- TesseractOCRiOS (4.0.1)
DEPENDENCIES:
- DocumentsOCR (from `../`)
- SVProgressHUD
- TesseractOCRiOS (from `https://github.com/appintheair/Tesseract-OCR-iOS`)
EXTERNAL SOURCES:
DocumentsOCR:
:path: ../
TesseractOCRiOS:
:git: https://github.com/appintheair/Tesseract-OCR-iOS
CHECKOUT OPTIONS:
TesseractOCRiOS:
:commit: a482f067e93e6670d6ea7753c36b6fac90d2c44c
:git: https://github.com/appintheair/Tesseract-OCR-iOS
SPEC CHECKSUMS:
DocumentsOCR: 57941b9ea95831ce389a75c2871e998ada07dae2
DocumentsOCR: 6c84b18b230402fa12d7a5f9fea7eca564eca893
GPUImage: 733a5f0fab92df9de1c37ba9df520a833ccb406d
PodAsset: d6e724524e63725ef0c579354819ccc2dcbcf920
SVProgressHUD: b0830714205bea1317ea1a2ebc71e5633af334d4
TesseractOCRiOS: 90638afbe43d082433f2e76b384c7901d23956df
TesseractOCRiOS: 30545db87623f3f643280db372d318fc7355463c
PODFILE CHECKSUM: cd9f61bbc718914f9f971ce0f0248a7f58e7038b
PODFILE CHECKSUM: 18dff8c7466af2f5ef701624329ece0921fcf3b7
COCOAPODS: 1.1.0.rc.2
View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

View File

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File

Some files were not shown because too many files have changed in this diff Show More