Giter VIP home page Giter VIP logo

cursor-imager-di's Introduction

cursor-imager-di

A tool to draw images using your mouse! Compatible with both Windows and Linux. On Windows you can choose to use DirectInput (more stable and should work in games) or not. On Linux xdotool is used to control the mouse.

Uses CustomTkinter for a fancy GUI.

Table of contents

Screenshots

Graphical Interface

Interface

Test Image

Creator: TomSka

Test Image

Results

Results

Functionality and how it works

Any generic image can be loaded, to which, if desired, edge detection is performed, so only lines and not regions are drawn. After that a path finding algorithm finds a connected path throughout the entire image. (Or multiple connected paths). Then with the press of a selectable hotkey your mouse will be controlled according to the processed image, and will hopefully draw something resembling the input image.

After starting the python script you'll be greeted with a Graphical Interace allowing you to change some settings. Those include things such as:

  • Edge detection
  • Speed of cursor movement
  • Parameters for controlling the Path-Finding-Algorithm
  • ...

The default parameters are fine in most cases. For most images enabling Edge Detection is preferrable.

Installation

This program works both on Windows and Linux. Python 3 is required to be installed on your system. (Tested with Python 3.8.10)

Python Download

Linux installation

(Tested on Linux Mint 20.3)

System Dependencies:

  • xdotool is needed for moving the mouse
  • xclip is needed for loading images from clipboard
  • python3-tk for tkinter support

โฎ• install on debian based systems with sudo apt install xdotool xclip python3-tk

git clone https://github.com/fabyr/cursor-imager-di.git
cd cursor-imager-di
python3 -m venv env
source env/bin/activate
python -m pip install -r requirements.txt

python gui.py

Windows installation

Download this repository and extract it to a folder. Open command prompt (cmd.exe) in that directory. One way to do this is to press Windows Key + R and type cmd.exe and then OK.

To navigate to said folder type

C:
cd C:\Path\To\Extracted\Folder

(If on another drive other than C, use that drive letter instead)

Then, setup the environment as follows:

python -m venv env
env\Scripts\activate
python -m pip install -r requirements.txt
python -m pip install -r windows_requirements.txt

Start the program using python gui.py.

For conveniance a batch file can be created to automatically start it without the need to enter the virtual python environment manually every time:

call env\Scripts\activate
python gui.py

Motivation

I am inherently bad at drawing with a mouse, so to impress some people in VRChat I got the idea to develop this program.

I wanna apologize to anyone who actually thought i am a good artist. But with a huge crowd around me it's hard to bring up an explanation >.<

cursor-imager-di's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.