1 第六章 医学图像分割 image segmentation....
TRANSCRIPT
1
第六章 医学图像分割
Image Segmentation
所谓图像分割,就是根据医学图像的某种相似性特征(如亮度、颜色、纹理、面积、形状、位置、局部统计特征或频谱特征等)将医学图像分割为若干个互不相交的连通区域的过程,相关特征在同一区域内表现出一致性或相似性,而不同区域间表现出明显的不同 ,即在区域边界上的像素具有某种不连续性。一般说来,有意义的图像分割结果中至少存在一个包含感兴趣目标的区域。
Image segmentation refers to the process of partitioning a digital image into multiple regions (sets of pixels). The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze. Image segmentation is typically used to locate objects and boundaries (lines, curves, etc.) in images.
Defination of image segmentation
6.1 Introduction
4
•The process of segmenting image into meaningful groups of connected pixels is called segmentation
•The difficulty in representing the word “meaningful” in low level image feature space makes segmentation one of the hardest computer vision problems
qualitative quantitative
5
What is Image Segmentation ? Partitioning of an image into related
regions.
6
7Finding the Corpus Callosum( 胼胝体)
cerebel
cerebrum
hippocampal
Corpus Callosum
8
9
Why do Image Segmentation ?
Image Compression - Identify distinct components within an image and use the most suitable compression algorithm for each component to get a higher compression ratio.
Medical Diagnosis - Automatic segmentation of MRI images for identification of cancerous regions.
10
Applications of image segmentation
Tissue
organor
shape
boundary
area
volume
measurement
Pathology
information
Functional
information
diagnosis
treatmentsegmentation
Circularity, density, linearity, sphericity, …features
11
1 、 therapy effect evaluation of tumour
2 、 recognition and classification blood cells
3 、 edge detection of coronary artery
4 、 pre-operation planning and surgical navigation
5 、 computer aided diagnosis/detection
6 、 medical image 3D reconstruction & visualization
12
The difficulties of medical image segmentation
1 、 tissue structures of human body are very complex, the edge or boundary between different tissue or organ is very blurry.
2 、 the precision requirement of segmentation to medical image is very high.
3 、 the segmentation speed(real-time 、 high speed)
13
14
15
16
18
6.2 The classification of medical image segmentation methods
19
Regions and Edges
• Ideally, regions are bounded by closed contours – We could “fill” closed contours to obtain regions
– We could “trace” regions to obtain edges
• Unfortunately, these procedures rarely produce satisfactory results.
20
Regions and Edges
• Edges are found based on DIFFERENCES between values of adjacent pixels.
• Regions are found based on SIMILARITIES between values of adjacent pixels.
• Goal associate some higher level – more meaningful units with the regions of the image
21
Regions
• Regions should be homogeneous with respect to some characteristic (gray level, texture, color)
• Interiors should be simple – no holes
• Adjacent regions should be significantly different
• Boundaries should be smooth – not ragged
22
• Segmentation is based on two basic properties of gray-level values:
– Discontinuity, i.e. to partition the image based on abrupt changes in intensity (gray levels), e.g. edges
– Similarity, i.e. to partition the image into similar (according to predefined criteria) regions, e.g. thresholding, region growing, region splitting and merging
23
Segmentation, i.e. the identification of objects in an image, is usually the first step of an automated image analysis. It can be based on either discontinuity or similarity of gray-level values.
Approaches based on discontinuity inter-region are based on the detection of edges.
Approaches based on similarity inner-region identify an object by its typical (and hopefully unique) range of grey-levels, texture, or other characteristic property.
In many cases the histogram shows two distinct areas representing the object and the background; with such a "bimodal" histogram a threshold between these two areas easily seperates the object.
24
According to the degree of human interference in the process of image segmentation,we can classfy medical image segmentation methods into three categories:
1 、 Manual segmentation
2 、 semi- Automated segmentation ( supervised,human-computer interactive )
3 、 Automated segmentation (unsupervised)
25
White line –delineatived by computer
black line –delineatived by a doctor
26
Research status quo & development direction of medical image segmentation
status quo:the complexity & variety of medical image
the multiformity of segmentation methods
Each method has strong pertinency
Clinical application:manual &semi-automated
27
Direction:
Automated segmentaion: high speed , Accurate
Fusion of different methods
hybrid
AI(Artificial Intelligence)
intelligentized
+knowledge+atlas
Evolutionary learningPattern Recognition
28
Fuzzy clustering
Fuzzy reasoning
Fuzzy Logic
Data Mining
Genetic Algorithm
Artificial Neural Network
Support Vector Machine
….Soft computation
29
Segmentation based on threshold ,
Histogram-based segmentation
30
Thresholding
A thresholded image:
Tyxf
Tyxfyxg
),( if 0
),( if 1),(
(objects)
(background)
31
Single thresholding Multiple thresholding
32
Thresholding
In a: light objects in dark background
To extract the objects:
Select a T that separates the objects from the background
i.e. any (x,y) for which f(x,y)>T is an object point.
33
Thresholding
In b: a more general case of this approach (multilevel thresholding)
So: f(x,y) belongs:
To one object class if T1<f(x,y)≤T2
To the other if f(x,y)>T2
To the background if f(x,y)≤T1
34
Thresholding
Thresholding can be viewed as an operation that involves tests against a function T of the form:
)],(),,(,,[ yxfyxpyxTT
where p(x,y) denotes some local property of this point.
35
Thresholding
When T depends only on f(x,y) global threshold
When T depends on both f(x,y) and p(x,y)
local threshold
When T depends on x and y (in addition) dynamic threshold
36
Simple Global Thresholding
To partition the image histogram by using a single threshold T.
Then the image is scanned and labels are assigned.
This technique is successful in highly controlled environments.
37
Image SegmentationImage Segmentation
38
39
The methods used for selecting threshold
Based on histogram Applied iterative methods Otsu method (Maximum Variance
between Clusters) Minimal error
40
Based on histogram
Tbackground object
41
Applied iterative methods
(1) 、 selection initial threshold value T0 for image average gradation, according to T0, the image can be segmented into two parts TA and TB
(2) 、 calculate 21
BA TTT
(3) 、 let T0 =TK , K=K+1, Go to (1) until TK + 1 = TK
TK
42
The pseudo-code1 、 k=0,let t=tk;2 、 if f(x,y)<tk, then f(x,y)∈TA
else f(x,y)∈TB
3 、 calculate the mean of class TA u4 、 calculate the mean of class TB v5 、 k=k+16 、 tk=u+v/27 、 if tk≠tk+1, then goto 2 else goto 88 、 end
Several terms: hill climbing; step-by-step approximation approach; successive approximation approach; stepwise approximation. method of optimization
44
Otsu’s Thresholding Method Based on a very simple idea: Find
the threshold that minimizes the weighted within-class variance.
This turns out to be the same as maximizing the between-class variance.
Operates directly on the gray level histogram [e.g. 256 numbers, P(i)], so it’s fast (once the histogram is computed).
(1979)
45
Otsu: Assumptions
Histogram (and the image) are bimodal. No use of spatial coherence, nor any
other notion of object structure. Assumes stationary statistics, but can be
modified to be locally adaptive. (exercises)
Assumes uniform illumination (implicitly), so the bimodal brightness behavior arises from object appearance differences only.
46
The basic theory of Otsu method: If an image has m gray levels (i=1,2,….m), every gray
level i has ni pixels, we select a thresholding k, the image can be separate into two parts using T:C0={1,2,⋯,k} , C1={k+1,k+2,⋯,m} , the probability of C0 is the mean of C0 is , the probability of C1 is , the mean of C0 is
, is the mean of whole image, and ,
then the between-class variance is
k
ii kP
10 )(
)(01
0 kiPk
ii
m
kii kP
11 )(1
))(1())((11
1 kkiPm
kii
m
iiiP
1
1100
21010
211
200
2 )()()()( k
47
48
Minimal error
E(T)=Eo(T)+Eb(T)
Tbackground object
49
The strongpoints of thresholding segmentation
1 、 algorithm simple ,realize easily
2 、 high speed
The shortcomings of thresholding segmentation
1 、 it is an effective method when the difference between object and background is big enough
2 、 can not obtain ideal segmentation effect to complicated medical image
50
Edge Detection
Edge (a set of connected pixels): the boundary between two regions with
relatively distinct gray-level properties. Assumption:
the regions are sufficiently homogeneous, so that the transition between two regions can be determined on the basis of gray-level discontinuities alone.
Edge--based segmentation
51
Image SegmentationImage Segmentation
52
Image SegmentationImage Segmentation
53
54
Edge Detection Basic Idea:
A profile is defined perpendicularly to the edge direction and the results are interpreted.
The magnitude of the first derivative is used to detect an edge (if a point is on a ramp)
The sign of the second derivative can determine whether an edge pixel is on the dark or light side of an edge.
Remarks on second derivative: It produces two responses for every edge The line that can be formed joining its positive and
negative values crosses zero at the mid point of the edge (zero-crossing)
55
Edge Detection
Computation of a local derivative operator
The first derivative is obtained by using the magnitude of the gradient at that point.
The second derivative is obtained by using the Laplacian.
56
Gradient Operators
y
fx
f
G
GF
y
x
The gradient vector points in the direction ofmaximum rate of change of f at (x,y).
57
Gradient Operators
Gradient:2/122 ][)( yx GGFmagf
(maximum rate of increase of f(x,y) per unit distance)
|||| yx GGf
Direction angle of ∇f at (x,y):
x
y
G
Gyxa 1tan),(
58
Image SegmentationImage Segmentation
59
Image SegmentationImage Segmentation
60
Image SegmentationImage Segmentation
61
Image SegmentationImage Segmentation
62
Image SegmentationImage Segmentation
63
Gradient Operators
Computation of the gradient of an image:
Soebel operators provide both a differencing & a smoothing effect:
)2()2( 321987 zzzzzzGx
)2()2( 741963 zzzzzzGy
64
Summary The magnitude of the first derivative
detects the presence of an edge and the sign of the second detects whether the edge pixel lies on the dark or light side of an edge.
The second derivative has a zero-crossing at the mid-point of a transition.
' The first derivative of an image has a peak at the edge
' The second derivative of an image has a zero crossing at the edge
65
Laplacian
(of a 2-D function f(x,y)):2
2
2
22
y
f
x
ff
• A 3 x 3 discrete mask based on the above is:
)(4 864252 zzzzzf
66
Laplacian
The idea:
Coefficient of center pixel should be positive Coefficients of outer pixels should be negative Sum of coefficients should be zero
(the Laplacian is a derivative)
67
Image SegmentationImage Segmentation
68
Laplacian
The Laplacian is seldom used in practice, because:
It is unacceptably sensitive to noise (as second-order derivative)
It produces double edges It is unable to detect edge direction
69
Laplacian
An important use of the Laplacian:
To find the location of edges using its zero-crossings property.
Plus, the Laplacian plays only the role of detector of whether a pixel is on the dark or light side of an edge.
70
Laplacian
Convolve an image with the Laplacian of a 2D Gaussian function of the form:
h(x,y) exp x 2 y 2
2 2
where is the standard deviation.
71
Laplacian
The Laplacian of the above Gaussian is:
2h r2 2
4
exp
r2
2 2
where r2 = x2 + y2.
determines the degree of blurring that occurs.
72
Image SegmentationImage Segmentation
73
Image SegmentationImage Segmentation
74
Region-based segmentation
We would like to use spatial information.We assume that neighboring pixels tend to belong to the same segment (not always true)
75
Region-based segmentation
Basic FormulationLet R represent the entire image region.Segmentation: Partitioning R into n subgroups Ri s.t:
1) 2)3)4)
P is the partition predicate
i
i RR
ji RR
TrueRP i )(FalseRRP ji )(
条件①说明了分割的完整性,即分割算法对图像的每个像素都进行了操作,使得每个像素都被归类到某个区域(或类),没有遗漏;
条件②保证了两个不同的区域(或类)没有交集,即没有某个像素可能属于两个不同的区域(或类);
条件③说明了分割后的每个区域将达到最大尺度; 条件④ 说明了每个分割区域(或类)按照某种属
性具有均匀性(即相同或相似),这种属性可以是各种图像特征(如灰度、纹理等)或效应的某种语义的描述。
77
The basic idea of Region-growing
Starting from a seed region(can be a single pixel),growing step by step , until a maximal consistent region can be reached .
Main problems:
•How to select a seed or a seed region
•How to ascertain consistency measurement of growing rule.
consistency measurementGeneral methods: gray-level mean, gray-level variance, texture,color, region shape.
78
Region growingChoose a group of points as initial regions.Expand the regions to neighboring pixels using a heuristic:
gray distance from the neighbors.The total error in the region (till a certain threshold):
VarianceSum of the differences between neighbors.Maximal difference from a central pixel.
In some cases, we can also use structural information: the region size and shape.
In this way we can handle regions with a smoothly varying gray level or color.Question: How do we choose the starting points ? It is less important if we also can merge regions.
79
80
Original image T3
T1 T8
81
Region merging and splitting In region merging we start with small regions (it can be
pixels), and iteratively merge regions which are similar. In region splitting, we start with the whole image, and
split regions which are not uniform. These methods can be combined. Formally:
1. Choose a predicate P.
2. Split into disjoint regions any region Ri for which
3. Merge any adjacent regions Ri and Rj for which
4. Stop when no further merging and splitting is possible.
FalseRP i )(
TrueRRP ji )(
82
QuadTree
R1
R3 R4
R21 R22
R23 R24 R1 R3 R4
R21 R22 R24
R2
R23
R
With quadtree, one can use a variation of the split & merge scheme:
•Start with splitting regions.•Only at the final stage: merge regions.
83
任何一幅图像都可以用多层四叉树来表示。若图像大小为 N×N ,且 N=2m 时,其层数为 m+1 。例如: m=2 ,层数= 2+1=3
具体步骤
84
85
86
87
88
K-means algorithm
• Choose k data points to act as cluster centers
• Until the clustering is satisfactory
- Assign each data point to the cluster that has the nearest cluster center
- Ensure each cluster has at least one data point – splitting, etc
- Replace the cluster centers with the means of the elements in the clusters
89
90
Issues
What is a good partition ? How can you compute such a
partition efficiently ?