在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):scott0123/Tesseract-macOS开源软件地址(OpenSource Url):https://github.com/scott0123/Tesseract-macOS开源编程语言(OpenSource Language):Objective-C 56.6%开源软件介绍(OpenSource Introduction):Tesseract macOSThis is an open-source macOS-based Objective-C wrapper for the OCR library Tesseract. You can also use this in Swift, instructions below. Fork this repo if you want to experiment with it. OverviewThe wrapper consists of just the following files
Demo ApplicationFor those of you who wish to first test out the OCR capabilities, the included First build the Xcode project included in this repository. This will generate an application through wish you can take a screenshot, as shown in the following gif. In the Xcode log you will find the corresponding text Tesseract detected for this screenshot. Getting StartedGetting this to work in your own project
Example UsageAt the top of the file include the header file
And then
will initiallize the class SLTesseract. (optional) (optional) (optional) Finally, assuming you already have the image that you wish to perform OCR on in NSImage form, you can call
to recognize the image in question and get the corresponding text. Usage in SwiftThis library can be easily imported in a Swift project. Just replicate all the steps above. When adding .h and .mm files you will be prompted by Xcode to add a Bridging Header (if don't have one already). Xcode will generate a file named Add this line to the Bridging Header:
Initialize like this:
(optional) (optional) (optional) Finally perform OCR by doing this:
DependenciesThe libraries below are all included in the
Additionally LicenseMy project Tesseract macOS itself is distributed under the MIT license (see LICENSE); Keep in mind that the main dependency Tesseract is distributed under the Apache 2.0 license. ContactOpen an issue if you want something fixed. You may reach me at Used by |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论