Machine Learning Tools for Opticks

Plugins based on Machine Learning algorithms.

This is the repository for Google Summer of Code 2012 project Spectral Algorithm Development for Opticks. For more information about Opticks visit

Opticks uses Spectral Processing Extension to perform hyperspectral and multispectral image analysis. Spectral imaging can allow extraction of additional information the human eye fails to capture with its receptors for red, green and blue. This help in uniquely identifying objects based on their spectral signatures, correctly clustering a image into components and detecting changes in the image. These techniques form an integral part of spectral image analysis.

The additional information present in spectral images can be used to train supervised machine learning algorithms in order to achieve very high accuracy in object identification in an image. Same goes for the unsupervised algorithms used to cluster and detect changes in an image.

The repository contain the following Machine Learning techniques/algorithms:

* ISODATA Clustering
* Change Detection using an EM based approach
* SVM Classification
* Back Propagation Neural Networks

The Plugins:


ISODATA is used to cluster an image. The ISODATA algorithm is similar to the k-means algorithm with the distinct difference that the ISODATA algorithm allows for different number of clusters while the k-means assumes that the number of clusters is known a priori. Here we use ISODATA for clustering spectral image. All the original images below are taken from the Opticks Sample Data. The Code is available here: ISODATA

Original Image

original image

ISODATA running on the image.

ISODATA running

After first iteration of ISODATA.

first iteration

After second iteration of ISODATA.

second iteration

After third iteration of ISODATA.

third iteration

After fourth iteration of ISODATA.

fourth iteration

The clustered image obtained after the final iteration.

fifth iterationoriginal image

Change Detection using EM

This plugin uses an EM based approach for unsupervised change detection. It is based on Automatic Analysis of the Difference Image for Unsupervised Change Detection.

Image of Delaware Bay taken on 23 September 1999

original image

Image of Delaware Bay taken on 10 July 2001

changed image

The algorithm running on difference image

EM running

Detected Changes(shown in Black)


Support Vector Machine

SVM Plugin uses SMO algorithm for training. One-Against-All strategy is used for multiclass classification. Linear or RBF kernel can be used for training SVM.

Dialog box for Input parameters

svm dialog

SVM training on input data

svm train

Predicting pixels using the trained model