Jump to content

Making PixelSearch keep going?


 Share

Recommended Posts

I'm trying to figure out a way to use the PixelSearch function to crawl over an image and record every pixel that is a certain color. I would like it to also log every pixel coord that matches the criteria.

I just cannot figure out how to get the function to "continue" searching after it has found its first result.

The ultimate point of this tool would be to then load the coord log into another script which would then trace out the image that was recorded pixel by pixel.

Link to comment
Share on other sites

I'm trying to figure out a way to use the PixelSearch function to crawl over an image and record every pixel that is a certain color. I would like it to also log every pixel coord that matches the criteria.

I just cannot figure out how to get the function to "continue" searching after it has found its first result.

The ultimate point of this tool would be to then load the coord log into another script which would then trace out the image that was recorded pixel by pixel.

Hi dude,

Im also stuck with this problem. But, I also have this question.

How do u determine the pixel color of a certain point? Just want to ensure at that certain co-ordinate, wish to compare and ensure it is the desired color. Is that possible? Preferbly in hexadecimal or binary form.

Thanks

Link to comment
Share on other sites

Hi dude,

Im also stuck with this problem. But, I also have this question.

How do u determine the pixel color of a certain point? Just want to ensure at that certain co-ordinate, wish to compare and ensure it is the desired color. Is that possible? Preferbly in hexadecimal or binary form.

Thanks

PixelGetColor would get the color of a specific coord and return the value as a decimal. This could then be compared to your desired color.

Now, anyone have any help for the original post?

Link to comment
Share on other sites

  • 2 months later...

i would try this:

Dim $color,$startx,$starty,$neededcolor,$CoordinateArray[0][2]

for i=0 to $yend step 1
for j=0 to $xend step 1
$color=Pixelgetcolor($startx+$i,$starty+$j)
if $color=$neededcolor Then
Redim $CoordinateArray[Ubound($CoordinateArray)+1]
$CoordinateArray[Ubound($CoordinateArray)][0]=$startx+$i
$CoordinateArray[Ubound($CoordinateArray)][1]=$starty+$j
Endif
Next
Next

it probably wont work immediatly but this would be something to start with.

i didnt test the code so look out for errors. If you get errors en dont understand them ask for help.

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...