Title: SEMINAR SERIES ON ADVANCED MEDICAL IMAGE PROCESSING EDGE DETECTION
1SEMINAR SERIES ONADVANCED MEDICAL IMAGE
PROCESSING EDGE DETECTION
- MINGYUE DING, PH. D.
- Robarts Research Institute
- London, Ontario, Canada
- July 25, 2002
2CONTENTS
- What is an edge?
- Gradient, curvature and edge detection
- Line detection-Hough transform technique
- Edge representation-B-Spline fitting technique
3 WHAT IS AN EDGE?
- An edge is a set of connected pixels that lie on
the boundary between two regions - The pixels on an edge are called edge points
- Position orientation of edge
- Gray level discontinuity across an edge
4WHY A GRAY LEVEL DISCONTINUITY HAPPENED?
- Different colors, brightness, textures, material,
tissues, - Different normal directions of surfaces
- Different illuminance
5DIFFERENT EDGES
A
Different color
Different brightness
6DIFFERENT EDGES
Different texture
Different surfaces
7UNIQUENESS OF EDGE
- Most of edges are unique in space, i.e., its
position and orientation keep the same in the
space when viewing from different points - Non-unique edge-Limb edge
A
C
A
B
C
D
O1
D
B
Image 2
Image 1
O2
8TYPES OF EDGES
- Gray level profile
derivatives - Step edge
- Ramp edge
- Peak edge
1st
2nd
1st
9DIFFERENT TYPES OF EDGES IN A CT IMAGE
Ramp edge
Step edge
Peak edge
10DEFINITION OF GRADIENT
- A point is defined as an edge point if its 2-D
first or second -order derivative is greater than
a specified threshold. - Gradient of digital image, , is defined
by a vector
11GRADIENT CALCULATATION
- Gradient at an edge point, (x,y), can also be
interpreted as a complex number with its
magnitude determined by - and the direction determined by
12EDGE OPERATORS
- The partial derivatives in x and y, ,
- can be estimated using different ways
- Roberts operator
- Prewitt operator
- Sobel operator
13GRADIENT MASKS
- All operators can be performed by the
convolution using different masks. - Roberts operator masks
14GRADIENT OPERATORS
- Prewitt operator masks
- Sobel operator masks
15CURVATURE
- Curvature is defined as the rate of change of
edge direction. - Suppose is an edge, its
curvature, , is defined as
16CURVATURE
- The curvature at A is larger than B
B
R1
R2
A
edge
17LINE DETECTION
- Line is the most often used and important edge in
an image - A lot of edges are straight lines
- Any edge can be considered as piecewise line edge
- How to detect a straight line in an image?
- To find the straight line that has the maximum
number of points passing through it
18NEEDLE DETECTION IN US IMAGE
Binary image
2D US gray level image
19HOUGH TRANSFORM
- In 1967, Hough proposed to detect line in
parameter space, called Hough transform (HT)
technique
B
y
b
b-xnayn
(x1,y1)
(x2,y2)
yAxB
A
b-x2ay2
b-x1ay1
Cluster
(xn,yn)
x
a
Parameter space
Image space
20LINE-POINT DUALITY OF HOUGH TRANSFORM
- Image space point, line, line detection
- Parameter space line, point,cluster detection
- Accumulator array
- Quantilization of slope and intercept of line
- Thus, the problem of line detection in image
space becomes a cluster detection in parameter
space
21COMPUTATIONAL COMPLEXITY OF THE HT
- Directly perform in (a,b) space
-
(1) - where
- is the size of binary image
- are the possible numbers of a and
b - is the number of addition operations
needed at each point in the binary image - is the fraction of points in the binary
image
22PROBLEMS IN THE HT
- If
-
-
(2)
Problems - Too slow (570s on a computer of 108 adds/s)
- Both a and b are unbounded when the line is
parallel to y-axis
23STANDARD HOUGH TRANSFORM (SHT)
- In 1972, Duda Hart proposed a Standard HT
(SHT). They used the polar coordinate equation of
a straight line
Y
(3)
X
O
24STEPS OF ACCUMULATOR ARRAY CALCULATATION IN SHT
1. Search a point in the binary image 2. Vary the
possible values of from 0 to 3. Calculate
from Eq. (3) 4. Increase by
1 5. If we find a new point in the binary image,
go to Step 1 otherwise stop.
25COMPUTATIONAL COMPLEXITY OF THE SHT
-
(4) - If we use the same values of the parameters in
(2), the computational complexity of the SHT is - It is Nb 512 times faster than HT, but still
too slower for a real-time processing.
26MOTIVATIONS OF REAL-TIME HOUGH TRANSFORM (RTHT)
- Use the smallest image containing the line to
replace the original image - Use Look-up Table for the operations of sin and
cos - Two-stage searching strategy
27SMALLEST IMAGE CONTAINING LINE
M
M
Smallest image
N
N
28TWO-STAGE SEARCHING STRATEGY
- 1. At the coarse stage, we use lower resolution
image to detect the
line where is the original image,
is the magnifying factor,
-
. - 2. At the fine stage, we use with the
approximate line direction determined at the
coarse stage.
29DETERMINATION OF OPTIMAL IMAGE RESOLUTION
- The computational complexity at the coarse stage
is -
(5) - The computational complexity at the fine stage is
-
(6) - The total computational complexity of the RTHT is
-
(7)
30DETERMINATION OF OPTIMAL IMAGE RESOLUTION
- By deriving CRTHT in Eq. (7), we determine
31COMPUTATIONAL COMPLEXITY OF THE RTHT
- Substituting the value of into Eq. (7)
-
- If we use the same values in (2), the
computational complexity of the RTHT is
32REAL-TIME NEEDLE TRACKING
Patient biopsy
Agar phantom
33EDGE REPRESENTATION
- Chain code easy but sensitive
to noise - Edge fitting
- More robust and continuous
- B-spline is a powerful and popular model used in
graphics and image processing -
34B-SPLINE FITTING
What is spline? A spline is a thin flexible
strip made of bamboo or steel that can be bent to
pass through or near given points in the plane In
B-spline, B means Basic
35DEFINITION OF B-SPLINE
- Mathematically splines are piecewise polynomials
with pieces that are smoothly connected together. -
-
(8) - (N1
convolution)
36PROBLEMS IN B-SPLINE
- Need to determine the coefficients for every
Basic functions - Difficult to determine the control points
- Difficult to let the B-spline passing through the
given points accurately.
37CARDINAL-SPLINE
-
-
(9) - where is called the n-order
cardinal-spline function and it can be calculated
from the n-order B-spline function
38BASIC FUNCTIONS
39EXAMPLES
Cardinal-spline
Control points
Cardinal-spline used in initializing a prostate
contour
40EXAMPLES
CONTOUR FITTING USING B-SPLINE
413D RECONSTRUCTION RESULTS
42EDGE IN VTK/ITK
- VTK
- Edge operator
- vtkEdgePoint, vtkImageGradient,
- vtkImageGradientMagnitude,
vtkImageSobel2D, - vtkImageSobel3D,
- B-spline
- vtkSpline, vtkCardinalSpline.
- ITK
- Edge operator
- itkSobelEdgeDetectionImageFilter,
itkSobelOperator - itkGradientMagnitudeImageFilter
- itkGradientToMagnitudeImageFilter
- itkGradientVectorFlowImageFilter
- B-spline itkBSplineInterpolationWeightFunction
- itkBSplineInterpolateImageFunction
43Discussion