I have already done some image segmentation in MATLAB. The attached picture is the result. My question is that how I can automatically remove the tree part (bottom part) from the image? In other words, I need to isolate the bird with the surrounding. I need to write up a method to do that because I have hundreds of those images. Thanks

If this answer looks good enough to you then download the following code: http://www.mathworks.com/matlabcentral/fileexchange/32532 and try the following commands:
Since you can see clear intensity difference between the bird and the wooded branch, its much more logical to try something like region growing approach than anything else. If I were you, the next thing I would try is some color image segmentation algorithm. Since I get a feel than when we convert from RGB-> Gray, we loose some useful information. Bcoz in gray version of the image, wooden branch has a somewhat same values as the bird (in few regions). So better work on the color image directly without converting to gray. Do NOT rush towards using any pattern classifier. It may solve your problem but it ain’t smart thing to do if there are easier/cheaper solutions available. There are more than one ways to solve this problem strictly within the boundaries of Image Processing without intruding into Pattern Recognition/Machine Learning.