Skip to content

Gaussian Mixture Model clustering using OpenCv Expectation Maximization implementation

License

Notifications You must be signed in to change notification settings

SimoneAlbertini/GMM-Clustering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

  • C++08 compiler (actually used gcc/g++ 4.8.1)
  • OpenCv 2.4.* with Qt 4 support

The current code was compiled on Linux but it should be straightforward to make it run also under Windows platforms.

NOTE: This code is no longer maintained. If you want to run this code with early versions of OpenCV you should modify it as the Em class is now under cv::ml::EM, not cv::EM.

Usage

Type './gmm help' to display help.

Simple Run:

> make clean && make
> ./gmm

The code reads the points from the image (samples) and fits a Gaussian Mixture Model using the Expectation Maximization algorithm in order to maximize the log probability of each sample.

After this process, the program shows two images:

  • One representing the clusters, that is the 2D gaussians along with the (scaled) eigenvectors of its dimensions. The more the ellipse is white, the higher weight is assigned to that component.
  • The posterior probability of each sample.

License

See LICENSE

Credits

The following tutorial has proved very helpful:

http://www.juergenwiki.de/work/wiki/doku.php?id=public:gaussian_mixture_models_em_algorithm_-_demo

The EM OpenCv doc page

http://docs.opencv.org/modules/ml/doc/expectation_maximization.html

About

Gaussian Mixture Model clustering using OpenCv Expectation Maximization implementation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published