Generate a clustered LAS image
Performs an unsupervised classification using a modified isodata type clustering algorithm. Output consists of a single-band BYTE image of sample cluster assignments and a labeled table file with means, covariance matrices, and the number of samples for the clusters. The input image data may only be BYTE.
- IN
- Input image. Only BYTE data is allowed. Window and/or band options may be specified. The window size of all input images are required to be the same.
- OUT
- Output image. The output single-band classification image. Its data type is always BYTE. Pixel values correspond to the cluster (class) assignment based on the numbering within the internally generated look up table of cluster means; i.e., if a pixel is assigned to the cluster that is the third entry in the look up table, that pixel will have a value of 3 in the ouput image. A labeled table file that is associated with the output image will be created with an ;LT extension. An formated ASCII statistics file will be created with an ;DAT extension.
- NCLUST(3)
- Number of clusters. Specifies the number of clusters to use in the classification.
- NITER(2)
- Number of iterations. The number of data sampling passes to make through the input image.
- MULTFACT(1)
- Multiplicity factor. MULTFACT is used to vary the number of pixels actually sampled per iteration. See User Note 3.
- PRINT("TERM")
- Output destination. The destination of the history report. The history report file contains image processing parameters, image sampling summaries, and elapsed CPU time.
= --: No Report = TERM: Terminal. Output is sent to the user's terminal. = LP: Line printer. Output is sent to the printer defined by $PRINTER. = Filename: User-supplied filename. Output is sent to the user-supplied file with the default extension ".prt".
Clustering is performed on the input image TM.BYTE. The resulting cluster assignment image, CLASS;IMG is created. Output statistics are stored in CLASS;LT. The output history report is stored in CLASS;HST. The number of clusters to be created is 50. The number of iterations is 10. The multiplicity factor is 100 (See User Note 3). This choice of parameter settings will allow about 7% of the scene to be sampled in generating the clusters. This percentage is based on an average seven band TM scene.
Clustering is performed on the input image TM.BYTE. The resulting cluster assignment image is CLAXY;IMG. An output labeled table file, CLAXY;LT is created. The output clustering history report is stored in CLAXY;PRT. There are 50 clusters created. The number of iterations is 1. The multiplicity factor is 1. This choice of parameter settings will allow about 0.07% of the scene to be sampled in generating the clusters.
The input image is opened and a random sampling is done in a psuedo linear manner. A one dimensional array that has values from zero to number of samples times number of pixels is used for the random sampling range. Once the random values have been found (not to exceed MAXSAMP), the random values are sorted into ascending value. These sorted values are then converted back into line/sample values from the input image. The pixel vectors for the specified line/sample pairs will be copied to memory and used to determine the class cluster mean vectors by processing them through a Monte-Carlo statistics process (See User Note 2).The class cluster means are organized in increasing value of absolute euclidian value to speed nearest neighbor searches during the image classification. For each pixel vector of the imput image, an approximation of which cluster the pixel belongs to based on its absolute euclidian distance. Only the clusters in the vicinity of the estimated cluster are searched for the correct cluster.
A single band BYTE clustered image is generated, and the cluster means and covariance matrices are written to a labeled table file and an ASCII formatted text file.
An error was encountered closing the specified file. Processing continues.
An error was encountered allocating dynamic memory. Contact the system manager.
The data type of the input image cannot be processed by CLUSTER. Valid data type is BYTE.
A fatal error was encountered during processing. The message displayed immediately preceding this message specifies the specific error encountered. Processing terminates.
An error was encountered during euclidian distance calculation. A magnitude of less than 1.0E-10 was found. A pixel vector composed entirely of zeros will cause this error. Verify that the input image was not corrupted.
An error occured in passing the cluster mean vectors
to the classification portion of CLUSTER. Contact
the system administrator.
An error was encountered opening the specified file. Check file and directory protections and re-run the program.
An error was encountered reading the specified file. Check file and directory protections and re-run the program.
An error occurs if multiple input images are specified with different window sizes. Respecify the windows and re-run.
An error was encountered writing the specified file. Check file and directory protections and re-run the program.
maxsamp = (MULTFACT * 10 * NCLUST) Example 1> MULTFACT = 1 NCLUST = 240 ITERATIONS = 12 Iteration Pixels sampled --------- -------------- 0 0 (2400 is maxsamp result) 1 480 2 960 3 1920 4 2400 5 2400 : : : : 12 2400 Example 2> MULTFACT = 100 NCLUST = 5 ITERATIONS = 10 Iteration Pixels sampled --------- -------------- 0 0 (5000 is maxsamp result) 1 10 2 20 3 40 : : 9 2560 10 5000