Skip to content

Image segmentation using the EM algorithm that relies on a GMM for intensities and a MRF model on the labels. Based on "Segmentation of brain MR images through a hidden Markov random field model and the expectation-maximization algorithm" (Zhang, Y et al.)

Notifications You must be signed in to change notification settings

hrshtv/HMRF-GMM-EM-Segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HMRF-GMM-EM Segmentation

Image segmentation using the Expectation-Maximization (EM) algorithm that relies on a Gaussian Mixture Model (GMM) for the intensities and a Markov Random Field (MRF) model on the labels.
This is based on "Segmentation of brain MR images through a hidden Markov random field model and the expectation-maximization algorithm" (Zhang, Y et al., 2001)

Usage:

See code/main.mlx and run it cell by cell.

Documentation:

  • code/main.mlx: The main script/driver program
  • code/EM.m: Implements the EM algorithm
  • code/G.m: Returns the Gaussian PDF's value at the given point
  • code/ICM.m: Finds the optimal labelling using a modified Iterated Conditional Modes (ICM) algorithm
  • code/KMeans.m: Returns the initial segmentation using the standard K-means algorithm
  • code/logPosterior.m: Computes the log of the posterior probability for the labels (up to a constant)
  • code/priorPenalty.m: The prior penalty for the given pixel using a 4 neighbourhood system, without wrap-around (uses the Potts Model)
  • code/showSegmented.m: Plots the segmented image using a custom colormap

(This was done as a course assignment for CS736: Medical Image Computing, Spring 2021, IIT Bombay)

About

Image segmentation using the EM algorithm that relies on a GMM for intensities and a MRF model on the labels. Based on "Segmentation of brain MR images through a hidden Markov random field model and the expectation-maximization algorithm" (Zhang, Y et al.)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages