Follow

Batch Supervised Classification in IMAGINE

If you wish to batch supervised classifications in ERDAS IMAGINE, there is no defined template that will allow you to do so. You will need to modify the batch commands so as to match the input file, signature file and output file to the correct parameters. Here's how:

1. Open the supervised classification dialogue and enter your input raster file, input signature file and classified output file. Set up the decision rules as you wish. Now click on the "Batch" button.

2. If you look at the code in the Commands box, you'll see that it is in the form of "classifysupervised "input raster" "output" "signature file" parameters. However, the batch wizard assumes that the output file is always the last file in the command, which isn't the case here:

class1.jpg

The Input2 and Output1 files are swapped. Therefore, we need to modify the batch file.

3. With the Variables as above (On or more inputs, one output) click on the save button. Now open the saved .bcf file in a text editor. It should read something like this:

/*
** IMAGINE Version 14.0 Batch Commands File
*/
variable Input1 User;
variable Input2 User;
variable Output1 Auto "c:/erdas/examples/$(Input1.pathright)$(Input1.root)_tm_860516.sig" Delete_Before;

classifysupervised '$(Input1)' '$(Input2)' '$(Output1)' -n Non -o Par -u Par -p Max -prob 0 -a none 0 -best 1 -dsc 0 0 0 0 0 0 0 0 -dsco 0 -z 0 -m classify

You need to change this to:

/*
** IMAGINE Version 14.0 Batch Commands File
*/
variable Input_raster User;
variable Input_sig User;
variable Output Auto "c:/erdas/examples/$(Input_raster.pathright)$(Input_raster.root)_output.img" Delete_Before;

classifysupervised '$(Input_raster)' '$(Output)' '$(Input_sig)' -n Non -o Par -u Par -p Max -prob 0 -a none 0 -best 1 -dsc 0 0 0 0 0 0 0 0 -dsco 0 -z 0 -m classify

4. Save this modified .bcf file and then click the Load button on the batch tool to load it back in. 

class2.jpg

You can now highlight the Input_raster and Input_sig columns in tern and add the files you require. Preview the batch commands to check your input and output files and click Run Now when you're happy.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk