Giter VIP home page Giter VIP logo

league-ocr-hud's Introduction

League OCR HUD

About

This program creates and updates several .txt files with the latest game state data available, including tower kills, gold, timers etc. These files can then be used in OBS or vMix to update a HUD graphic.

It takes as much data as possible from the League Game Client API, and supplements that with Optical Character Recognition (OCR) using Google's Cloud Vision API.

Right now, the available data is as follows:

  • gametime
  • left_towers, right_towers
  • left_kills, right_kills
  • left_gold, right_gold
  • left_drakes, right_drakes
  • left_heralds, right_heralds
  • baron_timer
  • drake_timer

The output filenames are the above values plus .txt.

Support Requests

If you're struggling to setup this program and want professional installation or are looking to get the program further developed, I'm available for hire. Please contact me at [email protected]

Prerequisites

  • Windows 10 64-bit
  • NDI x64 Runtime 4 or newer
  • A Cloud Vision API account with billing enabled and a JSON credentials file (follow the Cloud Vision API quickstart until you get the file)
  • League of Legends on the production PC

Installation

Option 1: From Release (recommended)

Download and unzip the latest release

Option 2: From Source

  1. Install Node.js >=15, Python 3, C++ Redistributable for x64
  2. Clone this repo to somewhere to your production PC
  3. Install dependencies: npm i --production

Usage

  1. Open a dedicated NDI output for the game feed (it must be 1920x1080)
  2. Copy the CV private key JSON file into the project directory and rename it to CV.keys.json
  3. Copy config.example.json to config.json and edit ndiFeed to match your game feed name
  4. Run the executable if present or run npm start
  5. Start spectating a game in League and the output files should populate

Future plans

  • Improve reliability of NDI receiver
  • Support resolutions other than 1920x1080 for the NDI feed
  • Improve logging and error reporting
  • See if OCR processing time can be improved
  • Write some kind of tests

league-ocr-hud's People

Contributors

dan-shields avatar fill30 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

league-ocr-hud's Issues

2 pc set up

I can't figure it out how can I use on my set up I have 2 pc streaming set up.

how can I do this? how can I output the .txt files to my streaming pc

Right side issues due to voidgrubs' score HUD update ?

Hi !
I have the same kind of issues concerning the right team golds count and drake / nash timers so i commented this issue instead of creating a new one.
As i understood that's an ia model reading the hud to write into files. Looks like the HUD has been modified by Riot recently and in the right side the tower count seems to be very close to the gold count. It may cause that the actuel model is maybe 'outdated' ?
I took some screenshots of these cases, note that these errors are intermittents but occurs more often when the gold count is > 9K.

Nash and Drake timers are not filled.
HUD BUG 4
Gold count missing the tens
BUG HUD 2
BUG HUD 3
BUG HUD 1

Have a good day !

Originally posted by @MathieuNeveu in #7 (comment)

Support Latest LOL Spectator HUD?

Hello, I've been testing your program and I don't think it works/supports the latest update of the LOL Spectator HUD where they've changed the top HUD, by adding drake counters for each team. Screenshot below of the newest spectator HUD.

NDI XPE-HOST-05 (Display1) 11 April 2022 19-57-13

I need a tutorial

good directly from Brazil! I wanted to make a request, I want to ask for a tutorial because some translations don't come out the right way and I'm doing something wrong when running the cmd and starting to capture the data in real time, if you could please record your screen doing it so that we can here from Brazil we could understand how to do this installation correctly, thank you in advance for your attention and any help is welcome.

Score Display

someone told me I'm supposed to leave score display on ingame but if I leave it on I can't use custom overlay since score display is huge. so I turn off score display and use data to custom overlay in obs but if I turn off the score display I can't see the score ingame as spectator as for me it's not bother me but if I want to invite caster they can't see since I'm using discord to share my gaming pc screen to caster. I just want to know score display supposed to off for you too or anybody else and I couldn't get to work so I download the executable version and it work

Bug No matching constructor overloading was found

Hello,
I have this return when i lauch the .after after config :

Find status is 1.
Destroying find carrier.
Completing some receive creation work.
Error: No matching constructor overloading was found. Please see the docs for how to call the Jimp constructor.
    at Jimp.throwError (C:\Users\bonne\AppData\Local\Temp\caxa\applications\LeagueOCRHud\fz1nee6nmx\0\node_modules\@jimp\utils\dist\index.js:33:13)
    at new Jimp (C:\Users\bonne\AppData\Local\Temp\caxa\applications\LeagueOCRHud\fz1nee6nmx\0\node_modules\@jimp\core\dist\index.js:412:85)
    at NDI.<anonymous> (file:///C:/Users/bonne/AppData/Local/Temp/caxa/applications/LeagueOCRHud/fz1nee6nmx/0/src/index.js:156:13)
    at NDI.emit (node:events:527:28)
    at Worker.<anonymous> (file:///C:/Users/bonne/AppData/Local/Temp/caxa/applications/LeagueOCRHud/fz1nee6nmx/0/src/ndi.js:12:22)
    at Worker.emit (node:events:527:28)
    at MessagePort.<anonymous> (node:internal/worker:232:53)
    at MessagePort.[nodejs.internal.kHybridDispatch] (node:internal/event_target:643:20)
    at MessagePort.exports.emitMessage (node:internal/per_context/messageport:23:28) {
  methodName: 'constructor'
}

Do you have any solution please ?

baron, dragon timer, left_gold, right_gold

left_gold, right_gold
baron_timer
drake_timer

.txt file not creating only creating gametimer.txt, left_kills.txt, left_towers.txt, right_kills.txt, right_towers.txt

I used executable version

gold not working....

maybe it's league? I don't know everything working fine and i just test now when I finished make the overlay and the gold doesn't show everything else work. baron, drake, gametime, kills, towers,...

Blocked at step 3

Hi bro! i want to thank you first for your awesome work, you did a great job really!
I'm excited to edit my owne HUD but im blocked at step 3, i got my API Key but i don't know how to use it, can you please explaine more? or did a video "how to" from A to Z ?

By the way i found your project on Twitter :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.