[
  {
    "path": ".gitignore",
    "content": "# Xcode\nbuild/*\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\n*.xcworkspace\n!default.xcworkspace\nxcuserdata\nprofile\n*.moved-aside\n#CocoaPods\nPods"
  },
  {
    "path": "Podfile",
    "content": "platform :ios\npod 'OpenCV'\npod 'Tesseract'\n"
  },
  {
    "path": "README.md",
    "content": "iPhone-OCR-Tesseract-and-OpenCV\n===============================\n\n[![Join the chat at https://gitter.im/pablosproject/iPhone-OCR-Tesseract-and-OpenCV](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pablosproject/iPhone-OCR-Tesseract-and-OpenCV?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\n\nThis is a sample project created by me (@PablosPoject) and @_AJ_R for academic purpose.\nIt use the OpenCV framework and tutorial made by BloodAxe(https://github.com/BloodAxe) and some other utilities class made by Aptogo (https://github.com/aptogo).\nIt also uses the Tesseract OCR engine to read the text processed with openCV.\n\nI also build a simple user interface that permit to take a photo or choose one from library, and also permit to apply to the image every single step in the image processing, or to apply directly all the processing.\n\nI hope that these can be useful for someone!\nEnjoy!\n\n#Usage\nDownload the project and use [CocoaPods](http://cocoapods.org/) to install required libraries, by running `pod install`.\n\nContact Me\n===============================\npablosproject@gmail.com\n@PablosProject\n\nRelease under GPL\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/pablosproject/iphone-ocr-tesseract-and-opencv/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n"
  },
  {
    "path": "TestOCR.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t0C4F6D0829C540F3B7E86E23 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6442C35B3A894F23BF9DB1A8 /* libPods.a */; };\n\t\t0E0ECC151583681400116FAE /* UIImage+operation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E0ECC141583681400116FAE /* UIImage+operation.m */; };\n\t\t0E20426B15824F34009D88F2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E20426A15824F34009D88F2 /* UIKit.framework */; };\n\t\t0E20426D15824F34009D88F2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E20426C15824F34009D88F2 /* Foundation.framework */; };\n\t\t0E20426F15824F34009D88F2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E20426E15824F34009D88F2 /* CoreGraphics.framework */; };\n\t\t0E20427515824F35009D88F2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0E20427315824F35009D88F2 /* InfoPlist.strings */; };\n\t\t0E20427715824F35009D88F2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E20427615824F35009D88F2 /* main.m */; };\n\t\t0E20427B15824F35009D88F2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E20427A15824F35009D88F2 /* AppDelegate.m */; };\n\t\t0E20427E15824F35009D88F2 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0E20427C15824F35009D88F2 /* MainStoryboard.storyboard */; };\n\t\t0E20428115824F35009D88F2 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E20428015824F35009D88F2 /* ViewController.m */; };\n\t\t0E20429015824FF5009D88F2 /* ImageProcessingImplementation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0E20428D15824FF5009D88F2 /* ImageProcessingImplementation.mm */; };\n\t\t0E20429115824FF5009D88F2 /* ImageProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0E20428E15824FF5009D88F2 /* ImageProcessor.cpp */; };\n\t\t0E20429815825303009D88F2 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E20429715825303009D88F2 /* AVFoundation.framework */; };\n\t\t0E20429A15825308009D88F2 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E20429915825308009D88F2 /* ImageIO.framework */; };\n\t\t0E20429C15825316009D88F2 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E20429B15825316009D88F2 /* libz.dylib */; };\n\t\t0E20429E1582531F009D88F2 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E20429D1582531F009D88F2 /* CoreVideo.framework */; };\n\t\t0E2042A015825324009D88F2 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E20429F15825324009D88F2 /* CoreMedia.framework */; };\n\t\t0E2042A715825613009D88F2 /* UIImage+OpenCV.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0E2042A615825612009D88F2 /* UIImage+OpenCV.mm */; };\n\t\t0E74049215825A5E006AE2B4 /* tessdata in Resources */ = {isa = PBXBuildFile; fileRef = 0E74049115825A5E006AE2B4 /* tessdata */; };\n\t\t482C9DB517B138770080E8D8 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 482C9DB417B138770080E8D8 /* Default-568h@2x.png */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t0997D6262A934A0E9CDE4161 /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = SOURCE_ROOT; };\n\t\t0E0ECC131583681400116FAE /* UIImage+operation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"UIImage+operation.h\"; sourceTree = \"<group>\"; };\n\t\t0E0ECC141583681400116FAE /* UIImage+operation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = \"UIImage+operation.m\"; sourceTree = \"<group>\"; };\n\t\t0E20426615824F34009D88F2 /* TestOCR.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestOCR.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t0E20426A15824F34009D88F2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };\n\t\t0E20426C15824F34009D88F2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };\n\t\t0E20426E15824F34009D88F2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };\n\t\t0E20427215824F35009D88F2 /* TestOCR-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = \"TestOCR-Info.plist\"; sourceTree = \"<group>\"; };\n\t\t0E20427415824F35009D88F2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = \"<group>\"; };\n\t\t0E20427615824F35009D88F2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = \"<group>\"; };\n\t\t0E20427815824F35009D88F2 /* TestOCR-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = \"TestOCR-Prefix.pch\"; sourceTree = \"<group>\"; };\n\t\t0E20427915824F35009D88F2 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = \"<group>\"; };\n\t\t0E20427A15824F35009D88F2 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = \"<group>\"; };\n\t\t0E20427D15824F35009D88F2 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = \"<group>\"; };\n\t\t0E20427F15824F35009D88F2 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = \"<group>\"; };\n\t\t0E20428015824F35009D88F2 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = \"<group>\"; };\n\t\t0E20428B15824FF5009D88F2 /* ImageProcessingProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageProcessingProtocol.h; sourceTree = \"<group>\"; };\n\t\t0E20428C15824FF5009D88F2 /* ImageProcessingImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageProcessingImplementation.h; sourceTree = \"<group>\"; };\n\t\t0E20428D15824FF5009D88F2 /* ImageProcessingImplementation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ImageProcessingImplementation.mm; sourceTree = \"<group>\"; };\n\t\t0E20428E15824FF5009D88F2 /* ImageProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageProcessor.cpp; sourceTree = \"<group>\"; };\n\t\t0E20428F15824FF5009D88F2 /* ImageProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageProcessor.h; sourceTree = \"<group>\"; };\n\t\t0E20429715825303009D88F2 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };\n\t\t0E20429915825308009D88F2 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };\n\t\t0E20429B15825316009D88F2 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = \"compiled.mach-o.dylib\"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };\n\t\t0E20429D1582531F009D88F2 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };\n\t\t0E20429F15825324009D88F2 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };\n\t\t0E2042A515825612009D88F2 /* UIImage+OpenCV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = \"UIImage+OpenCV.h\"; sourceTree = \"<group>\"; };\n\t\t0E2042A615825612009D88F2 /* UIImage+OpenCV.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = \"UIImage+OpenCV.mm\"; sourceTree = \"<group>\"; };\n\t\t0E74049115825A5E006AE2B4 /* tessdata */ = {isa = PBXFileReference; lastKnownFileType = folder; path = tessdata; sourceTree = \"<group>\"; };\n\t\t482C9DB417B138770080E8D8 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = \"Default-568h@2x.png\"; sourceTree = \"<group>\"; };\n\t\t6442C35B3A894F23BF9DB1A8 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t0E20426315824F34009D88F2 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0E2042A015825324009D88F2 /* CoreMedia.framework in Frameworks */,\n\t\t\t\t0E20429E1582531F009D88F2 /* CoreVideo.framework in Frameworks */,\n\t\t\t\t0E20429C15825316009D88F2 /* libz.dylib in Frameworks */,\n\t\t\t\t0E20429A15825308009D88F2 /* ImageIO.framework in Frameworks */,\n\t\t\t\t0E20429815825303009D88F2 /* AVFoundation.framework in Frameworks */,\n\t\t\t\t0E20426B15824F34009D88F2 /* UIKit.framework in Frameworks */,\n\t\t\t\t0E20426D15824F34009D88F2 /* Foundation.framework in Frameworks */,\n\t\t\t\t0E20426F15824F34009D88F2 /* CoreGraphics.framework in Frameworks */,\n\t\t\t\t0C4F6D0829C540F3B7E86E23 /* libPods.a in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t0E20425B15824F34009D88F2 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t482C9DB417B138770080E8D8 /* Default-568h@2x.png */,\n\t\t\t\t0E20427015824F35009D88F2 /* TestOCR */,\n\t\t\t\t0E20426915824F34009D88F2 /* Frameworks */,\n\t\t\t\t0E20426715824F34009D88F2 /* Products */,\n\t\t\t\t0997D6262A934A0E9CDE4161 /* Pods.xcconfig */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0E20426715824F34009D88F2 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0E20426615824F34009D88F2 /* TestOCR.app */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0E20426915824F34009D88F2 /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0E20429F15825324009D88F2 /* CoreMedia.framework */,\n\t\t\t\t0E20429D1582531F009D88F2 /* CoreVideo.framework */,\n\t\t\t\t0E20429B15825316009D88F2 /* libz.dylib */,\n\t\t\t\t0E20429915825308009D88F2 /* ImageIO.framework */,\n\t\t\t\t0E20429715825303009D88F2 /* AVFoundation.framework */,\n\t\t\t\t0E20426A15824F34009D88F2 /* UIKit.framework */,\n\t\t\t\t0E20426C15824F34009D88F2 /* Foundation.framework */,\n\t\t\t\t0E20426E15824F34009D88F2 /* CoreGraphics.framework */,\n\t\t\t\t6442C35B3A894F23BF9DB1A8 /* libPods.a */,\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0E20427015824F35009D88F2 /* TestOCR */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0E74049115825A5E006AE2B4 /* tessdata */,\n\t\t\t\t0E20427915824F35009D88F2 /* AppDelegate.h */,\n\t\t\t\t0E20427A15824F35009D88F2 /* AppDelegate.m */,\n\t\t\t\t0E20427C15824F35009D88F2 /* MainStoryboard.storyboard */,\n\t\t\t\t0E20427F15824F35009D88F2 /* ViewController.h */,\n\t\t\t\t0E20428015824F35009D88F2 /* ViewController.m */,\n\t\t\t\t0E20428B15824FF5009D88F2 /* ImageProcessingProtocol.h */,\n\t\t\t\t0E20428C15824FF5009D88F2 /* ImageProcessingImplementation.h */,\n\t\t\t\t0E20428D15824FF5009D88F2 /* ImageProcessingImplementation.mm */,\n\t\t\t\t0E20428E15824FF5009D88F2 /* ImageProcessor.cpp */,\n\t\t\t\t0E20428F15824FF5009D88F2 /* ImageProcessor.h */,\n\t\t\t\t0E2042A515825612009D88F2 /* UIImage+OpenCV.h */,\n\t\t\t\t0E2042A615825612009D88F2 /* UIImage+OpenCV.mm */,\n\t\t\t\t0E0ECC131583681400116FAE /* UIImage+operation.h */,\n\t\t\t\t0E0ECC141583681400116FAE /* UIImage+operation.m */,\n\t\t\t\t0E20427115824F35009D88F2 /* Supporting Files */,\n\t\t\t);\n\t\t\tname = TestOCR;\n\t\t\tpath = infojobOCR;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0E20427115824F35009D88F2 /* Supporting Files */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t0E20427215824F35009D88F2 /* TestOCR-Info.plist */,\n\t\t\t\t0E20427315824F35009D88F2 /* InfoPlist.strings */,\n\t\t\t\t0E20427615824F35009D88F2 /* main.m */,\n\t\t\t\t0E20427815824F35009D88F2 /* TestOCR-Prefix.pch */,\n\t\t\t);\n\t\t\tname = \"Supporting Files\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t0E20426515824F34009D88F2 /* TestOCR */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 0E20428415824F35009D88F2 /* Build configuration list for PBXNativeTarget \"TestOCR\" */;\n\t\t\tbuildPhases = (\n\t\t\t\tB676B766E76B4C5F9460B0DD /* Check Pods Manifest.lock */,\n\t\t\t\t0E20426215824F34009D88F2 /* Sources */,\n\t\t\t\t0E20426315824F34009D88F2 /* Frameworks */,\n\t\t\t\t0E20426415824F34009D88F2 /* Resources */,\n\t\t\t\t5D4D7A6961374D8AB26D855E /* Copy Pods Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = TestOCR;\n\t\t\tproductName = infojobOCR;\n\t\t\tproductReference = 0E20426615824F34009D88F2 /* TestOCR.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t0E20425D15824F34009D88F2 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 0430;\n\t\t\t\tORGANIZATIONNAME = 26775;\n\t\t\t};\n\t\t\tbuildConfigurationList = 0E20426015824F34009D88F2 /* Build configuration list for PBXProject \"TestOCR\" */;\n\t\t\tcompatibilityVersion = \"Xcode 3.2\";\n\t\t\tdevelopmentRegion = English;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t);\n\t\t\tmainGroup = 0E20425B15824F34009D88F2;\n\t\t\tproductRefGroup = 0E20426715824F34009D88F2 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t0E20426515824F34009D88F2 /* TestOCR */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t0E20426415824F34009D88F2 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0E20427515824F35009D88F2 /* InfoPlist.strings in Resources */,\n\t\t\t\t0E20427E15824F35009D88F2 /* MainStoryboard.storyboard in Resources */,\n\t\t\t\t0E74049215825A5E006AE2B4 /* tessdata in Resources */,\n\t\t\t\t482C9DB517B138770080E8D8 /* Default-568h@2x.png in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXShellScriptBuildPhase section */\n\t\t5D4D7A6961374D8AB26D855E /* Copy Pods Resources */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"Copy Pods Resources\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"\\\"${SRCROOT}/Pods/Pods-resources.sh\\\"\\n\";\n\t\t};\n\t\tB676B766E76B4C5F9460B0DD /* Check Pods Manifest.lock */ = {\n\t\t\tisa = PBXShellScriptBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\tinputPaths = (\n\t\t\t);\n\t\t\tname = \"Check Pods Manifest.lock\";\n\t\t\toutputPaths = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t\tshellPath = /bin/sh;\n\t\t\tshellScript = \"diff \\\"${PODS_ROOT}/../Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [[ $? != 0 ]] ; then\\n    cat << EOM\\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\nEOM\\n    exit 1\\nfi\\n\";\n\t\t};\n/* End PBXShellScriptBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t0E20426215824F34009D88F2 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t0E20427715824F35009D88F2 /* main.m in Sources */,\n\t\t\t\t0E20427B15824F35009D88F2 /* AppDelegate.m in Sources */,\n\t\t\t\t0E20428115824F35009D88F2 /* ViewController.m in Sources */,\n\t\t\t\t0E20429015824FF5009D88F2 /* ImageProcessingImplementation.mm in Sources */,\n\t\t\t\t0E20429115824FF5009D88F2 /* ImageProcessor.cpp in Sources */,\n\t\t\t\t0E2042A715825613009D88F2 /* UIImage+OpenCV.mm in Sources */,\n\t\t\t\t0E0ECC151583681400116FAE /* UIImage+operation.m in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXVariantGroup section */\n\t\t0E20427315824F35009D88F2 /* InfoPlist.strings */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t0E20427415824F35009D88F2 /* en */,\n\t\t\t);\n\t\t\tname = InfoPlist.strings;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t0E20427C15824F35009D88F2 /* MainStoryboard.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t0E20427D15824F35009D88F2 /* en */,\n\t\t\t);\n\t\t\tname = MainStoryboard.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t0E20428215824F35009D88F2 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_SYMBOLS_PRIVATE_EXTERN = NO;\n\t\t\t\tGCC_VERSION = com.apple.compilers.llvm.clang.1_0;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 5.1;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t0E20428315824F35009D88F2 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tARCHS = \"$(ARCHS_STANDARD_32_BIT)\";\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\t\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\n\t\t\t\tCOPY_PHASE_STRIP = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu99;\n\t\t\t\tGCC_VERSION = com.apple.compilers.llvm.clang.1_0;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 5.1;\n\t\t\t\tOTHER_CFLAGS = \"-DNS_BLOCK_ASSERTIONS=1\";\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t0E20428515824F35009D88F2 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 0997D6262A934A0E9CDE4161 /* Pods.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"\\\"$(SRCROOT)\\\"\",\n\t\t\t\t);\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = \"infojobOCR/TestOCR-Prefix.pch\";\n\t\t\t\tINFOPLIST_FILE = \"infojobOCR/TestOCR-Info.plist\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tPRODUCT_NAME = TestOCR;\n\t\t\t\tWRAPPER_EXTENSION = app;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t0E20428615824F35009D88F2 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbaseConfigurationReference = 0997D6262A934A0E9CDE4161 /* Pods.xcconfig */;\n\t\t\tbuildSettings = {\n\t\t\t\tFRAMEWORK_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"\\\"$(SRCROOT)\\\"\",\n\t\t\t\t);\n\t\t\t\tGCC_PRECOMPILE_PREFIX_HEADER = YES;\n\t\t\t\tGCC_PREFIX_HEADER = \"infojobOCR/TestOCR-Prefix.pch\";\n\t\t\t\tINFOPLIST_FILE = \"infojobOCR/TestOCR-Info.plist\";\n\t\t\t\tLIBRARY_SEARCH_PATHS = \"$(inherited)\";\n\t\t\t\tPRODUCT_NAME = TestOCR;\n\t\t\t\tWRAPPER_EXTENSION = app;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t0E20426015824F34009D88F2 /* Build configuration list for PBXProject \"TestOCR\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t0E20428215824F35009D88F2 /* Debug */,\n\t\t\t\t0E20428315824F35009D88F2 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t0E20428415824F35009D88F2 /* Build configuration list for PBXNativeTarget \"TestOCR\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t0E20428515824F35009D88F2 /* Debug */,\n\t\t\t\t0E20428615824F35009D88F2 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 0E20425D15824F34009D88F2 /* Project object */;\n}\n"
  },
  {
    "path": "infojobOCR/AppDelegate.h",
    "content": "//\n//  AppDelegate.h\n//  infojobOCR\n//\n//  Created by Paolo Tagliani on 08/06/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface AppDelegate : UIResponder <UIApplicationDelegate>\n\n@property (strong, nonatomic) UIWindow *window;\n\n@end\n"
  },
  {
    "path": "infojobOCR/AppDelegate.m",
    "content": "//\n//  AppDelegate.m\n//  infojobOCR\n//\n//  Created by Paolo Tagliani on 08/06/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n\n#import \"AppDelegate.h\"\n\n@implementation AppDelegate\n\n@synthesize window = _window;\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    // Override point for customization after application launch.\n    return YES;\n}\n\t\t\t\t\t\t\t\n- (void)applicationWillResignActive:(UIApplication *)application\n{\n    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.\n    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.\n}\n\n- (void)applicationDidEnterBackground:(UIApplication *)application\n{\n    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. \n    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.\n}\n\n- (void)applicationWillEnterForeground:(UIApplication *)application\n{\n    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.\n}\n\n- (void)applicationDidBecomeActive:(UIApplication *)application\n{\n    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.\n}\n\n- (void)applicationWillTerminate:(UIApplication *)application\n{\n    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.\n}\n\n@end\n"
  },
  {
    "path": "infojobOCR/ImageProcessingImplementation.h",
    "content": "//\n//  ImageProcessingImplementation.h\n//  InfojobOCR\n//\n//  Created by Paolo Tagliani on 10/05/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n#import \"ImageProcessingProtocol.h\"\n\n\n\n@interface ImageProcessingImplementation : NSObject<ImageProcessingProtocol>\n\n\n- (UIImage*) processImage:(UIImage*) src;\n- (NSString*) OCRImage:(UIImage*)src;\n- (NSString*) pathToLangugeFIle;\n- (UIImage*) processRotation:(UIImage*)src;\n- (UIImage*) processHistogram:(UIImage*)src;\n- (UIImage*) processFilter:(UIImage*)src;\n- (UIImage*) processBinarize:(UIImage*)src;\n\n\n@end\n"
  },
  {
    "path": "infojobOCR/ImageProcessingImplementation.mm",
    "content": "//\n//  ImageProcessingImplementation.m\n//  InfojobOCR\n//\n//  Created by Paolo Tagliani on 10/05/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n\n#import \"ImageProcessingImplementation.h\"\n#import \"ImageProcessor.h\"\n#import \"UIImage+OpenCV.h\"\n\n@implementation ImageProcessingImplementation\n\n\n- (NSString*) pathToLangugeFIle{\n    \n    // Set up the tessdata path. This is included in the application bundle\n    // but is copied to the Documents directory on the first run.\n    NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);\n    NSString *documentPath = ([documentPaths count] > 0) ? [documentPaths objectAtIndex:0] : nil;\n    \n    NSString *dataPath = [documentPath stringByAppendingPathComponent:@\"tessdata\"];\n    NSFileManager *fileManager = [NSFileManager defaultManager];\n    // If the expected store doesn't exist, copy the default store.\n    if (![fileManager fileExistsAtPath:dataPath]) {\n        // get the path to the app bundle (with the tessdata dir)\n        NSString *bundlePath = [[NSBundle mainBundle] bundlePath];\n        NSString *tessdataPath = [bundlePath stringByAppendingPathComponent:@\"tessdata\"];\n        if (tessdataPath) {\n            [fileManager copyItemAtPath:tessdataPath toPath:dataPath error:NULL];\n        }\n    }\n    \n    setenv(\"TESSDATA_PREFIX\", [[documentPath stringByAppendingString:@\"/\"] UTF8String], 1);\n    \n    return dataPath;\n}\n\n\n- (UIImage*) processImage:(UIImage*) src{\n    \n    \n    /**\n     *  PRE-PROCESSING OF THE IMAGE\n     **/\n    ImageProcessor processor;\n    \n    UIImage * processed= [UIImage imageWithCVMat:processor.processImage([src CVGrayscaleMat], src.size.height)];\n    \n    return processed;\n\n    \n\n}\n\n\n- (NSString*) OCRImage:(UIImage*)src{\n    \n    // init the tesseract engine.\n    tesseract::TessBaseAPI *tesseract = new tesseract::TessBaseAPI();\n    \n    tesseract->Init([[self pathToLangugeFIle] cStringUsingEncoding:NSUTF8StringEncoding], \"eng\");\n    \n    //Pass the UIIMage to cvmat and pass the sequence of pixel to tesseract\n\n    cv::Mat toOCR=[src CVGrayscaleMat];\n    \n    NSLog(@\"%d\", toOCR.channels());\n    \n    tesseract->SetImage((uchar*)toOCR.data, toOCR.size().width, toOCR.size().height\n                        , toOCR.channels(), toOCR.step1());\n    \n    tesseract->Recognize(NULL);\n    \n    char* utf8Text = tesseract->GetUTF8Text();\n    \n    return [NSString stringWithUTF8String:utf8Text];\n    \n}\n\n\n- (UIImage*) processRotation:(UIImage*)src{\n    \n    ImageProcessor processor;\n    cv::Mat source=[src CVGrayscaleMat];\n    processor.correctRotation(source, source, src.size.height);\n    UIImage *rotated=[UIImage imageWithCVMat:source];\n    return rotated;\n    \n}\n\n- (UIImage*) processHistogram:(UIImage*)src{\n    \n    ImageProcessor processor;\n    cv::Mat source=[src CVGrayscaleMat];\n    cv::Mat output=processor.equalize(source);\n    UIImage *equalized=[UIImage imageWithCVMat:output];\n    return equalized;\n    \n}\n\n- (UIImage*) processFilter:(UIImage*)src{\n   \n    ImageProcessor processor;\n    cv::Mat source=[src CVGrayscaleMat];\n    cv::Mat output=processor.filterMedianSmoot(source);\n    UIImage *filtered=[UIImage imageWithCVMat:output];\n    return filtered;\n    \n}\n\n- (UIImage*) processBinarize:(UIImage*)src{\n    \n    ImageProcessor processor;\n    cv::Mat source=[src CVGrayscaleMat];\n    cv::Mat output=processor.binarize(source);\n    UIImage *binarized=[UIImage imageWithCVMat:output];\n    return binarized;\n}\n\n\n@end\n"
  },
  {
    "path": "infojobOCR/ImageProcessingProtocol.h",
    "content": "//\n//  ImageProcessingProtocol.h\n//  InfojobOCR\n//\n//  Created by Paolo Tagliani on 10/05/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n\n#import <Foundation/Foundation.h>\n\n@protocol ImageProcessingProtocol <NSObject>\n- (UIImage*) processImage:(UIImage*) src;\n- (NSString*) OCRImage:(UIImage*)src;\n- (UIImage*) processRotation:(UIImage*)src;\n- (UIImage*) processHistogram:(UIImage*)src;\n- (UIImage*) processFilter:(UIImage*)src;\n- (UIImage*) processBinarize:(UIImage*)src;\n@end"
  },
  {
    "path": "infojobOCR/ImageProcessor.cpp",
    "content": "//\n//  ImageProcessor.cpp\n//  InfojobOCR\n//\n//  Created by Paolo Tagliani on 06/06/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n\n#include <iostream>\n#include \"ImageProcessor.h\"\n\n\n\ncv::Mat ImageProcessor::processImage(cv::Mat source, float height){\n    \n    \n    //Rotacion\n    \n    if (correctRotation(source, source, height)<0) printf(\"Error in rotation correction\");\n    \n  //  cv::Mat equalized=equalize(source);\n    \n    cv::Mat median_filtered=filterMedianSmoot(source);\n    \n    cv::Mat result=binarize(median_filtered);\n    \n   \n    return result;\n    \n}\n\ncv::Mat ImageProcessor::filterMedianSmoot(const cv::Mat &source){\n    \n    \n    cv::Mat results;\n    cv::medianBlur(source, results, 3);\n    return results;\n}\n\ncv::Mat ImageProcessor::filterGaussian(const cv::Mat&source){\n    \n    cv::Mat results;\n    cv::GaussianBlur(source, results, cvSize(3, 3), 0);\n    return results;\n}\n\ncv::Mat ImageProcessor::equalize(const cv::Mat&source){\n    \n    cv::Mat results;\n    cv::equalizeHist(source, results);\n    return results;\n}\n\ncv::Mat ImageProcessor::binarize(const cv::Mat&source){\n    \n    cv::Mat results;\n    int blockDim=MIN( source.size().height/4, source.size().width/4);\n    if(blockDim % 2 != 1) blockDim++;   //block has to be odd\n    \n    printf(\"%s : %d\",\"Block dimension\", blockDim);\n    \n    \n    \n    cv::adaptiveThreshold(source, results, 255, cv::ADAPTIVE_THRESH_MEAN_C,\n                          cv::THRESH_BINARY,blockDim, 0);\n    return results;\n    \n}\n\n\n\nint ImageProcessor::correctRotation(cv::Mat &image, cv::Mat &output, float height)\n{\n\t//calcular el tamaño optimo de la imagen\n\t//Ha de ser lo suficicnetemte grande como para que de detecten bien las líneas\n\t\n\t//si tomamos de que la imagen ha de ser de 1296 de alto se calcula\n    \n\tfloat prop=0;\n    \n\tprop = height/image.cols;\n    \n\t//std::cout<<image.cols<<std::endl;\n\tint cols = image.cols*prop;\n\tint rows = image.rows*prop;\n    \n\tstd::vector<cv::Vec4i> lines;\n\tcv::Mat resized(cols,rows,CV_8UC1,0);\n\tcv::Mat dst(cols,rows,CV_8UC1,255);\n\tcv::Mat original = image.clone();;\n\tcv::Mat kernel(1,2,CV_8UC1,0);\n\tcv::Mat kernel2(3,3,CV_8UC1,0);\n\t\n\tcv::Size si(0,0);\n    \n//\tcv::Mat trans(cols, rows, CV_8UC1,0);\n//\tcv::transpose(image,trans);\n//\tcv::flip(trans,trans,1);\n//\tcv::resize(trans, resized, si, prop,prop);\t\n\tcv::threshold(image, image, 100, 255, CV_THRESH_BINARY);\n\t//cv::Canny(image,image,0,100);\t\n\t//cv::erode(image, image, kernel,cv::Point(0,1), 10);\n\tcv::morphologyEx(image, image, cv::MORPH_OPEN, kernel2, cv::Point(1,1), 15);\n\t//cv::dilate(image, image, kernel,cv::Point(0,1), 2);\n\tcv::Canny(image,image,0,100);\t\n\t//lineas de hough\n\t//cv::HoughLinesP(image, lines, 1, CV_PI/180, 50, 50, 10 );\n\tcv::HoughLinesP(image, lines, 1, CV_PI/180, 80, 30, 10 );\n\tdouble media=0;\n\tdouble ang=0;\n\tint num=0;\n\tcuadrante c[4];\n\tfor (int i =0; i < 4;i++)\n\t{\n\t\tc[i].media = 0;\n\t\tc[i].contador = 0;\n\t}\t\n\tfor( size_t i = 0; i < lines.size(); i++ )\n  \t{\n\t\tcv::Vec4i l = lines[i];\n\t\tcv::line( dst, cv::Point(l[0], l[1]), cv::Point(l[2], l[3]), cv::Scalar(0,0,0), 3, CV_AA);\n\t\t//ang =atan2(l[3]-l[1],l[0]-l[2]);\n\t\tang =atan2(l[1]-l[3],l[0]-l[2]);\n\t\t\n\t\t//if (ang >= 0 && ang <=CV_PI / 2)\n\t\tif (ang >= 0 && ang <=CV_PI / 3)\n\t\t{\n\t\t\tc[0].media += ang;\n\t\t\tc[0].contador++;\t\n            //}else if (ang >CV_PI/2 && ang <= CV_PI)\n\t\t}else if (ang >(2*CV_PI)/3 && ang <= CV_PI)\n\t\t{\n\t\t\tc[1].media += ang;\n\t\t\tc[1].contador++;\t\n            //}else if (ang < 0 && ang > -1*CV_PI/2)\n\t\t}else if (ang > -1*CV_PI && ang < -2*CV_PI/3)\n\t\t{\n\t\t\tc[2].media += ang;\n\t\t\tc[2].contador++;\t\n            \n\t\t}else if (ang > CV_PI/3 && ang < 0)\n\t\t{\n\t\t\tc[3].media += ang;\n\t\t\tc[3].contador++;\t\n\t\t}\n\t\t\n\t}\t\n\tint biggest = 0;\n\tint bi=0;\n\tdouble rot =0;\n\tdouble aux;\n\tfor (int i =0; i < 4;i++)\n\t{\n\t\tif (c[i].contador > bi)\n\t\t{\n\t\t\tbiggest = i;\n\t\t\tbi = c[i].contador;\n\t\t}\n\t\t//std::cout<<\"El cudrante \"<<i<<\" tiene \"<<c[i].contador<<\" elementos y media \"<<180*(c[i].media/c[i].contador)/CV_PI<<std::endl;\n\t}\t\n\t\n    \n\t//std::cout<< \"el que mas tiene es \"<<biggest<<\" con \"<<180*(c[biggest].media/c[biggest].contador)/CV_PI<<std::endl;\n\t\n\taux = (180*(c[biggest].media/c[biggest].contador)/CV_PI);\n\taux = (aux<0)?-1*aux:aux;\t\n\tif (biggest == 1 || biggest == 2)\n\t{\n        \n\t\trot = 180 - aux; \n\t}else{\n\t\trot = aux; \n\t}\n\t\n\tif (!(biggest == 0 || biggest == 2))\n\t{\n\t\trot = rot *-1;\n\t}\n\t\n    \n\tif (rot<-3 || rot > 3)\n\t{\n\t\t//std::cout<<\"he rotado la image \"<<rot<<std::endl;\n\t\timage = rotateImage(original, rot);\n\t}else{\n\t\timage = original; //no se rota\n\t}\n    \n\toutput = image.clone();\n//\t/*cv::namedWindow( \"Ori+Thres\", CV_WINDOW_NORMAL );// Create a window for display.\n//     cv::imshow( \"Ori+Thres\", original);                 \t// Show our image inside it.\n//     cv::namedWindow( \"Detected Lines\", CV_WINDOW_NORMAL );// Create a window for display.\n//     cv::imshow( \"Detected Lines\", dst);                 \t// Show our image inside it.\n//     cv::namedWindow( \"Final rotated\", CV_WINDOW_NORMAL );// Create a window for display.\n//     cv::imshow( \"Final rotated\", output);      */        \t// Show our image inside it.\n//\tcv::waitKey();\n\treturn 0;\n}\n\ncv::Mat ImageProcessor::rotateImage(const cv::Mat& source, double angle)\n{\n    cv::Point2f src_center(source.cols/2.0F, source.rows/2.0F);\n    cv::Mat rot_mat = cv::getRotationMatrix2D(src_center, angle, 1.0);\n    cv::Mat dst;\n    cv::warpAffine(source, dst, rot_mat, source.size());\n    return dst;\n}\n"
  },
  {
    "path": "infojobOCR/ImageProcessor.h",
    "content": "//\n//  ImageProcessor.h\n//  InfojobOCR\n//\n//  Created by Paolo Tagliani on 06/06/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n\n#ifndef InfojobOCR_ImageProcessor_h\n#define InfojobOCR_ImageProcessor_h\n\nclass ImageProcessor {\n    \n    typedef struct{\n        int contador;\n        double media;\n    }cuadrante;\n\n    \npublic:\n    /*\n     To test the implementation I perform a canny on a black white image\n     */\n    cv::Mat processImage(cv::Mat source, float height);\n    \n    /*\n     Filter the image with a median filter to redue the salt&pepper noise,\n     then apply the smooth operator to reduce noise.\n     */\n    cv::Mat filterMedianSmoot(const cv::Mat &source);\n    \n    /*\n     Filter with a gaussian\n     */\n    \n    cv::Mat filterGaussian(const cv::Mat&source);\n    \n    /*\n     Histogram equalization on 1 channel image\n     */\n    cv::Mat equalize(const cv::Mat&source);\n    \n    /*\n     Binarization made using a mobile median treshold,\n     adapted using the image dimension\n     */\n    cv::Mat binarize(const cv::Mat&source);\n    \n    \n    /*\n     Detect if an image is rotated and correct to the proper orientation\n     of the text\n     */\n    int correctRotation (cv::Mat &image, cv::Mat &output, float height);\n    \n    /*\n     Implements the rotation of the image according to the angle passed\n     as parameter\n     */\n    cv::Mat rotateImage(const cv::Mat& source, double angle);\n\n};\n\n#endif\n"
  },
  {
    "path": "infojobOCR/TestOCR-Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>com.pablosproject.${PRODUCT_NAME:rfc1034identifier}</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UIMainStoryboardFile</key>\n\t<string>MainStoryboard</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "infojobOCR/TestOCR-Prefix.pch",
    "content": "//\n// Prefix header for all source files of the 'infojobOCR' target in the 'infojobOCR' project\n//\n\n#import <Availability.h>\n\n#ifndef __IPHONE_5_0\n#warning \"This project uses features only available in iOS SDK 5.0 and later.\"\n#endif\n\n#ifdef __cplusplus\n#import <OpenCV/opencv2/opencv.hpp>\n#include \"baseapi.h\"\n#endif\n\n\n#ifdef __OBJC__\n    #import <UIKit/UIKit.h>\n    #import <Foundation/Foundation.h>\n#endif\n"
  },
  {
    "path": "infojobOCR/UIImage+OpenCV.h",
    "content": "//\n//  UIImage+OpenCV.h\n//  OpenCVClient\n//\n//  Created by Robin Summerhill on 02/09/2011.\n//  Copyright 2011 Aptogo Limited. All rights reserved.\n//\n//  Permission is given to use this source code file without charge in any\n//  project, commercial or otherwise, entirely at your risk, with the condition\n//  that any redistribution (in part or whole) of source code must retain\n//  this copyright and permission notice. Attribution in compiled projects is\n//  appreciated but not required.\n//\n\n#import <UIKit/UIKit.h>\n\n@interface UIImage (UIImage_OpenCV)\n\n+(UIImage *)imageWithCVMat:(const cv::Mat&)cvMat;\n-(id)initWithCVMat:(const cv::Mat&)cvMat;\n\n@property(nonatomic, readonly) cv::Mat CVMat;\n@property(nonatomic, readonly) cv::Mat CVGrayscaleMat;\n\n@end\n"
  },
  {
    "path": "infojobOCR/UIImage+OpenCV.mm",
    "content": "//\n//  UIImage+OpenCV.mm\n//  OpenCVClient\n//\n//  Created by Robin Summerhill on 02/09/2011.\n//  Copyright 2011 Aptogo Limited. All rights reserved.\n//\n//  Permission is given to use this source code file without charge in any\n//  project, commercial or otherwise, entirely at your risk, with the condition\n//  that any redistribution (in part or whole) of source code must retain\n//  this copyright and permission notice. Attribution in compiled projects is\n//  appreciated but not required.\n//\n\n#import \"UIImage+OpenCV.h\"\n\nstatic void ProviderReleaseDataNOP(void *info, const void *data, size_t size)\n{\n    // Do not release memory\n    return;\n}\n\n\n\n@implementation UIImage (UIImage_OpenCV)\n\n-(cv::Mat)CVMat\n{\n    \n    CGColorSpaceRef colorSpace = CGImageGetColorSpace(self.CGImage);\n    CGFloat cols = self.size.width;\n    CGFloat rows = self.size.height;\n    \n    cv::Mat cvMat(rows, cols, CV_8UC4); // 8 bits per component, 4 channels\n    \n    CGContextRef contextRef = CGBitmapContextCreate(cvMat.data,                 // Pointer to backing data\n                                                    cols,                      // Width of bitmap\n                                                    rows,                     // Height of bitmap\n                                                    8,                          // Bits per component\n                                                    cvMat.step[0],              // Bytes per row\n                                                    colorSpace,                 // Colorspace\n                                                    kCGImageAlphaNoneSkipLast |\n                                                    kCGBitmapByteOrderDefault); // Bitmap info flags\n    \n    CGContextDrawImage(contextRef, CGRectMake(0, 0, cols, rows), self.CGImage);\n    CGContextRelease(contextRef);\n    \n    return cvMat;\n}\n\n-(cv::Mat)CVGrayscaleMat\n{\n    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray();\n    CGFloat cols = self.size.width;\n    CGFloat rows = self.size.height;\n    \n    cv::Mat cvMat = cv::Mat(rows, cols, CV_8UC1); // 8 bits per component, 1 channel\n \n    CGContextRef contextRef = CGBitmapContextCreate(cvMat.data,                 // Pointer to backing data\n                                                    cols,                      // Width of bitmap\n                                                    rows,                     // Height of bitmap\n                                                    8,                          // Bits per component\n                                                    cvMat.step[0],              // Bytes per row\n                                                    colorSpace,                 // Colorspace\n                                                    kCGImageAlphaNone |\n                                                    kCGBitmapByteOrderDefault); // Bitmap info flags\n    \n    CGContextDrawImage(contextRef, CGRectMake(0, 0, cols, rows), self.CGImage);\n    CGContextRelease(contextRef);\n    CGColorSpaceRelease(colorSpace);\n    \n    return cvMat;\n}\n\n+ (UIImage *)imageWithCVMat:(const cv::Mat&)cvMat\n{\n    return [[UIImage alloc] initWithCVMat:cvMat];\n}\n\n- (id)initWithCVMat:(const cv::Mat&)cvMat\n{\n    NSData *data = [NSData dataWithBytes:cvMat.data length:cvMat.elemSize() * cvMat.total()];\n    \n    CGColorSpaceRef colorSpace;\n    \n    if (cvMat.elemSize() == 1)\n    {\n        colorSpace = CGColorSpaceCreateDeviceGray();\n    }\n    else\n    {\n        colorSpace = CGColorSpaceCreateDeviceRGB();\n    }\n    \n    CGDataProviderRef provider = CGDataProviderCreateWithCFData((__bridge_retained CFDataRef)data);\n    \n    CGImageRef imageRef = CGImageCreate(cvMat.cols,                                     // Width\n                                        cvMat.rows,                                     // Height\n                                        8,                                              // Bits per component\n                                        8 * cvMat.elemSize(),                           // Bits per pixel\n                                        cvMat.step[0],                                  // Bytes per row\n                                        colorSpace,                                     // Colorspace\n                                        kCGImageAlphaNone | kCGBitmapByteOrderDefault,  // Bitmap info flags\n                                        provider,                                       // CGDataProviderRef\n                                        NULL,                                           // Decode\n                                        false,                                          // Should interpolate\n                                        kCGRenderingIntentDefault);                     // Intent   \n    \n    self = [self initWithCGImage:imageRef];\n    CGImageRelease(imageRef);\n    CGDataProviderRelease(provider);\n    CGColorSpaceRelease(colorSpace);\n    \n    return self;\n}\n\n\n\n@end\n"
  },
  {
    "path": "infojobOCR/UIImage+operation.h",
    "content": "//\n//  UIImage+operation.h\n//  infojobOCR\n//\n//  Created by Paolo Tagliani on 09/06/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n\n\n#import <UIKit/UIKit.h>\n\n@interface UIImage (UKImage)\n\n-(UIImage*)rotate:(UIImageOrientation)orient;\n\n@end\n\n"
  },
  {
    "path": "infojobOCR/UIImage+operation.m",
    "content": "\n\n#include \"UIImage+operation.h\"\n\nstatic CGRect swapWidthAndHeight(CGRect rect)\n{\n    CGFloat  swap = rect.size.width;\n    \n    rect.size.width  = rect.size.height;\n    rect.size.height = swap;\n    \n    return rect;\n}\n\n@implementation UIImage (UKImage)\n\n-(UIImage*)rotate:(UIImageOrientation)orient\n{\n    CGRect             bnds = CGRectZero;\n    UIImage*           copy = nil;\n    CGContextRef       ctxt = nil;\n    CGImageRef         imag = self.CGImage;\n    CGRect             rect = CGRectZero;\n    CGAffineTransform  tran = CGAffineTransformIdentity;\n    \n    rect.size.width  = CGImageGetWidth(imag);\n    rect.size.height = CGImageGetHeight(imag);\n    \n    bnds = rect;\n    \n    switch (orient)\n    {\n        case UIImageOrientationUp:\n            // would get you an exact copy of the original\n            assert(false);\n            return nil;\n            \n        case UIImageOrientationUpMirrored:\n            tran = CGAffineTransformMakeTranslation(rect.size.width, 0.0);\n            tran = CGAffineTransformScale(tran, -1.0, 1.0);\n            break;\n            \n        case UIImageOrientationDown:\n            tran = CGAffineTransformMakeTranslation(rect.size.width,\n                                                    rect.size.height);\n            tran = CGAffineTransformRotate(tran, M_PI);\n            break;\n            \n        case UIImageOrientationDownMirrored:\n            tran = CGAffineTransformMakeTranslation(0.0, rect.size.height);\n            tran = CGAffineTransformScale(tran, 1.0, -1.0);\n            break;\n            \n        case UIImageOrientationLeft:\n            bnds = swapWidthAndHeight(bnds);\n            tran = CGAffineTransformMakeTranslation(0.0, rect.size.width);\n            tran = CGAffineTransformRotate(tran, 3.0 * M_PI / 2.0);\n            break;\n            \n        case UIImageOrientationLeftMirrored:\n            bnds = swapWidthAndHeight(bnds);\n            tran = CGAffineTransformMakeTranslation(rect.size.height,\n                                                    rect.size.width);\n            tran = CGAffineTransformScale(tran, -1.0, 1.0);\n            tran = CGAffineTransformRotate(tran, 3.0 * M_PI / 2.0);\n            break;\n            \n        case UIImageOrientationRight:\n            bnds = swapWidthAndHeight(bnds);\n            tran = CGAffineTransformMakeTranslation(rect.size.height, 0.0);\n            tran = CGAffineTransformRotate(tran, M_PI / 2.0);\n            break;\n            \n        case UIImageOrientationRightMirrored:\n            bnds = swapWidthAndHeight(bnds);\n            tran = CGAffineTransformMakeScale(-1.0, 1.0);\n            tran = CGAffineTransformRotate(tran, M_PI / 2.0);\n            break;\n            \n        default:\n            // orientation value supplied is invalid\n            assert(false);\n            return nil;\n    }\n    \n    UIGraphicsBeginImageContext(bnds.size);\n    ctxt = UIGraphicsGetCurrentContext();\n    \n    switch (orient)\n    {\n        case UIImageOrientationLeft:\n        case UIImageOrientationLeftMirrored:\n        case UIImageOrientationRight:\n        case UIImageOrientationRightMirrored:\n            CGContextScaleCTM(ctxt, -1.0, 1.0);\n            CGContextTranslateCTM(ctxt, -rect.size.height, 0.0);\n            break;\n            \n        default:\n            CGContextScaleCTM(ctxt, 1.0, -1.0);\n            CGContextTranslateCTM(ctxt, 0.0, -rect.size.height);\n            break;\n    }\n    \n    CGContextConcatCTM(ctxt, tran);\n    CGContextDrawImage(UIGraphicsGetCurrentContext(), rect, imag);\n    \n    copy = UIGraphicsGetImageFromCurrentImageContext();\n    UIGraphicsEndImageContext();\n    \n    return copy;\n}\n\n@end\n"
  },
  {
    "path": "infojobOCR/ViewController.h",
    "content": "//\n//  ViewController.h\n//  infojobOCR\n//\n//  Created by Paolo Tagliani on 08/06/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import \"ImageProcessingProtocol.h\"\n\n@interface ViewController : UIViewController<UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIActionSheetDelegate>{\n    UIImagePickerController *mediaPicker;\n    UIImage *takenImage;\n    UIImage *processedImage;\n}\n\n\n@property (strong, nonatomic) IBOutlet UIButton *process;\n@property (strong, nonatomic) IBOutlet UIImageView *resultView;\n@property (strong, nonatomic) id <ImageProcessingProtocol> imageProcessor;\n@property (strong, nonatomic) IBOutlet UIButton *read;\n@property (strong,nonatomic) UIImage *takenImage;\n@property (strong,nonatomic) UIImage *processedImage;\n@property (strong, nonatomic) IBOutlet UIButton *rotateButton;\n@property (strong, nonatomic) IBOutlet UIButton *Histogrambutton;\n@property (strong, nonatomic) IBOutlet UIButton *FilterButton;\n@property (strong, nonatomic) IBOutlet UIButton *BinarizeButton;\n@property (strong, nonatomic) IBOutlet UIButton *originalButton;\n\n- (IBAction)TakePhoto:(id)sender;\n- (IBAction)Pre:(id)sender;\n- (IBAction)OCR:(id)sender;\n- (IBAction)PreRotation:(id)sender;\n- (IBAction)PreHistogram:(id)sender;\n- (IBAction)PreFilter:(id)sender;\n- (IBAction)PreBinarize:(id)sender;\n- (IBAction)returnOriginal:(id)sender;\n\n\n- (IBAction)ChooseMedia:(id)sender;\n- (UIView*)CreateOverlay;\n\n\n@end"
  },
  {
    "path": "infojobOCR/ViewController.m",
    "content": "//\n//  ViewController.m\n//  infojobOCR\n//\n//  Created by Paolo Tagliani on 08/06/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n#import \"ViewController.h\"\n#import \"ImageProcessingImplementation.h\"\n#import \"UIImage+operation.h\"\n\n\n@interface ViewController ()\n\n@end\n\n@implementation ViewController\n\n\n@synthesize takenImage;\n@synthesize process;\n@synthesize resultView;\n@synthesize imageProcessor;\n@synthesize read;\n@synthesize processedImage;\n@synthesize rotateButton;\n@synthesize Histogrambutton;\n@synthesize FilterButton;\n@synthesize BinarizeButton;\n@synthesize originalButton;\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    imageProcessor= [[ImageProcessingImplementation alloc]  init];    \n    \n\t// Do any additional setup after loading the view, typically from a nib.\n}\n\n- (void)viewDidUnload\n{\n    [self setResultView:nil];\n    [self setProcess:nil];\n    [self setRead:nil];\n    [self setRotateButton:nil];\n    [self setRotateButton:nil];\n    [self setHistogrambutton:nil];\n    [self setFilterButton:nil];\n    [self setBinarizeButton:nil];\n    [self setOriginalButton:nil];\n    [super viewDidUnload];\n    // Release any retained subviews of the main view.\n}\n\n- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation\n{\n    \n    if(interfaceOrientation == UIInterfaceOrientationPortrait) return YES;\n    else return NO;\n}\n\n- (IBAction)Pre:(id)sender {\n    \n    NSLog(@\"Dimension taken image: %f x %f\",takenImage.size.width, takenImage.size.height);\n    self.processedImage=[imageProcessor processImage:[self takenImage]];\n    self.resultView.image=[self processedImage];\n    NSLog(@\"Dimension processed image: %f x %f\",takenImage.size.width, takenImage.size.height);\n\n    \n}\n\n- (IBAction)OCR:(id)sender {\n    \n    NSString *readed=[imageProcessor OCRImage:[self processedImage]];\n    [[[UIAlertView alloc] initWithTitle:@\"\"\n                                message:[NSString stringWithFormat:@\"Recognized:\\n%@\", readed]\n                               delegate:nil\n                      cancelButtonTitle:nil\n                      otherButtonTitles:@\"OK\", nil] show];\n}\n\n- (IBAction)PreRotation:(id)sender {\n    \n    self.processedImage=[imageProcessor processRotation:[self processedImage]];\n    self.resultView.image=[self processedImage];\n}\n\n- (IBAction)PreHistogram:(id)sender {\n    \n    self.processedImage=[imageProcessor processHistogram:[self processedImage]];\n    self.resultView.image=[self processedImage];\n}\n\n- (IBAction)PreFilter:(id)sender {\n    \n    self.processedImage=[imageProcessor processFilter:[self processedImage]];\n    self.resultView.image=[self processedImage];\n}\n\n- (IBAction)PreBinarize:(id)sender {\n    \n    self.processedImage=[imageProcessor processBinarize:[self processedImage]];\n    self.resultView.image=[self processedImage];\n}\n\n- (IBAction)returnOriginal:(id)sender {\n    \n    self.processedImage=[self takenImage ];\n    self.resultView.image= [self takenImage];\n}\n                       \n                       \n- (IBAction)TakePhoto:(id)sender {\n    mediaPicker = [[UIImagePickerController alloc] init];\n    mediaPicker.delegate=self;\n    mediaPicker.allowsEditing = YES;\n    \n    if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {\n        UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:\n                                      @\"Take a photo or choose existing, and use the control to center the announce\"\n                                                                 delegate: self                                                        cancelButtonTitle:@\"Cancel\"\n                                                   destructiveButtonTitle:nil\n                                                        otherButtonTitles:@\"Take photo\", @\"Choose Existing\", nil];\n        [actionSheet showInView:self.view];\n    } else {\n        mediaPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;     \n        [self presentModalViewController:mediaPicker animated:YES];\n    }\n}\n\n- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {\n    \n    if(buttonIndex != actionSheet.cancelButtonIndex)\n    {\n        if (buttonIndex == 0) {\n            mediaPicker.sourceType = UIImagePickerControllerSourceTypeCamera;\n        } else if (buttonIndex == 1) {\n            mediaPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;\n        }\n        \n        [self presentModalViewController:mediaPicker animated:YES];\n    }\n    \n    else [self dismissModalViewControllerAnimated:YES]; \n    \n    \n}\n\n- (UIView*)CreateOverlay{\n    \n    UIView *overlay= [[UIView alloc] \n                      initWithFrame:CGRectMake\n                      (0, 0, self.view.frame.size.width, self.view.frame.size.height*0.10)];//width equal and height 15%\n    overlay.backgroundColor=[UIColor blackColor];\n    overlay.alpha=0.5;\n    \n    return overlay;\n}\n\n- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{\n    \n    [picker dismissModalViewControllerAnimated:YES];\n    \n    //I take the coordinate of the cropping\n    CGRect croppedRect=[[info objectForKey:UIImagePickerControllerCropRect] CGRectValue];\n\n    UIImage *original=[info objectForKey:UIImagePickerControllerOriginalImage];\n   \n\n    UIImage *rotatedCorrectly;\n    \n    if (original.imageOrientation!=UIImageOrientationUp)\n    rotatedCorrectly=[original rotate:original.imageOrientation];\n    else rotatedCorrectly=original;\n    \n\n    CGImageRef ref= CGImageCreateWithImageInRect(rotatedCorrectly.CGImage, croppedRect);\n    self.takenImage= [UIImage imageWithCGImage:ref];\n    self.resultView.image=[self takenImage];\n     self.processedImage=[self takenImage ];\n    process.hidden=NO;\n    BinarizeButton.hidden=NO;\n    Histogrambutton.hidden=NO;\n    FilterButton.hidden=NO;\n    rotateButton.hidden=NO;\n        self.read.hidden=NO;    \n    originalButton.hidden=NO;\n    \n}\n\n@end\n"
  },
  {
    "path": "infojobOCR/en.lproj/InfoPlist.strings",
    "content": "/* Localized versions of Info.plist keys */\n\n"
  },
  {
    "path": "infojobOCR/en.lproj/MainStoryboard.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"1.1\" toolsVersion=\"2182\" systemVersion=\"11E53\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" initialViewController=\"2\">\n    <dependencies>\n        <deployment defaultVersion=\"1296\" identifier=\"iOS\"/>\n        <development defaultVersion=\"4200\" identifier=\"xcode\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"1181\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"5\">\n            <objects>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"4\" sceneMemberID=\"firstResponder\"/>\n                <viewController id=\"2\" customClass=\"ViewController\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"20\" width=\"320\" height=\"460\"/>\n                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                        <subviews>\n                            <imageView userInteractionEnabled=\"NO\" contentMode=\"scaleAspectFit\" id=\"DJn-mc-mc5\">\n                                <rect key=\"frame\" x=\"20\" y=\"25\" width=\"280\" height=\"280\"/>\n                                <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                            </imageView>\n                            <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" id=\"l1R-Db-Ryn\">\n                                <rect key=\"frame\" x=\"20\" y=\"313\" width=\"105\" height=\"37\"/>\n                                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                <state key=\"normal\" title=\"Take photo\">\n                                    <color key=\"titleColor\" red=\"0.19607843459999999\" green=\"0.30980393290000002\" blue=\"0.52156865600000002\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                    <color key=\"titleShadowColor\" white=\"0.5\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <state key=\"highlighted\">\n                                    <color key=\"titleColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"TakePhoto:\" destination=\"2\" eventType=\"touchUpInside\" id=\"xrr-Ez-pzd\"/>\n                                </connections>\n                            </button>\n                            <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" id=\"FPW-yi-NCT\">\n                                <rect key=\"frame\" x=\"187\" y=\"313\" width=\"113\" height=\"37\"/>\n                                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                <state key=\"normal\" title=\"Pre-Process\">\n                                    <color key=\"titleColor\" red=\"0.19607843459999999\" green=\"0.30980393290000002\" blue=\"0.52156865600000002\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                    <color key=\"titleShadowColor\" white=\"0.5\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <state key=\"highlighted\">\n                                    <color key=\"titleColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"Pre:\" destination=\"2\" eventType=\"touchUpInside\" id=\"HnU-ff-Qmb\"/>\n                                </connections>\n                            </button>\n                            <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" id=\"ZVF-Md-wld\">\n                                <rect key=\"frame\" x=\"20\" y=\"403\" width=\"79\" height=\"37\"/>\n                                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                <state key=\"normal\" title=\"Read it\">\n                                    <color key=\"titleColor\" red=\"0.19607843459999999\" green=\"0.30980393290000002\" blue=\"0.52156865600000002\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                    <color key=\"titleShadowColor\" white=\"0.5\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <state key=\"highlighted\">\n                                    <color key=\"titleColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"OCR:\" destination=\"2\" eventType=\"touchUpInside\" id=\"3Lm-Fw-hyr\"/>\n                                </connections>\n                            </button>\n                            <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" id=\"d03-9w-TzN\">\n                                <rect key=\"frame\" x=\"121\" y=\"358\" width=\"86\" height=\"37\"/>\n                                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"0.09637465328\" blue=\"0.060997664930000001\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                <state key=\"normal\" title=\"Rotation\">\n                                    <color key=\"titleColor\" red=\"0.19607843459999999\" green=\"0.30980393290000002\" blue=\"0.52156865600000002\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                    <color key=\"titleShadowColor\" white=\"0.5\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <state key=\"highlighted\">\n                                    <color key=\"titleColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"PreRotation:\" destination=\"2\" eventType=\"touchUpInside\" id=\"WzA-VJ-z0c\"/>\n                                </connections>\n                            </button>\n                            <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" id=\"H8p-31-1rq\">\n                                <rect key=\"frame\" x=\"215\" y=\"358\" width=\"99\" height=\"37\"/>\n                                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"0.09637465328\" blue=\"0.060997664930000001\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                <state key=\"normal\" title=\"Histogram\">\n                                    <color key=\"titleColor\" red=\"0.19607843459999999\" green=\"0.30980393290000002\" blue=\"0.52156865600000002\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                    <color key=\"titleShadowColor\" white=\"0.5\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <state key=\"highlighted\">\n                                    <color key=\"titleColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"PreHistogram:\" destination=\"2\" eventType=\"touchUpInside\" id=\"eG1-7c-gAj\"/>\n                                </connections>\n                            </button>\n                            <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" id=\"qxT-rY-ft4\">\n                                <rect key=\"frame\" x=\"135\" y=\"397\" width=\"72\" height=\"37\"/>\n                                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"0.09637465328\" blue=\"0.060997664930000001\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                <state key=\"normal\" title=\"Filter\">\n                                    <color key=\"titleColor\" red=\"0.19607843459999999\" green=\"0.30980393290000002\" blue=\"0.52156865600000002\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                    <color key=\"titleShadowColor\" white=\"0.5\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <state key=\"highlighted\">\n                                    <color key=\"titleColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"PreFilter:\" destination=\"2\" eventType=\"touchUpInside\" id=\"YJa-Nv-7af\"/>\n                                </connections>\n                            </button>\n                            <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" id=\"dCv-38-UEb\">\n                                <rect key=\"frame\" x=\"223\" y=\"397\" width=\"83\" height=\"37\"/>\n                                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                <color key=\"backgroundColor\" red=\"1\" green=\"0.09637465328\" blue=\"0.060997664930000001\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                <state key=\"normal\" title=\"Binarize\">\n                                    <color key=\"titleColor\" red=\"0.19607843459999999\" green=\"0.30980393290000002\" blue=\"0.52156865600000002\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                    <color key=\"titleShadowColor\" white=\"0.5\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <state key=\"highlighted\">\n                                    <color key=\"titleColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"PreBinarize:\" destination=\"2\" eventType=\"touchUpInside\" id=\"WQS-ny-sh4\"/>\n                                </connections>\n                            </button>\n                            <button hidden=\"YES\" opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"roundedRect\" lineBreakMode=\"middleTruncation\" id=\"qOv-tc-3iQ\">\n                                <rect key=\"frame\" x=\"23\" y=\"358\" width=\"81\" height=\"37\"/>\n                                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"15\"/>\n                                <state key=\"normal\" title=\"Original\">\n                                    <color key=\"titleColor\" red=\"0.19607843459999999\" green=\"0.30980393290000002\" blue=\"0.52156865600000002\" alpha=\"1\" colorSpace=\"calibratedRGB\"/>\n                                    <color key=\"titleShadowColor\" white=\"0.5\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <state key=\"highlighted\">\n                                    <color key=\"titleColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                </state>\n                                <connections>\n                                    <action selector=\"returnOriginal:\" destination=\"2\" eventType=\"touchUpInside\" id=\"pd0-wK-hvr\"/>\n                                </connections>\n                            </button>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"calibratedWhite\"/>\n                    </view>\n                    <connections>\n                        <outlet property=\"BinarizeButton\" destination=\"dCv-38-UEb\" id=\"WBB-SG-vWy\"/>\n                        <outlet property=\"FilterButton\" destination=\"qxT-rY-ft4\" id=\"q2v-fJ-v0A\"/>\n                        <outlet property=\"Histogrambutton\" destination=\"H8p-31-1rq\" id=\"Cin-GV-ju7\"/>\n                        <outlet property=\"originalButton\" destination=\"qOv-tc-3iQ\" id=\"pw5-6T-qMX\"/>\n                        <outlet property=\"process\" destination=\"FPW-yi-NCT\" id=\"HBt-yk-RDl\"/>\n                        <outlet property=\"read\" destination=\"ZVF-Md-wld\" id=\"rws-zp-ZZL\"/>\n                        <outlet property=\"resultView\" destination=\"DJn-mc-mc5\" id=\"yb8-Ls-uAK\"/>\n                        <outlet property=\"rotateButton\" destination=\"d03-9w-TzN\" id=\"mFL-p3-0b5\"/>\n                    </connections>\n                </viewController>\n            </objects>\n            <point key=\"canvasLocation\" x=\"-221\" y=\"-3\"/>\n        </scene>\n    </scenes>\n    <simulatedMetricsContainer key=\"defaultSimulatedMetrics\">\n        <simulatedStatusBarMetrics key=\"statusBar\"/>\n        <simulatedOrientationMetrics key=\"orientation\"/>\n        <simulatedScreenMetrics key=\"destination\"/>\n    </simulatedMetricsContainer>\n</document>"
  },
  {
    "path": "infojobOCR/main.m",
    "content": "//\n//  main.m\n//  infojobOCR\n//\n//  Created by Paolo Tagliani on 08/06/12.\n//  Copyright (c) 2012 26775. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n#import \"AppDelegate.h\"\n\nint main(int argc, char *argv[])\n{\n    @autoreleasepool {\n        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));\n    }\n}\n"
  }
]