Click here to Skip to main content
15,881,413 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have no background in programming, in the past I was interested in C as well as made a calculator using pascal if I remember correctly, but that was many years ago and I do not remember anything anymore.

I would like to learn how to write a program that is able to detect/recognize when a specific image shows up on the screen and once recognized it acts by pressing a combination of pre-set keys in a way that autohotkey or a similar program would.

I have no idea what learning resources I should look at to be able to learn how to code this specific thing as quickly as I possibly can, I also don't know which language would be the best to code this in.

If someone could point me in the right direction that would be very helpful.

Thanks!

What I have tried:

I tried to research my question, but I did not find anything useful :(
Posted
Updated 4-Nov-18 14:08pm
Comments
Eric Lynch 5-Nov-18 0:09am    
Dang...I was hoping someone else would say it. First, I admire your ambition.

That said, I recommend starting with the basics. Select a stack...C#/.Net, Java, or something else?

Personally, I like WinForm C#. Progress to "Hello World!"...search for it...it's a meme for every technology.

Then, progress to basic image processing. What is a pixel? How is it represented in a complex image? How do I compress/de-compress a complex image format, like JPG/PNG?

Then, if you're still in the game, consider image recognition. Have I seen this picture before? This is (perhaps) the single biggest challenge in our industry...so, don't expect it to be easy :)

In short, I encourage you to answer and pursue your original question...with gradual progress...perhaps with a bit more humility :). It's a difficult question and worth anyone's effort.

If this is NOT your goal...and I truly hope I'm wrong...there are many folks who've already struggled with this same question and found a (very) limited solution. Check out / purchase one of these efforts (Google is your friend).

In either case, best of luck. You picked a very challenging goal to start. Stick with the problem and you might become a world-class engineer. Again...best of luck!

I personally hope you ignore the naysayers. If so, please realize you chose an awesome profession (IMO). There are countless talented folks out there. I hope you join their ranks. In my experience, it's about 50% talent and 50% effort.
Member 14043595 5-Nov-18 7:19am    
Thank you for the answer!

It's what I was expecting :) I have one more question, the other comment says that I need to learn Machine Learning in order to create what I would like. There's a program called Auto Mouse Click by MurGee which features screen change detection option. You select a region on the screen, you select the % of change that the program will act upon and you simply run it as it detects the change (in pixels I assume).

This is pretty much what I would like to make, does this involve machine learning? My question does not have the best wording and might sound more complex than it really needs to be. Rather than saying that I would like it to detect a specific image, I would like it to detect a change for example from 100x100 pixel window that changes between only two colours. Or Something that counts the number of x coloured pixels in a region and if 50% of the pixels in a region change that's when the program takes other actions.

Is this still machine learning? Does this sound more like a feasible task?

Since this post I already spent a few hours learning the basics in python as it has opinions of being beginner friendly.
Eric Lynch 5-Nov-18 8:49am    
Depends on the exact requirements, but it sounds like you may be able to get away with a simple pixel-by-pixel comparison. After you screen capture, that would basically be a comparison and accumulation inside a couple of nested loops, with the outer loop by row and the inner loop by column. Its comparatively resource-intensive...not sure you'll get the performance you need for anything near real-time.
Member 14043595 5-Nov-18 16:32pm    
Thank you again!

1 solution

You need to learn Machine Learning. But, wait, this is a recursive approach. You need to learn what kind of problems are solved using machine learning, and why only machine learning can solve those problems!

In order to program machine learning algorithms, you need to learn or at least have a good hands on experience with at least one programming language (although I recommend any 3, in 3 different paradigms — object-oriented, functional programming and scripted or dynamic typed). Once you have gotten enough experience in those languages, only then you will be able to write a program for machine learning—your task of enabling the program to tell what is on the screen and then perform a certain action requires more than a simple if...else.

Looking at your position, I would recommend paying a visit to one of the paid online course websites, such as Pluralsight, you can even join the learnings made available by other authors and publishers like Packt. Learn programming thoroughly, before writing these programs. It takes a lot more effort than a normal hello world can teach.

Here, I have attached a few normal links for you, please go through them and get started for yourself:

Object-oriented programming - Wikipedia[^]
Get Started - C# Guide | Microsoft Docs[^]
Welcome to Python.org[^]
Machine Learning Crash Course  |  Google Developers[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900