Skip to content

Commit

Permalink
Update README and clean a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinChauvin committed Oct 15, 2024
1 parent 184a696 commit 1454378
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 88 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
# DemOCRatos - OCR for the people

![version](https://img.shields.io/badge/Version-0.1-yellow)
![version](https://img.shields.io/badge/Version-1.0-yellow)
![ubuntu 22.04](https://img.shields.io/badge/Ubuntu%2022.04-Kinda%20working-green)
![license](https://img.shields.io/badge/License-Apache%202.0-blue)

<div align="center">
<img src="assets/logo_high.png" width=400 />
<img src="assets/logo_high.png" width=300 />
</div>

Attempting to read portions of a screen or a video and exporting its data in a CSV file.

> *Blazingly slow, but it kinda works*
**Contents:**
<!-- **Contents:** -->
## Contents

1. [Features](#features)
2. [Install](#install)
3. [Run](#run)
4. [Notes](#notes)
5. [Dependencies](#dependencies)

<div align="center">
<a href="https://vimeo.com/1019582159" target="_blank">
<img src="assets/video_preview.jpg" />
</a>
</div>

## Features

- Real time recognitions of numbers of the screen.
Expand Down Expand Up @@ -80,11 +87,11 @@ This work is merely a wrapper and a graphical interface for some already existin
- [Tesserocr](https://github.com/sirfz/tesserocr) (MIT license): Python wrapper for Tesseract.
- [EasyOCR](https://github.com/JaidedAI/EasyOCR) (Apache 2.0): another OCR API.

## TODO
## TODO (maybe one day)

- [x] Loading and processing videos
- [x] Saving/loading configuration
- [x] Multi threading, for less blazing slowness
- [ ] Make it easier to add new OCR methods, and documenting it
- [ ] Logging not only in the Python terminal, but also in the logging text box
- [x] Logging not only in the Python terminal, but also in the logging text box
- [ ] Real time graphing
3 changes: 3 additions & 0 deletions assets/video_preview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/video_preview.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 0 additions & 77 deletions display_output.py

This file was deleted.

7 changes: 2 additions & 5 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import customtkinter as ctk
import tkinter as tk
import mss
from PIL import Image, ImageGrab, ImageTk
from PIL import ImageGrab, ImageTk
import numpy as np
import json
from enum import Enum
Expand Down Expand Up @@ -598,7 +598,7 @@ def __set_max_threads(*_):
self._fps_settings_txt = ctk.CTkLabel(self._settings_view, text="FPS")
self._fps_settings_menu = ctk.CTkOptionMenu(
self._settings_view,
values=["0.1", "0.2", "1", "5", "10", "25"],
values=["0.1", "0.2", "1", "5", "10", "25", "50"],
command=__update_fps,
)
self._ocr_settings_txt = ctk.CTkLabel(self._settings_view, text="OCR method")
Expand Down Expand Up @@ -673,9 +673,6 @@ def __schedule_next_loop():
__schedule_next_loop()
return

screen_img = Image.frombytes(
"RGB", screen_img.size, screen_img.bgra, "raw", "BGRX"
)
screen_img = np.array(screen_img)[:, :, :3]
else:
screen_img = self._video_processor.get_preview_frame()
Expand Down
1 change: 0 additions & 1 deletion output/output.csv

This file was deleted.

0 comments on commit 1454378

Please sign in to comment.