Jump to content

pixel detect


Faleira
 Share

Recommended Posts

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]

Link to comment
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

Link to comment
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]

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
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

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...