Sign in to follow this  
Followers 0
brodie28

pixelsearch help

18 posts in this topic

I have a series of images on my harddrive and I need to know how I would go about writing a program to do a pixel search of the screen and see if any of the images were found.

I need this to get past the visual confirmations on login pages and such. The site I need it for does not use random colors or backgrounds so I think it should be possible. It needs to search the page for all 27 images (A-Z and 0-9) and when they are found output in order from left to write so that I have the security code.

Share this post


Link to post
Share on other sites



I have read it but I do not think it provides any real idea of how to achieve what I am trying to.

I will re-read it when I get home in an hour...

So what I need to do is easily accomplished?

Share this post


Link to post
Share on other sites

And this will be able to find and tell the difference between different letters and numbers, and list them from left to right?

Share this post


Link to post
Share on other sites

And this will be able to find and tell the difference between different letters and numbers, and list them from left to right?

it involves doing MANY 'pixelgetcolor's

you know that the image of an 's' has a black pixel at 200, 200

well you go

$color = PixelGetColor(200,200,)
If Hex($Color) = 000000 then
Msgbox(0, "Result", "could be an 's'.")
Else
Msgbox(0, "Result", "could not be an 's'.")
Endif

Share this post


Link to post
Share on other sites

So that is the only way to do what I need?

It would be extremely tedious to do this for 36 different characters....

Share this post


Link to post
Share on other sites

So that is the only way to do what I need?

It would be extremely tedious to do this for 36 different characters....

Exactly why OCRs are not fun to make :P

Share this post


Link to post
Share on other sites

Is there no way to just scan all of the pixels of the image files, and just compare it with what is on the screen?

Share this post


Link to post
Share on other sites

The thing I don't get is that pixelsearch searches for one color only... I need it to search for a pattern of pixels.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

There are a few toolkits out there... As someone mentioned, OCR is programatically hard -- you have to try to mimic how your brain listens to your eyes. This is also computationally expensive.

Given that so many sites are using these things expressly to *block* automation should indicate to you that it is a non-trivial problem to solve. People don't pay programmers to stop these things for nothing.

That being said, there are some toolkits out there that, should you wish to purchase them, may provide assistance in you being able to build some logic that can test for your images.

Have you explored other options? Were they careful enough to keep the file sizes the same? All files have the same background? All files have the same name in the html source? Presumably they didn't leave any stupid holes open like that.

Alternatively, you can start your own high volume website, and pay people to solve the things for you in order to view your content. (this is what the spammers and robot creators do -- hijack the image, put it on a porn site, and get the slavering masses to decode the text for them.)

Edited by flyingboz

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

All the images are the same file size, file name and html code. So no obvious loops.

Am I to understand that autoit cannot reasonably code around this problem?

You did give me an idea about downloading the picture and having someone else work it out though.

Share this post


Link to post
Share on other sites

I have looked at all of those...

What I am having trouble with are the following areas:

How do I save character definitions... Let's assume that black is equal to 1 and white is equal to 0. The number seven could look like this:

00000000

01111100

00001100

00001100

00001100

How do I save this in my script (and of course my script will need to be able to do it with more than two colors.

And how do I ask autoit to search for a complex pattern of pixels on the screen like the one above?

Share this post


Link to post
Share on other sites

bump

Share this post


Link to post
Share on other sites

How do I save this in my script (and of course my script will need to be able to do it with more than two colors.

And how do I ask autoit to search for a complex pattern of pixels on the screen like the one above?

By their checksum values.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

So I can get their checksum values, and then search a rectangle on the screen for them?

How do I search for checksum values?

Share this post


Link to post
Share on other sites

I'm guessing you don't read very much.Instead of re-inventing the wheel there is already stuff out there that cracks OCR.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0