kyler Posted May 12, 2009 Posted May 12, 2009 Hey, I am trying to make a program that is able to determine what colors there are on top of a constant background color. The colors of the objects and number of objects varry. Whats the quickest way to do this? Something like pixelsearch(0,0,100,100,Not $color) is basically what i need. Thanks in advance.
TurionAltec Posted May 12, 2009 Posted May 12, 2009 (edited) Stick PixelGetColor in two nested for loops? dim $results[100][2] $resultcounter=0 for $x= 1 to 100 for $y= 1 to 100 If PixelGetColor($x,$y)<>$color Then $resultcounter+=1 $results[$resultcounter][0]=$x $results[$resultcounter][1]=$y Endif next next It will probably need some polishing, but that's it in a nutshell. Edited May 12, 2009 by TurionAltec
kyler Posted May 12, 2009 Author Posted May 12, 2009 ya thats the same thing i came up with. unfortunately, the real window size is much larger making that method too slow to really work well.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now