Skip to content

Using UWP API Windows.Media.Ocr as an executable command line tool

License

Notifications You must be signed in to change notification settings

yulanshan/Windows.Media.Ocr.Cli

 
 

Repository files navigation

Ocr 命令行工具, 本地调用 UWP API Windows.Media.Ocr 支持多种语言识别。

使用

下载

https://github.com/zh-h/Windows.Media.Ocr.Cli/releases

命令行执行

PS C:\Tools>Windows.Media.Ocr.Cli.exe .\x.png
9·哪位科学家发现了电磁感应现象?

x-out.png

查看帮助

PS C:\Tools>Windows.Media.Ocr.Cli.exe -h
Usage: Windows.Media.Ocr.Cli.exe [options...] <image file path>
Example: Windows.Media.Ocr.Cli.exe x.png
-l      <language>  Default:zh-Hans-CN   Specify language to reconizing
-s      Show all supported languages
-h      Show help like this

运行依赖

  1. 需要 Windows 10 系统,其他平台没有测试,理论上可以支持所有支持 UWP 的设备,包括 Xbox 甚至安装 Windows 10 IoT 的树莓派,不太了解 Xamarin 能不能引入 UWP 的 runtime,如果能引入 UWP 就可以用在 iOS 和 Android 平台。

功能

  • 文字识别
  • 输出图片显示文字区域方块
  • 提供提高对比参数(有时后明明图片很清晰,但是不调高对比度什么文字都没识别)

参考

  • Get Started With Optical Character Recognition with the OCR Library for Windows Runtime
    Get Started With Optical Character Recognition with the OCR Library for Windows Runtime

声明

仅供学习参考,请勿用于服务器端生产环境。

请遵守微软 Windows Runtime 使用协议 MICROSOFT OCR LIBRARY FOR WINDOWS RUNTIME

distribute Distributable Code to run on a platform other than the Windows Store or Windows Phone;

About

Using UWP API Windows.Media.Ocr as an executable command line tool

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%