João Marques - ULisboa · 4. At the end, calculate the centers of the 2 clusters as the mean At...

Preview:

Citation preview

João Marques

nº58513

Outline

Medical Imaging

Clustering Overview

Segmentation Methods

Kmeans

Riddler

Otsu

Kittler

ImageJ

Results obtained

Flow Simulation Analysis

João Marques

58513

Medical Imaging

A set of techniques and procedures used to create

images of the human body for clinical purposes

(diagnosis) or medical science.

Examples of widely used techniques:

•MRI

•Radiography

•Tomography

•Ultrasound

João Marques

58513

Medical Imaging

João Marques

58513

Example: MRI

•Characterizes and discriminates among tissues using their

physical and biochemical properties

•Produces sectional images of equivalent resolution in any

projection without moving the patient

•Patient acceptability is high

•MRI contrast agents are very well tolerated

Despite all advantages, it is still difficult to look at the image and

identify the artery

Segmentation methods are important!!!

Medical Imaging

João Marques

58513

Medical Imaging

João Marques

58513

Medical Imaging

João Marques

58513

Clustering Overview

João Marques

58513

In a general way, Clustering is a process of grouping a set of objects

into sets of similar objects.

Two basic principles in clustering: separation and homogeneity.

• Separation: Elements in different clusters are far from each other

• Homogeneity: Elements within a cluster are close to each other

Clustering Overview

João Marques

58513

Bad Clustering – Violates both the Separation and Homogeneity

principles!

Clustering Overview

João Marques

58513

Good Clustering – Satisfies both the Separation and Homogeneity

principles!

Clustering Techniques

João Marques

58513

• Agglomerative: Start with every element in its own cluster, and

iteratively join clusters together, until there is only one cluster or

some condition is satisfied

• Divisive: Start with one cluster and iteratively divide it into smaller

clusters, until each element is in its own cluster or some condition

is satisfied

Clustering Techniques

João Marques

58513

• Hierarchical: Organize elements into a tree, where leaves

represent the objects and the length of the paths between leaves

represents the distances between objects. Similar objects lie

within the same sub-trees. This type of clustering results in a

dendogram.

• Partitional: Partitions the elements into a specified number of

groups. This is the most used type of clustering used when we

want to differentiate between image and background, where the

number of groups is two.

Kmeans

João Marques

58513

This method requires a set V of points (pixel values) and the number k

of clusters to be formed.

In the end, the algorithm returns a set X of k points that minimizes the

squared error distortion over all possible choices of X.

One popular heuristic that is efficient is the Lloyd Algorithm.

Kmeans – Lloyd Algorithm

João Marques

58513

1. Arbitrarily assign 2 cluster centers (0 and 255 for example).

2. While the cluster centers keep changing,

3. Set each pixel to the cluster that it is closest to.

4. At the end, calculate the centers of the 2 clusters as the mean

of all the values of that cluster.

This algorithm may lead to a merely local optimal solution!

Riddler1

João Marques

58513

Algorithm that selects a statistically optimal threshold, based on the

contents of the image.

The main principle is to divide the pixels according to the average value

of the whole signal.

1Riddler, T. W., “Picture Thresholding Using an Iterative Selection Method”, 1978

Riddler

João Marques

58513

1. Calculate the average value of all pixels

2. Divide the pixels into two groups: those below the average value

computed and those above it.

3. Calculate the average value of both groups.

4. Calculate the mean of both average values.

5. While the mean keeps changing,

6. Redivide the pixels into two groups.

7. Compute the average value of both groups.

8. Calculate the mean of both average values.

Otsu2

João Marques

58513

This algorithm makes use of the probability distribution of the pixel

values.

An optimal threshold is selected as to maximize the separability of the

resultant classes in gray levels, using the zero-th and first-order

cumulative moments of the gray level histogram.

2Otsu, N., “A Threshold Selection Method from Gray-Level histograms”, 1979

Otsu

João Marques

58513

1. Calculate μ = average value of the set of pixels.

2. Compute the probability histogram.

3. Create two clusters: one with the first histogram level, and another

with the rest.

4. Assing σmax = 0;

5. While there is more than one element in the second cluster,

6. Calculate the variance between the two clusters.

7. If this variance is greater than σmax ,keep it.

8. Remove one element from cluster 2 and add it to cluster 1.

Kittler3

João Marques

58513

In this algorithm, it is assumed that the pixel values distribution will be

Gaussian for each gray level.

Knowing the probability distribution a priori allows certain deductions

to be made, transforming this threshold-finding problem into a

minimization problem of a criterion function, which is much simpler.

3Kittler, J., Illingworth, J., “Minimum Error Thresholding”, 1986

Kittler – Criterion Function

João Marques

58513

The criterion function results from algebraic manipulation of the relation

P1p(g|1)=P2p(g|2),

where Pi represents probability of occurrence of the class i and p(g|i)

represents the normal distribution of the class i. Here, g represents the

optimal threshold that separates image and background.

The function to be minimized will be the following:

J(T)=1+2[P1(T)log(σ1(T))+P2(T)log(σ2(T))]

-2[P1(T)log(P1(T))+P2(T)log(P2(T))]

Kittler

João Marques

58513

1. Compute the probability histogram.

2. Create two clusters: one with the first histogram level, and another

with the rest.

3. Assign Jmin = ∞.

4. While there is more than one element in the second cluster,

5. Calculate J(g) for the specific gray level separation.

6. If this value is smaller than Jmin,keep it.

7. Remove one element from cluster 2 and add it to cluster 1.

ImageJ4

João Marques

58513

Java application available on the Internet.

Provides tools for image processing.

ImageJ provides with a set of Java packages that allow

(relatively) easy plugin creation.

Anyone is free to add their own plugin to the ImageJ database.

4For more information please visit http://rsbweb.nih.gov/ij/

Example 1

João Marques

58513

Image Background

Example 1

João Marques

58513

Image + Background

Example 1

João Marques

58513

Results:

• Kmeans: 77

• Riddler: 77

• Otsu: 76

• Kittler: 77

Example 2

João Marques

58513

Image Background

Example 2

João Marques

58513

Image + Background

Example 2

João Marques

58513

Results:

• Kmeans: 121

• Riddler: 120

• Otsu: 119

• Kittler: 129

Results Obtained

João Marques

58513

All these algorithms were tested in a real set of 35 medical images, and

produced threshold values as follows:

40

50

60

70

80

90

100

Th

resh

old Otsu

Kittler

Riddler

Kmeans

Results Obtained

João Marques

58513

All results agree with each other, except for the Kittler algorithm.

This can be explained by the fact the distributions are not exactly

normal, and as such there are errors inherent to this approach. One

of the main limitations is that the background histogram is in fact a

normal distribution, but finishes suddenly at 0 (incomplete normal).

This will affect the calculations of mean value and standard deviation.

Flow Simulation Analysis

João Marques

58513

It is interesting to study applications of this kind of algorithms.

This can be done with Computational Flow Dynamics.

Flow Simulation Analysis

João Marques

58513

Flow Simulation Analysis

João Marques

58513

Flow Simulation Analysis

João Marques

58513

Flow Simulation Analysis

João Marques

58513

Flow Simulation Analysis

João Marques

58513

Flow Simulation Analysis

João Marques

58513

Final Remarks

João Marques

58513

The segmentation method used to model the vessel is determinant in

CFD results. Different methods may lead to very different results!

There are still other methods that can be implemented.

João Marques

58513

The End

Recommended