r/Python • u/Nekose • May 11 '20
I Made This Thanks to everyone’s advice, my mouse drawing algorithm has gotten much better and faster!
5.5k
Upvotes
r/Python • u/Nekose • May 11 '20
298
u/Nekose May 11 '20
https://github.com/Nekose/Mouseomate if anyone wants to take it for a spin. Lemme know if you run into any issues.
1.3k
u/TheBlackCat13 May 12 '20
I hate to break it to you but that looks nothing like a mouse.
47
u/SushiWithoutSushi May 11 '20
Wow! Looks incredible!
How did you bypass the speed limitations that you commented in the last post?
119
u/jadams70 May 12 '20
You're telling me you can program that, but you can't record your own screen ?
14
u/pooyashams May 11 '20
so what has changed that your program has become so much faster? did you just speed up mouse or there are some changes in the algorithm?
4
u/pa167k May 12 '20
https://imgur.com/a/KIW3eWc
11
u/Proxximite May 12 '20
I made a program just like this. I used pyautogui to simulate mouse actions and PIL for image data.
2
u/cfucker006 May 12 '20
Great job, OP! I for one am seriously impressed!
208
u/Maruaz May 11 '20
Cries in ‘Hello World’
6
u/01123581321AhFuckIt May 12 '20
Now add machine learning and have it draw police sketches based on descriptions suspects’ appearances.
8
u/pizzab0ner May 12 '20
Every day we grow closer to iRobot becoming a reality
7
u/[deleted] May 11 '20
DAMN
1
u/[deleted] May 12 '20
"dickbutt.jpg"
1
u/chmod--777 May 12 '20
This would be so funny to use in some online Pictionary game or something
1
u/caltitan May 12 '20
How did you code this? I wanna get into python and this is really cool
1
u/acharyarupak391 May 12 '20
how do yo decide which pixel to draw(or which pixel to be black) when converting image to b/w, if you can tell?
1
u/F_Artist i don't write code, i write bugs May 12 '20
should have gone with the dickbutt.jpg
1
u/insta7flo May 12 '20
Can you share the code for this
1
u/[deleted] May 12 '20
Looks nice, I hope you don't mind me taking inspiration from this. Its looks fun to make.
3
u/AntikaTitanik May 11 '20
Cool job mate. I will definitely check it out
3
u/BarazutoBuddha May 12 '20
This is amazing. Definitely going to use it to entertain my nephew.
3
u/coll_ryan May 12 '20
I don't get how someone can be able to make a program to draw the Mona Lisa yet not know how to take a proper screen recording.
Looks real good though 👍
1
u/ximenabc May 11 '20
It’s amazing, I don’t have Paint, do you recommend some other app where I can “run it”?
2
u/princesprofile May 11 '20
This is AWESOME!
2
u/neutrinoPoints May 12 '20
Damn I really wanna know how I can make something like that! Amazing!
2
u/smokecat20 May 12 '20
Keylogger spyware hate this one trick.
2
u/pa167k May 12 '20
Just tried it, working good!
2
u/cphase May 12 '20
this would be so funny if it worked on those pictionary online games
2
u/Sassolinoh_ May 12 '20
Now i can be good at skribbl.io
2
u/AlSweigart Author of "Automate the Boring Stuff" May 12 '20
Next, optimize it even more by using the flood fill algorithm to find the contiguous areas of an image and then a sort of bridges-of-konigsberg graph algorithm to determine how you can move through them with the fewest mouse moves. :)
2
u/i4mn30 May 16 '20
HOLY SHIT dude I'm just...
I got no words.
Mad respect!
2
u/kyyv77 May 11 '20
Nice
1
u/Transisting May 12 '20
Wow. Just wow.
1
u/akalama May 12 '20
Great work
1
u/diamondketo May 12 '20
Can you add multiple drawers one for each core?
This is going to be more involved since you need to figure out how to have multiple cursors.
1
u/iain448 May 12 '20
That was Internet Porn back in 1995
1
u/69shaolin69 May 12 '20
Nice job.
1
u/fabriciodn May 12 '20
why algorithm? Link please.
1
u/haCkFaSe May 12 '20
Check out Screen2Gif for recording.
1
u/Zenith_N May 12 '20
Source code
1
u/boundlesslights May 12 '20
Now do it in Kid Pix with the wacky random brush
1
u/mrschnr May 12 '20
Nice job mate. I got a challenge for you. Try to paint the dots using layers from lighter to darker image parts. You make the base and after you dusk. Probably it may need to duplicate original image and apply different filters to get the layers. The another part is painting these different images on the same map space. If you do this, you may be able also to use CMYK colors and get serigraphy effect. I think it may be look more like painting than downloading as guys said.
1
u/ciroluiro May 12 '20
This is the first time I see this project. It's amazingly cool!
It perfectly captures the types of projects that I always wanted to do once I learned python. I now know (some) python, but the inspiration hasn't come back yet...
1
u/theglaso May 12 '20
cool. that speed is awsome
1
u/ItsJustZiki May 12 '20
Is the original image you used also black and white?
1
u/mrObelixfromgaul May 12 '20
Source?
1
u/flipcoder May 12 '20
This is so cool. I never would have thought to do something like this. Nice work.
1
u/bu22dee May 12 '20
Can we see your mouse?
1
u/_Memeposter May 12 '20
This looks amazing! Can you give a short explanation of how you did it, Libaries used and the raw outline? I think I could learn a lot by coding something likte this myself.
1
u/[deleted] May 12 '20
Nice. Do you have a version that draws not top-down rather more randomized? I don’t look at your code but something like popping randomized point from all points draw it and repeat?
1
u/[deleted] May 12 '20 edited Aug 30 '24
cagey desert money glorious mysterious zonked impolite slimy one aback
This post was mass deleted and anonymized with Redact
1
u/[deleted] May 12 '20
It’s almost 2 am and the first thing that pops in to my head: haha mouse go zoom
1
u/dddanmar May 12 '20
Tested on Ubuntu, apart from changing the slash to the image directory it worked perfectly!
1
u/the-berik May 12 '20
Python Matrix printer
1
u/chris-fry May 12 '20
You gotta do that at work and once it’s done just start manually clicking in a few places as people walk past
1
u/Prexeon May 12 '20
r/oddlysatisfying
1
u/[deleted] May 12 '20
Wow. Fucking impressive.
1
u/cHILLPill_98 May 12 '20
this is insane dude, well done
1
u/mrObelixfromgaul May 12 '20
Could you share your code? Or a link to git?
1
u/ryrychan May 12 '20
This is lit af
1
u/Drippyer May 12 '20
Definitely going to give this a look to see if it can be manipulated to work for something like skribbl.io by adding color options.
Thanks for the foundation!
1
u/bobwonderland May 12 '20
Nice. Why did u chose to invert the image in the code, i dont get it?
1
u/[deleted] May 12 '20
Now make it kinda random, so the video looks like you drew it manually
1
u/Khel_Hellaman May 12 '20 edited May 12 '20
Can you please help me to set it up using Pycharm?
1
u/knusted May 12 '20
Could share the code? Great job!
1
u/juanda2 May 12 '20
I created something similar that supports vector graphics to make it faster and uses colors on a Webex board or app: cs.co/drawit3 for those interested.
1
u/pbsds May 12 '20
I remembers a few years back using this autoit3 script that did the same. It had a few different drawing modes. One made the mouse traverse randomly until the whole image was finished.
1
u/arthur_olga May 12 '20
That would be dope for Gartic
1
u/MasterSama May 12 '20
beautifully done :)
would you share the code ?
1
u/rlewis2019 May 12 '20
dot matrix printing
1
u/danielmanka May 13 '20
Wow that’s cool
1
u/tylercoder May 13 '20
Good job op, now you need an AI to generate memes
1
u/py2411997 May 13 '20
source code please
0
u/[deleted] May 12 '20
HOW
I'm learning how to add one list to the other...
-3
u/Redneckhippiekyle May 11 '20
No Epstein?
-3
u/[deleted] May 12 '20
It's cool. Now what's the point of it?
0
u/[deleted] May 12 '20
[deleted] — view deleted comment
0
u/[deleted] May 11 '20
[deleted] — view deleted comment