Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 1.67 KB

README.md

File metadata and controls

45 lines (26 loc) · 1.67 KB

Image Winner Detection with HSV Masking and OCR

A simple Computer Vision project which determines the winner of a Bedwars game.

This project uses OpenCV and EasyOCR to detect the winner in an image based on HSV color masking and Optical Character Recognition (OCR). The script processes an image, identifies regions of interest based on color ranges, and extracts text to determine the winner.

Features

HSV Masking: Utilizes HSV color space to create masks for specific color ranges.

Optical Character Recognition: Uses EasyOCR to read text from the masked regions.

Winner Detection: Determines the winner based on predefined criteria in the extracted text.

Handling various image sizes: Able to handle all types of screenshots of varying resolutions and smartly resizes the image based to focus on the scorecard.

Top Killer detection will be added soon.

Command Line Usage

python ocr.py (path to image) (show)

show: If True, displays the detected output with bounding boxes and the mask.

Examples

Original Image

Image2

Detected Image

image

Image Mask

The Mask filters out all unnecessary information and OCR detection is performed on this mask

image

Win Output

Screenshot 2024-06-15 162926

Discord

wxua