How to Batch a Supervised classification in IMAGINE?
Performing supervised classification on numerous input image files is often a tedious and time consuming process.
However, assuming that the input imagery is radiometrically similar (i.e. it is derived from the same sensor type and has been processed to remove atmospheric and other scene to scene variations, such as by running it through the ATCOR 3 for ERDAS IMAGINE module to convert to reflectance) it is a simple task to use the ERDAS IMAGINE tools to batch the job of applying a standard signature file (or files) to multiple input image files in order to produce classified / thematic output categorized data layers. This process can even be broken down into jobs which can be parallel processed on a single computer or submitted to a distributed processing environment such as Condor.
This white paper takes you through the steps necessary to create an ERDAS IMAGINE Batch Command File for executing multiple supervised classification jobs.
Obviously you will need to have your input multispectral imagery available for processing.
You will also need at least one signature file (*.sig) produced using the ERDAS IMAGINE Signature Editor which has been trained with examples of all the classes to be extracted based on an image with the same number of bands as the data to be batch classified. As mentioned above training signatures are generally only transportable between input images if scene to scene variations have been removed. So it generally advisable to have normalized all scene data using something similar to ATCOR3 for ERDAS IMAGINE so that all input imagery (including the image used to train and create the signature file) have had atmospheric and illumination effects corrected out to scene reflectance.
Setting up the processes
The inputs to the Input variable will be defined in a later step.
Here is where we can set up a pattern for the naming of the output. Perhaps we want to use the input files root name with a modifier at the end of it such as “_classified” and then have the same file type extension as the input. For example when image1.img is fed into the classifer we want the output to be automatically named image1_classified.img.
Optionally, you might want to consider turning Delete Before Processing on. If you do so any file that already exisits will be deleted before the batch command is run. This can be useful if, for example, the batch has to be re-run for some reason after a failed attempt which created unwanted output files. Otherwise leave this option off.
Click Close in Variable Editor dialog.
In the resulting Select Batch Files navigate to the directory with the input images to be iterated on by the batch command and select them. Click OK.
All Input files and automatically created Output will appear in Batch Command Editor window.
This particular batch queue had 9 jobs (9 input image files to be classified). As seen below all 9 jobs completed successfully with a maximum of 3 jobs running at any given time.
Using the Batch Command File
At step 22 of the above process a Batch Command File (*.bcf) was created. These BCF files can be used at a later time to repeat the same type of commands on a new set of input files without needing to go through the same set up process. To re-use a BCF file follow these general steps:
If it is desired to use a different signature file a couple of different options are available: