Skip to main content

超级简单的微信 OCR - 一行代码识别图片文字 | Super simple WeChat OCR

Project description

wx-ocr

一行代码识别图片文字,无需安装微信

安装

pip install wx-ocr

使用

Python API

from wx_ocr import ocr

# 识别图片
texts = ocr("image.png", return_text_only=True)
print(texts)  # ['文字1', '文字2', ...]

# 获取完整结果(包含位置信息)
result = ocr("image.png")
for item in result['ocrResult']:
    print(item['text'], item['location'])

# 批量识别
from wx_ocr import ocr_batch
results = ocr_batch(["1.png", "2.png", "3.png"], return_text_only=True)

命令行

# 识别图片
wx-ocr image.png

# JSON 格式输出
wx-ocr --format json image.png

# 批量处理
wx-ocr *.png

# 保存结果
wx-ocr --save --output results/ image.png

说明

  • 仅支持 Windows
  • 需要 Python 3.8+
  • 无需安装微信(项目自带 OCR 文件)
  • 基于 wechat_ocr 开发

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wx_ocr-0.1.6.tar.gz (70.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wx_ocr-0.1.6-py3-none-any.whl (35.4 MB view details)

Uploaded Python 3

File details

Details for the file wx_ocr-0.1.6.tar.gz.

File metadata

  • Download URL: wx_ocr-0.1.6.tar.gz
  • Upload date:
  • Size: 70.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for wx_ocr-0.1.6.tar.gz
Algorithm Hash digest
SHA256 c9eb6c5ebceb35298eeea39d4286f254083cbb2e59af5873fa6a4a920709a794
MD5 4d443e484aaf94d97826f3855c23954c
BLAKE2b-256 00960ed32d4bb0572011e9f3c2384ec2afc68601951f0c85c7e90e5d2728fc89

See more details on using hashes here.

File details

Details for the file wx_ocr-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: wx_ocr-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 35.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for wx_ocr-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 16066b0701b5a4d89d3291693fcb3d393638a3bc92a8b782e1ca484da56597fe
MD5 56b2c2b8fc07d00c2c9776ea95c8246d
BLAKE2b-256 1ba13c5acb5685d279c0164a1c918dc27cbffae3f0bda1f7ca8d2df816c1f5ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page