Skip to main content

Extract your Arcaea play result from screenshot.

Project description

Arcaea Offline OCR

Example

from arcaea_offline_ocr.device.v2.rois import DeviceV2AutoRois
from arcaea_offline_ocr.device.v2.ocr import DeviceV2Ocr
from arcaea_offline_ocr.sift_db import SIFTDatabase
from arcaea_offline_ocr.utils import imread_unicode
import cv2

knn_model = cv2.ml.KNearest_load(r'/path/to/knn/model')
sift_db = SIFTDatabase(r'/path/to/sift/database.db')

rois = DeviceV2AutoRois(imread_unicode(r'/path/to/your/screenshot.jpg'))  # any format that opencv-python supports
ocr = DeviceV2Ocr(knn_model, sift_db)
result = ocr.ocr(rois)
print(result)
$ python example.py
DeviceOcrResult(rating_class=2, pure=1371, far=62, lost=34, score=9558078, max_recall=330, song_id='abstrusedilemma', title=None, clear_type=None)

Credits

283375/image-sift-database

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

arcaea-offline-ocr-0.0.95.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

arcaea_offline_ocr-0.0.95-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file arcaea-offline-ocr-0.0.95.tar.gz.

File metadata

  • Download URL: arcaea-offline-ocr-0.0.95.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for arcaea-offline-ocr-0.0.95.tar.gz
Algorithm Hash digest
SHA256 ba3dd99003a82bc10741f959bb3741094a31e9baaa809c0180b53557c6e3f4eb
MD5 bb27761f3fba555adb40162675f82dd1
BLAKE2b-256 b7c5e283978ee0b5e07d4686dad042a06442dbf0814e87b86701b4c2cfae32b6

See more details on using hashes here.

File details

Details for the file arcaea_offline_ocr-0.0.95-py3-none-any.whl.

File metadata

File hashes

Hashes for arcaea_offline_ocr-0.0.95-py3-none-any.whl
Algorithm Hash digest
SHA256 31284d230e35bc68694551988caa4ab95ed83fcc271d24e57c08a1f07640cb35
MD5 2ff9e8b37f112901dbfd6ecdbcbbf124
BLAKE2b-256 dbc1aa97fac6dbd1672be7f6c69757cbeecbc3a3299ff628c590b76ba8b647a8

See more details on using hashes here.

Supported by

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