https://github.com/claby2/mouse-track
Track, display, and graph the position of a mouse cursor.
https://github.com/claby2/mouse-track
c cpp matplotlib numpy python sdl2 windows
Last synced: 10 months ago
JSON representation
Track, display, and graph the position of a mouse cursor.
- Host: GitHub
- URL: https://github.com/claby2/mouse-track
- Owner: claby2
- License: mit
- Created: 2020-06-19T02:33:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-22T02:12:47.000Z (over 5 years ago)
- Last Synced: 2025-02-12T19:47:58.093Z (12 months ago)
- Topics: c, cpp, matplotlib, numpy, python, sdl2, windows
- Language: C
- Homepage:
- Size: 172 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mouse Track 🖱
Track, display, and graph the position of a mouse cursor.
The application produces a heatmap and plots the mouse positions. Mouse Track is only available for Windows OS as it requires functions from the Windows API.
## Getting Started
### Prerequisites
Python:
```
numpy==1.16.2
matplotlib==3.0.3
```
C++:
```
SDL2
```
### Installing
* Install NumPy: `pip install numpy`
* Install Matplotlib: `pip install matplotlib`
* Install [SDL2](http://libsdl.org/download-2.0.php)
## Usage
1. Clone, compile, and run:
```
$ git clone https://github.com/claby2/mouse-track.git
$ cd mouse-track
$ cd src
$ make run
```
2. Move your mouse around your screen while the window is open.
3. To end the capture, close the window.
- Positions of mouse are written into `data.csv` in root folder
- BMP heatmap is written into `heatmap.bmp` in root folder
4. Plot mouse positions based on `data.csv`:
```
$ python graph.py
```
### Record heatmap without writing into data.csv
To run the application without writing into data.csv (for longer periods of tracking):
1. In src: `make main`
2. `source.exe --nosave`
### Playback mouse movements based on data.csv
1. In src: `make playback`
### Save graph as image
- Graph will be saved as `graph.png` in root folder
## Examples
### Playback

### Heatmap

### Graph