Page 1 of 1

PB is fun

Posted: Sun Jul 19, 2015 7:12 pm
by JCV
Besides using PB for most of our utilities in construction like generating scripts for autocad, analysing xlsx files to database, automated tools, etc..
I have a lot of spare time during Ramadan so I created something which interest me and at the same time learning how image recognition works.
I created my own image recognition that is fast enough to recognize any objects in screen and its also useful for optical recognition. I chose a game which is easy to play with and heres my result. This is a 300KB compiled file without using any dll like OpenCV. The speed, size and the memory usage still amazes me. It just show how powerful PB is. :D

So what do you do for fun?

Image

Re: PB is fun

Posted: Mon Jul 20, 2015 5:00 am
by Shield
Looks cool! I'd be interested in getting a little more info on your approach.
What techniques did you use? Can you provide any (online) sources you've been using? :)
JCV wrote:So what do you do for fun?
Unfortunately, nothing with PB anymore except prototyping and small tools... :|

Re: PB is fun

Posted: Mon Jul 20, 2015 7:08 am
by JCV
I was looking for a simple image matching library and I found opencv template matching. I saw many questions in stackoverflow about opencv template matching regarding many false detection for transparent images but failed to find a simple solution which doesn't require some additional image processing. http://stackoverflow.com/questions/4761 ... ansparency
Template matching in opencv doesn't support transparency so I created my own version of template matching in PB and later on added more feature for my ocr program.
For my ocr, i created a separate program to count the number of color occurrence and coordinates and later use it to for possible match. and compare possible matches based on that.

You can do similar to what I do in OpenCV which is more capable in processing complex images. My approach only works for images that doesn't require rotation and changing size.