well, i know how to do that, the problem is, what if i don't want to do yew trees anymore. Is there a way i can code it so that i can set a range of pixels like 20 pixel range for the variable? That was my problem since the beginning. Btw, thanks why06 and hd.
Or Operator (||)
What I did was take a picture or 3 of the same tree in different angles, then cut out only the tree(no floor etc visible) and save them as 24bit BMP, then load it in a C# application that would determine the lowest RGB code used, highest RGB code used, and it gave me the average difference in colors between every pixel next to eachother(continuing from the last picture I loaded). I had those saved to a text file in the format lr_lg_lb_hr_hg_hb_ar_ag_ab
Then I started another application for which I took 100 pics(of which 40 contained the tree I wanted, and 60 contained random locations in runescape that could seem similar to the tree i wanted to cut). With these 100 pictures I further trained the bot to recognize only trees by clicking the yes or no button, yes if the drawn rectangle was around a tree, no if it had it wrong, then it would increase lowRGB, decrease highRGB, or decrease averagediff. Once that was done it would determine the lowest amount of recognized pixels left and the average distance between them(with 25% lower or higher allowed).
Finally I used a 3rd app that would use the results of app 1 and 2 but in a live enviroment
just walk around and watch it tag all the trees. if it got one wrong I just clicked edit then click on the rectangle that was wrong and it'd adjust the formulas in such a way it wouldnt detect that object anymore.
It was a gigantic project but fun to do, over a year ago tho before I upgraded to win7 so no longer have the code
Then I started another application for which I took 100 pics(of which 40 contained the tree I wanted, and 60 contained random locations in runescape that could seem similar to the tree i wanted to cut). With these 100 pictures I further trained the bot to recognize only trees by clicking the yes or no button, yes if the drawn rectangle was around a tree, no if it had it wrong, then it would increase lowRGB, decrease highRGB, or decrease averagediff. Once that was done it would determine the lowest amount of recognized pixels left and the average distance between them(with 25% lower or higher allowed).
Finally I used a 3rd app that would use the results of app 1 and 2 but in a live enviroment
just walk around and watch it tag all the trees. if it got one wrong I just clicked edit then click on the rectangle that was wrong and it'd adjust the formulas in such a way it wouldnt detect that object anymore.It was a gigantic project but fun to do, over a year ago tho before I upgraded to win7 so no longer have the code

Damn . :/
i just threw it together really fast, lol, ya it's extremely messy.
Original pic:

What to train from:

After it adjusted its filters a few time it gave me this result(autoadjusted filters by checking if there were more then x white pixels directly against eachother, if there were it would adjust the maximum or minimum):

Which I manually narrowed down to:

Final values:
Max: 75,77,40
Min: 50,60,30
Now I can do some loops and determine how wide and long it would be on screen based on maximum distance from previous pixels that it detected and draw a rectangle around it or something.

What to train from:

After it adjusted its filters a few time it gave me this result(autoadjusted filters by checking if there were more then x white pixels directly against eachother, if there were it would adjust the maximum or minimum):

Which I manually narrowed down to:

Final values:
Max: 75,77,40
Min: 50,60,30
Now I can do some loops and determine how wide and long it would be on screen based on maximum distance from previous pixels that it detected and draw a rectangle around it or something.
More epicness, HD. What values did your bot adjust to identify a tree. was it like avg color, density of color, etc?
HOLY CRAP. I would probably never figure that out. Do you guys have any ideas on a method that i could use to detect if i am still in my right place, other than my failed method in this thread. Thanks. Btw crazy logic HD.
ok, nevermind the last post guys i have another idea. I will test it and report back if it works and i will reveal the method.
Ok I solved the problem using the same method. Instead of gettin the color of the tree and the background I found that it was just necessary to get the background color and then I set up an if statement sorta like this:
So thx so much for ur guys' help cuz now my bot runs while I m at skool and I receive status updates via txt messages from the bot. It is so legit, lol.
Code:
if(! (r_3 >= r_pixel_two - 20 ............)){}

I wonder how you'd do that. 