A basic way to extract trees from remotely sensed data such as satellite or aerial imagery is to calculate the Normalized Difference Vegetation Index (NDVI) followed by thresholding the NDVI.
To illustrate, consider the following 4-band color infrared image (Warning 160MB download). The NDVI provides a means to express the intensity of live green vegetation within the range of -1:1. Often these values are stretched (as in the attached script) to fill the entire range of the image bit depth (e.g. 0-255). Once NDVI is calculated, you can threshold the image by essentially saying, "Keep only the pixel values > X". The output is a binary image, which you can use to analyze metrics such as canopy cover per unit area.

file = 'D:\path\to\doi1m2011_41111h4nw_usda.tif';
[I R] = geotiffread(file);
outputdir = 'D:\output\'
%% Calculate NDVI
NIR = im2single(I(:,:,4));
red = im2single(I(:,:,1));
ndvi = (NIR - red) ./ (NIR + red);
double(ndvi);
imshow(ndvi,'DisplayRange',[-1 1]);
%% Stretch to 0-255
ndvi = floor((ndvi + 1) * 128); % [-1 1] -> [0 256]
ndvi(ndvi < 0) = 0;
ndvi(ndvi > 255) = 255;
ndvi = uint8(ndvi);
%% Threshold the NDVI
threshold = 100 % You may need to experiment with this value
i = (ndvi > threshold);
imshow(i)
%% Write output to disk
tiffdata = geotiffinfo(file);
outfilename = [outputdir 'threshold_image' '.tif'];
geotiffwrite(outfilename, i, R, 'GeoKeyDirectoryTag', tiffdata.GeoTIFFTags.GeoKeyDirectoryTag)