This article will show you how to make use of the OpenCV ANN module, which is available in revision 1856. The data used to demonstrate the new module can be found here. Simply open SAGA and load the project ‘forest_of_goettingen.sprj’.
Figure 1 - The 'Forest of Goettingen' SAGA demo project
Now open the module, which can be found under ‘Modules -> Imagery -> OpenCV -> OpenCV Neural Networks’.
Figure 2 - Menu path to the OpenCV Neural Network module
The first decision to be made is if table or raster data will be used for the classification. Therefore you can change the 'Data type' option using the drop down box. Depending on your decision the 'Data Objects' section is changed to be able to receive the corresponding type of parameters. In this tutorial we will use raster data. Therefore the 'Data type' option is changed from 'Table' to 'Grid' (see fig. 3).
_Figure 3 - Change data type to 'Grid' _
Now set the grid system option to '28.5;….' and select all Landsat grids (see fig. 4).
Figure 4 - Select all Landsat grids
Then make sure to set all other options like in fig. 5. Alternatively you can download a prepared SAGA paramters file here, but ensure to correct the selection of the 'Train INPUT' parameter, which depends on your local file system. Some of the main parameters are described below:
All other options correspond to the parameters that are used by the OpenCV ANN implementation. A detailed description of each parameter can be found here.
Figure 5 - Params for the OpenCV NNet module
Now click on the 'OK'-button and wait until the module excution is finished. You should see the 'Module execution succeeded' message in the message window. In the data section you will find the 'OUTPUT classes' element like in fig. 6.
Figure 6 - Output figure
The class labels are not assigned at the moment, but will have the same order as the classes in the training areas. Since the module is new, there are still some open tasks: