Sign in to follow this  
Followers 0
Faleira

pixel detect

7 posts in this topic

instead of just using it to find a single pixel, can i use it to count chunks of colours instead? like say a 10x10 white pixel block, can i have it look for that instead?

Also, is it possible to make Autoit COUNT the amount of pixels of that colour i specificed in a certain area?


[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Share this post


Link to post
Share on other sites



Hi!

You can read every single pixel into an array an then check wheter there is this "block" or count them.

But you have to look absolutely for speeding it up as good as possible, because it is unfortunately very slow.

C/C++ plugin would probably be the better solution if you can do that and if you need to scan for it in a big area.

peethebee


vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Share this post


Link to post
Share on other sites

Hi!

You can read every single pixel into an array an then check wheter there is this "block" or count them.

But you have to look absolutely for speeding it up as good as possible, because it is unfortunately very slow.

C/C++ plugin would probably be the better solution if you can do that and if you need to scan for it in a big area.

peethebee

i get the storing into array part, but how would u make it perform the check?

And i can't actually script very well, so a c/c++ plugin wouldn't do me any good ^^


[quote]If whenever you feel small, useless, offended, depressed, and just generally upset always remember......you were once the fastest and most vicious sperm out of hundreds of millions![/quote]

Share this post


Link to post
Share on other sites

Personally I use PixelCheckSum for that, then it returns the sum of the block value, and I check that value for what ever I'm looking for. It's easier if there is a unique color involved.


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.

Share this post


Link to post
Share on other sites

Hi!

Go through the array (two-dimensional) and scan the pixel 1 left and 1 down).

Make sure not to got out of the index of the array.

peethebee

p.s. sorry, but I'm too lazy and have not enough time to give you a snippet.


vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Share this post


Link to post
Share on other sites

I don't understand why you want to put it in an array, when you could just use the PixelCheckSum. Seems like a lot of work for the same outcome. Could you explain that peethebee?


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.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Hi!

@ronsrules:

I thought you would take a ccheck sum of the whole screen, but now I understand that you just checksum this area of e.g. 10x10 pixels and compare the checksum to the saced one for the case that it is e.g. all-white.

Of course your idea is better *g*.

Edit: with your solution, every pixel is scanned more often than with mine. Coule lead into performance problems...

Regards, peethebee

Edited by peethebee

vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

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