1
HERIOT-WATT UNIVERSITY
DEPARTMENT OF COMPUTING AND ELECTRICAL ENGINEERING
B35SD2 – Matlab tutorial 7
Image modelling using Markov Random Fields
Objectives:
We will demonstrate how Markov Random Fields (MRF) and fractals can be used effectively
in image processing for modelling both for synthesis and analysis.
During this session, you will learn & practice:
1- Ising MRF models
2- AutoBinomial Models
Ressources required:
In order to carry out this session, you will need to download images and matlab files from the
following location:
http://www.cee.hw.ac.uk/~ceeyrp/WWW/Teaching/B39SD2/B39SD2.html
Please download the following functions and script:
• generate_MRF.m
• generate_MRF_quick.m
• generate_MRF_Binomial.m
• denoise_MRF.m
Image Modelling :
As you will have seen in the lecture room, image modelling plays an important role in
modern image processing. It is commonly used in image analysis for texture segmentation,
classification and synthesis (game industry for instance). It is also of common use in
multimedia applications for compression purposes. Due to the diversity of image types, it is
impossible to have one universal model to cover all the possible types, even when limiting
ourselves to simple texture cases. Various models have been proposed and each has its
advantages and drawbacks. For textures, co-occurrence matrices are a standard choice but
they are in general difficult to compute and are difficult to use for modelling.
We will concentrate here on MRF and fractal models which have been widely and very
successfully used in the last 15 years. Fractals have been used for compression for instance.
Markov Random fields :
Markov random fields belong to the statistical models of images.
Each pixel of an image can be viewed as a random variable.
An image can very generally be described as the realisation of a n by m dimensional
random variable of (in general unknown) probability density function (pdf). Given the fact
that n and m are the dimensions of the image, each component of the vector corresponds to a
pixel in the image. This is called a random field.