Jump to content

Recommended Posts

Posted

PixelSearch currently returns back an array of the first pixel location found that matches a color. What if I wanted it to not stop at the first pixel? I want to keep scanning the rest of the region to gather data where other identical pixels might be such as a green tennis ball, with the goal of finding the center average coordinates. What functions can I use to make this happen? I do not want to soak the CPU by running multiple PixelSearches if I can help avoid it, one pass should be sufficient. My theory is to take a bitmap, dump that into an array, forloop through the array, find all locations of a specific color and then determine the shape's boundary of our "green" object and finally give the center location of it...Thank you.

Posted

I don't know the position. The ball might be moving around the screen. The pixelsearch function is useless because the location it returns is completely random since it stops immediately after detecting only one of then pixels. This means it's reporting an edge of the circle, not the middle of it.

Guest
This topic is now closed to further replies.
×
×
  • Create New...