目录
目录README.md

OCRHelper

A Basic helper to aply Optical Character Recognition process to an image to get the text.

This package is compatible with MacOS, TvOS, iOS, ipadOS and WatchOS.

How to use

This package only have the class OCRHelper.

How to get the supported languages

let languages: [String] = OCRHelper.supportedLanguages

Note: if the array is empty the recognition system is not allowed.

How to get text from an image

There are functions for CGImage, UIImage and NSImage formats.

let myImage = // type your code here to get an image
OCRHelper.recognice(cgImage: myImage, 
    languages: ["es-es", "en-us"],
    level: .accurate,
    completed: { result, error in
    guard let result = result else { return }
    for item in result {
        print(item)
    }
})

Note: The params language and level are optionals.

Author

This package was developed by Jonathan Chacón .

Please, if you have any question or suggestion you can contact me at Tyflos Accessible Software web site.

Contributing

Pull requests are welcome. Feel free to create pull requests for any kind of improvements, bug fixes or enhancements. For major changes, please open an issue first to discuss what you would like to change.

License

This software was published under the MIT license

关于
34.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号