Title: ECSE6963, BMED 6961 Cell
1ECSE-6963, BMED 6961Cell Tissue Image Analysis
- Lecture 11 Blob Segmentation Basics (Contd)
- Badri Roysam
- Rensselaer Polytechnic Institute, Troy, New York
12180.
2Recap
- Pre-processing can improve thresholding results
- Smoothing by averaging in space and/or time
- Average, weighted average, median, weighted
median - Rank filters (min, median, max) can help in a
variety of ways - Median filtering (smoothing), Grayscale Erosion,
Dilation, Opening, Closing are basic cleanup
operators that result from rank filters - Choice of pixel neighbors makes a difference
- Today
- Adaptive Smoothing Algorithms
3Recap Basic Steps to Blob Segmentation
- Pre-process the image to improve Step 2
- Separate the foreground from the background
- We looked at intensity-based segmentation methods
- Gives us a set of connected blobs
- Break up the connected blobs into individuals
using every available hint - Shape, appearance (intensity, texture),
fluorescence - Make measurements for each individual blob
- Classify individual blobs into cell types
- Figure out how much confidence we have in our
results - Present the low confidence cases to the user
for editing - Present the edited results for acceptance!
4Introducing the Idea of Iterative Smoothing
- Smoothing is performed in a series of small
steps, instead of just one step - One simple approach is to apply the same
algorithm repeatedly - Repeated median gives an unchanging pattern
called the median root - Consists of flat regions with sloped edges
Median root, radius 1
Smoothing
5Adaptive Smoothing
- Basic Idea Apply different algorithms and/or
settings to different pixels based on some local
criteria. - No universal algorithm, need to build a custom
algorithm for each application/modality/object
type - More computation, but often well worth it.
- Example 1
- Smooth the background, but not the objects of
interest. - Pixels brighter than threshold T are left
untouched, while others are replaced by
neighborhood averages (i.e., smoothed over) - Example 2
- Suppress the averaging across known object
boundaries
6Hints from Object Boundaries
- Local Object Boundary
- Local Intensity Gradient
- No smoothing in this direction please!!
- Local Perpendicular to Gradient
- Smoothing in this direction is good!!
7Simple-minded idea Directional 3x3 Smoothing
- Replace pixel value with weighted average for
each kernel - Pick the one that results in the least change
- Implicitly selects the kernel that is
perpendicular to the boundary - The type of averaging can vary
- E.g., center-weighted average
- E.g., median instead of mean
0
0
1
0
1
0
0
1
0
0
1
0
1
0
0
0
1
0
0
0
0
1
0
0
1
1
1
0
1
0
0
0
0
0
0
1
8Practical Considerations
- This algorithm is cute but naïve
- Every little wrinkle in the image appears like
an edge to this algorithm - It has a limited 3?3 view of the image
- Need to distinguish real object boundaries, and
avoid false internal ones - Unfortunately, smoothing can change that answer
- We need ways to prevent premature decisions about
object boundaries - Iterative algorithms can help!
9Edges, Edgels, Boundaries
- Edge Locations of abrupt change in image
properties - Intensity, Texture, Color (spectral signature)
- Edge also used for connected chains of edge
points, i.e., fragments of object contours - Edge points also called edgels (for edge
elements) - The term boundary is used for the real thing
- Edges are a fragmentary estimate of the boundary
Biggest Problem Separating the edges that really
correspond to object boundaries from others
associated with texture and/or noise
10Broader Indications of Boundaries
Noisy observation
True intensity
Step
Ramp
Roof
Ridge
11Basic Data Structures
- Segmentation Labels
- Basis for choosing a custom averaging formula,
or a parameter, at each pixel - Edge Sites
- Basis for suppressing averaging across object
boundaries - Better segmentation helps boundary detection, and
vice versa - Classic chicken and egg situation
0
0
1
0
1
1
1
1
1
12Local Intensity Gradient
is a maximum when
Object boundaries in fluorescence images commonly
occur at locations of high intensity gradients
13Edge Operators
Central Difference Approximation
- Finite-difference approximations to gradient
- Inherently, a noise enhancing operation
- Responds to every little change in I(x,y)
14Example
y
x
Gradient Magnitude
Angle
15Ways to Combat Noise
Averaging along the boundary (Prewitt operator)
Weighted Averaging (Sobel operator)
Another idea Fit a plane
to a local neighborhood of pixels
Then,
16Another Noise Combating Method
- Just suppress weak edges!
- Non-maximum suppression
- At each pixel (x,y), look within a small
neighborhood - Find the maximum gradient magnitude
- If the gradient magnitude at (x,y) is less than
the maximum, simply attenuate it, or set it to
zero! - Better
- Find the local gradient direction
- Do the suppression just along this direction
17Thresholding
- Really, another noise combating method
- Non-maximum suppression still leaves noise-caused
local maxima - If the gradient magnitude is greater than a
threshold T, set edgel to 1 - Else, set edgel to 0.
- Choosing a threshold
- T too low ? Pick up too many noisy edgels
- T too high ? Miss real edgels, making boundaries
discontinuous.
18A Fresh, Look at Gaussian Smoothing
Hot
Pretend for now that pixel intensities I(x,y)
describe the temperature profile over a 2-D
region. With time t, this profile spreads out
according to the following formula
Solution for this differential equation
convolution
19A Fresh Look at Gaussian Smoothing
One way to perform Gaussian smoothing by a kernel
of standard width ? is to solve the heat
diffusion equation, with
20Discrete Scale Space
Consider the 1-D case for simplicity
21Lindebergs Result
Our two scale space requirements are met if and
only if
Limiting case ??1/4 leads to a very simple
update equation
22Lindebergs Result
Recall Approximate Gaussian Smoothing Filter
23Practical Observations
- The ¼ ½ ¼ filter preserves the summed
intensity of the image - N iterations give us a variance of N2
- Computation of this filter is extremely efficient
- Lends itself to parallel computation nicely
- Bottom Line
- The Gaussian can be realized by simulating a
diffusion process
24Smoothing Before Differentiation
Approximate Gaussian Smoothing Filter
Differentiator
Single operation that combines both
(scale factor)
25Smoothing Along a Boundary
Note If image brightness goes up from left to
right, the result response is positive ? The
sign of the response can be put to good use
26Anisotropic Diffusion
Isotropic heat diffusion
constant
Anisotropic version
Analogous to edge sites
Interpret edge sites as conduction coefficients
27The conduction coefficients
Better Use a smoothed version of I(x,y)
instead People have proposed other ways to choose
D(x,y) Basically, any good edge indicator in the
range (0,1) usually works.
28Discrete Approximation
Discrete Approximation
Iterative Solution
29Anisotropic Diffusion
At each iteration, we also update the edge sites
according to
30Example
original
Gaussian, radius 0.7
31Example
Anisotropic diffusion
Gaussian, radius 0.7
32Example
Anisotropic diffusion
Median
33Summary
- Iterative Adaptive Smoothing Algorithms
- Exploiting edges allows effective image smoothing
- Term Projects
- Need a 1-page proposal
- Cross-disciplinary team formation preferred
- Next Class
- Post-processing of thresholding results
- Connected components labeling
- Distance transforms separation of connected
components
34Instructor Contact Information
- Badri Roysam
- Professor of Electrical, Computer, Systems
Engineering - Office JEC 7010
- Rensselaer Polytechnic Institute
- 110, 8th Street, Troy, New York 12180
- Phone (518) 276-8067
- Fax (518) 276-8715
- Email roysam_at_ecse.rpi.edu
- Website http//www.ecse.rpi.edu/roysam
- Course website http//www.ecse.rpi.edu/roysam/CT
IA - Secretary Laraine Michaelides, JEC 7012, (518)
276 8525, michal_at_.rpi.edu - Grader Piyushee Jha (jhap_at_rpi.edu)
Center for Sub-Surface Imaging Sensing