OBS plugin for Overwatch enemy detection using OpenCV and CUDA.
At 120 FPS, the total delay between mouse movement recognized by the system (DirectInput) and new enemy positions recognized by the plugin ranges between 1.3 and 14.4 ms.
This is a hobby. I write cheats for games once every few years.
Usually, there are two types of cheats.
Internal - when the game process is hooked and executes your code.
An example for CS:GO can be found here.
External - when the game memory is read by an external process.
An example for Overwatch that uses a system driver can be found
here.
There are ways to detect both approaches, even if anti-cheat software fails to do so.
This project falls into a separate category that uses image processing to detect enemies on the screen and external hardware that simulates a mouse for input.
Detecting this solution without limiting the use of legitimate software like OBS is much harder and nobody has done this yet.
Short summary of what this plugin does.
Registers itself as a filter plygin in OBS and receives captured frames.
Converts each frame to the HSV colorspace.
Searches for colors that match enemy outlines and copies the data to system memory.
Uses CUDA to mask and remove pixels that are likely player names, special effects, etc.
Uses OpenCV to detect the remaining outlines as contours.
Groups contours that likely belong to the same target.
Creates convex hulls as target representations.
Uses CUDA to reduce the hull shape until it roughly matches the outlines.
Creates polygons as target representations.
Hitscan characters with a narrow weapon spread use target polygons.
Hitscan characters with a wide weapon spread use target hulls.
This is a simple demo and many things can be improved. The following features will be added in the future when I have time.
This software is fully compliant with German law.
No reverse enginering, inspection or modification of commercial software was performed during the development and operation of the software.
The published code only demonstrates methods and possibilities of high performance, low latency image recognition. The mouse input injection code is private and won't be released.
This software cannot be used to gain an unfair advantage in a competitive game.
This project will be deleted if I move to a different jurisdiction.
This repository exists for demonstration purposes only. Build instructions are for the author's convenience.