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