kMeans Clustering on Label Analysis (Python)
This Xtra implements kMeans clustering on a label analysis spreadsheet. Separated objects can be clustered based on any measure group that is inbuilt or user customized.
The Xtra script 'clustering_label_analysis' requires a Label Analysis Spreadsheet with computed measurements, a corresponding separated labels map, and a number of clusters as inputs. The computation of kMeans clustering runs on the entire label analysis spreadsheet as a matrix with columns representing each measure and the rows corresponding to each separated label. The script then reassigns each label from the separated label map to its corresponding cluster. The output is a label map with the same bounding box and dimensions as the input label map with the number of labels equal to the specified input number of labels provided as input.
You can provide a label analysis spreadsheet made of custom measure groups containing custom or inbuilt measures. There is no normalization of any features or column values before performing unsupervised clustering. Different label analysis measure groups will provide different clustering results.
The Xtra is available from the Xtra>Image Processing folder when right-clicking a label field.