Counting trees from space

Richard Leyshon

30 December 2019

Introduction

I had recently been approached by a colleague with an interesting idea - to count trees from satellite imagery in assisting with the audit of tree inventory. The action from the meeting was to undertake some investigatory work into how feasible this type of project would be, utilising the resources available to the team, namely R, R studio and open source satellite imagery. In this document, I outline my findings.

Main Findings

  • Open source satellite data can be obtained from EarthExplorer website
  • The ForestTools Package is available on CRAN
  • ForestTools can be used to gain tree counts from aerial rasters
  • Tree counts can only be applied to small geographic areas
  • This package does not achieve species identification
  • Tree count parameters would likely require fine tuning in order to gain the necessary accuracy and assurance

Satellite Data

Free open source satellite imagery is widely available, although tends to be relatively low quality in comparison to what is available within the paid market. Having said that, one of the suggested uses of the landsat imagery taken from the EarthExplorer website is vegetation analysis. Whether the quality of imagery used within this analysis is adequate for the intended purpose is debatable. Purchasing higher resolution imagery could both improve the accuracy of the counts and also assist in the verification process - many high quality satellite images are detailed enough to visualise individual trees.

I used this guide to help with selecting the correct data for analysis. The key is to specify less than ten percent cloud coverage and specify the Landsat 8 OLI/TIRS tiles, as these are the most recent images

Landsat Images

Depending on the area to analyse, a varying amount of pre-processing is required. My first task was to identify images of Wales with cloud coverage below ten percent. Unfortunately, one complete tile containing the full extent of Wales could not be identified. However, 3 separate tiles were found.

These images are multi-layered rasters, meaning that they contain seperate values for red, green and blue which may be combined to produce natural colour images, such as the ones shown above. The multi-band raster is not suitable for tree counts (covered later), but single bands can be easily derived from these rasters for tree count analysis.

It should be noted that in the literature, the red to infra-red band is important for distinguishing between canopy height and artificial structures of a similar height. This has not been investigated here, but selecting different electromagnetic spectrum frequencies may result in differing results and further work is needed in this respect. If any higher quality satellite images are purchased, it may be beneficial to seek an option with infra-red images.

Mosaic image

Achieving a full image of the required area is possible, but quite time-consuming. Canopy analysis can only be applied to small geographic extents anyway. But this step may be important if the location of the area of analysis happens to occur at boundaries between the seperate landsat images.

Note that this image has been simplified by a factor of 20% to reduce file size for the purpose of this report. Also, it would be ideal to limit the extent of the image to a shapefile of Wales. This was not possible due to issues regarding the coordinate reference system of the images but would be worthwhile resolving.

The image above is a composite of three separate tiles originating from satellite images on 2 separate days - 23rd July 2019 and 13th May 2019. This was required to avoid cloud coverage, but I would suggest if infra-red frequencies were favourable to tree count analysis, then cloud coverage would be less important and tiles from the same day would be favoured. Infra red frequencies attenuate cloud cover better than visible light.

Counting Trees

ForestTools is a rather niche package and does not appear to be very widely used among the R community. I am basing that judgement on the apparent lack of discussion on the internet regarding troubleshooting. However, it is available on CRAN and cited in scientific papers.

On balance, I would suggest further experimentaion with the package to investigate if it can yield accurate tree counts. It does not appear to offer the species identification mentioned in the meeting with our customer. Another limitation mentioned earlier was that only small geographic areas can be analysed at one time.

Area of Interest

Identifying the area to analyse and cropping the raster to that extent is therefore required. I selected an area of mid-Wales for analysis, on the balance of probabilities that it would likely contain some trees. The location of the area can be seen plotted as a small red square below.

Further experimentation with the boundary size would be suggested as it is likely that larger areas are possible to work with. The area of interest analysed is plotted below in RGB.

As previously mentioned, the ForestTools package cannot execute a canopy analysis upon a multi-band raster. It is important to select one single band for analysis. I arbitrarily selected the first available band, however identifying imagery with infra-red properties would likely yield better results with reduced limitation of cloud coverage. The single band area of interest may be seen below.

Canopy Analysis

I include the code in the above analysis as it is important. The lin function defines the dimensions of a ‘roving camera’ that will scan the image for elevation data. Areas of raised elevation relative to the surrounding ‘ground’ level will be considered as canopy, taking into account crown size and shape. This can apparently get rather complicated in more urban areas, where it is suggested an analysis of infra-red may allow better distinction from artificial objects of a similar height to tree canopy. The lin function is likely to be a key parameter for adjustment in gaining an accurate count of trees.

The vwf function contains a minHeight argument, set to 2 metres here. Any tree crown below a height of 2 metres would therefore qualify as undergrowth and would not be counted as canopy. This would be another parameter for consideration and could be varied depending on the age and species of the trees.

Analysis Results

Below, I plot the counted trees above 2 metres against the natural colour image of the area of interest.

Summary statistics can be derived from the model visualised above. For example:

Mean canopy height = 110.1730769

Count of trees identified = 104

It is unknown to me if this is an accurate count of the trees within this defined area. It is likely that further adjustment of the analysis parameters are required and some further work with areas of known tree quantity is required. As mentioned before, purchasing some higher resolution satellite images may provide us with the assurances required to verify the accuracy of the counts and adjust the function accordingly.

Conclusion

A proof of concept has been achieved. A count of trees on open source satellite imagery appears to be achievable. The imagery available on the website used is extensive and frequently updated. However, while it appears that a tree count is achievable, it is limited to small geographic areas and the count accuracy is unverified. I feel that the main limitation would be in the resolution of the open source satellite imagery, as many of the published articles on canopy analysis use very high resolution satellite or lidar imagery. Purchasing some higher quality material may also aid in the calibration of the count analysis, as good quality satellite imagery can clearly identify tree crowns from space.