Tree detection – part 5

It’s been a while since I was working on the autogen vegetation for Nantucket. It was actually before my summer holiday. Afterwards I thought I would quickly fix some of the reported bugs and then return to this interesting issue. But as always I got carried away by adding some new features to ModelConverterX and so it is only now that I had the time to look at the autogen vegetation detection again.

Before the summer I was working on vegetation detection based on the histogram properties of an area. This worked OK, but sometimes it is hard to distinguish water and vegetation. So this time I tried another approach for which I needed imagery with a near infrared band as well. For Nantucket I was able to get hold of such imagery through the state GIS portal. It seems this kind of imagery is available for more parts of the US for free and in the coming years it is likely to become even more easily available.


Above you see a picture of this imagery. The quality is actually less than the imagery I have used for the photo scenery. But since we want to use it to detect the vegetation it does not matter too much. The most interesting part is the near infrared channel that is included. Below you see a color infrared version of the same area shown before. As you can see the near infrared information lets certain features stand out more.


I found a common approach to detect vegetation, with is called Normalised Difference Vegetation Index (NDVI). This algorithm uses the red channel and the near infrared channel and calculates an index based on that. The higher the value, the more likely it is vegetation. So I have implemented this as an alternative approach compared to the histogram matching algorithm I used before. The first results look better, although it is sometimes still hard to distinguish between a shadow and vegetation for example. Below you see a picture with the detected trees.


I think both algorithms are OK for usage now. So I plan to finish up the GUI I have been working on that allows you to tune the algorithms for the imagery you want to process. And then I will add the vegetation detection feature to scenProc. And given the complexity of the algorithms I will also add some documentation to explain how they works and what the settings of the algorithms do.

7 thoughts on “Tree detection – part 5

  1. Orion says:

    Looks like good work! 🙂

    Is it also possible to use the NIR channel to detect water and automatically make land/water masks?

  2. arno says:

    I haven’t tried yet to detect water based on the NIR channel. But I expect that it will also be easier. Will be interesting to try out.


  3. JpP says:


    Nice idea Arno! What about the perennial trees which are far less IR reflective than non perennial ones? Do they appear enough to be included within the red range you will use?



  4. arno says:

    I guess in theory it should indeed be possible to detect different types of vegetation based on the NDVI index value. But I don’t think the source imagery I used for my test is good enough for that (yet). But that would be interesting, it would allow different types of vegetation.

  5. Dean M says:

    Arno, I’m so glad that info helped! Nice work!!! So glad you found some nantucket data 🙂

  6. Alberto says:


    First, thanks for this amazing tool!!! im using scenproc to create autogen and the results are really amazing! I followed the steps in the video about the new feature “texture editor”. The problem is when i click “save” the output file comes without any extension. I see in your command line that you use a .tfc file, but i can´t save the file with this extension. I tried to rename it, and write the .tfc manually but it don´t works… so my question is.. how can i get the .tfc file? Thanks in advance. :)

    • arno says:


      I’ll check the save function, I think you found a bug that no extension is given. But the extension is only to help you recognise the file. In the DETECTFEATURES step you can also point to a file with a different extension.


Leave a Reply

Your email address will not be published. Required fields are marked *