This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Optimally resize `img` according to the bounding boxes specified in `boxes` (which is simply the (pruned) results from `pytesseract.image_to_data()`). | |
#Tesseract performs optimally when capital letters are ~32px tall (https://groups.google.com/g/tesseract-ocr/c/Wdh_JJwnw94/m/24JHDYQbBQAJ). Smaller text obviously can't be OCR'd as accurately, but weirdly enough, larger text causes problems as well. So, this function uses the bounding boxes we've found and resizes the image so that the median line height should be ~32px. | |
def optimal_resize(img, boxes): | |
median_height = np.median(boxes["height"]) | |
target_height = 32 #See https://groups.google.com/g/tesseract-ocr/c/Wdh_JJwnw94/m/24JHDYQbBQAJ | |
scale_factor = target_height / median_height | |
print("Scale factor: " + str(scale_factor)) | |
#If the image is already within `skip_percentage` percent of the target size, just return the original image (it's better to skip resizing if we can) | |
skip_percentage = 0.07 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lcu_driver import Connector | |
import requests, webbrowser, psutil, asyncio, re | |
# This will automatically open porofessor & League of Graphs in champ select. | |
# -- ALSO -- | |
# This will poll the League In-Game API, and watch the GameFlow sockets | |
# to automatically end the process of your game when the game ends. | |
### Comment out as you see fit! | |
## However: I still think using autohotkey to just kill the process with a key | |
## press is better... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For a more organised and more update list please visit https://github.com/RayZz-/LCU-Arguments | |
This list will no longer be updated please refer to the repo linked above | |
These are known command line arguments for the LCU(including helper) some maybe outdated | |
or overtime may become outdated or some information maybe incorrect | |
if you would like to contribute please comment with updated information. | |
Usage example: | |
--app-name=kappa |