CS 654 Digital Image Analysis Lecture 26 Image
- Slides: 45
CS 654: Digital Image Analysis Lecture 26: Image segmentation
Recap of Lecture 25 • Line detection • Least square, RANSAC • Hough space/ parametric space • Voting • Circle detection • GHT
Outline of Lecture 26 • Thresholding • Otsu’s method • Region based segmentation • Region growing • Split and Merge
Introduction • Detected boundaries between regions • Pixel distribution was not exploited • Can the regions be segmented directly? • How to exploit the top-down/ bottom-up cues? • Threshold • Region-based segmentation
Thresholding Global thresholding, local thresholding, adaptive thresholding Multiple thresholding
Key factors • Separation between peaks • The noise content in the image • The relative size of the object and the background • Uniformity of the illumination source • Uniformity of the reflectance property of the image Automatic threshold selection
Iterative threshold selection •
Optimal thresholding Definition: Methods based on approximation of the histogram of an image using a weighted sum of two or more probability densities with normal distribution.
Example Input image Histogram Segmented image
Otsu’s Image Segmentation Algorithm • Find the threshold that minimizes the weighted within-class variance. • Equivalent to: maximizing the between-class variance. • Operates directly on the gray level histogram [e. g. 256 numbers, P(i)] • It is fast (once the histogram is computed).
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 • Assumes uniform illumination (implicitly), so the bimodal brightness behavior arises from object appearance differences only.
Otsu’s method: Formulation The weighted within-class variance is: Where the class probabilities are estimated as: And the class means are given by:
Otsu’s method: Formulation Finally, the individual class variances are: Run through the full range of t values and pick the value that minimizes Is this algorithm first enough?
Between/ Within/ Total Variance • The total variance does not depend on threshold (obviously). • For any given threshold, the total variance is the weighted sum of the within-class variances • The between class variance, which is the sum of weighted squared distances between the class means and the global mean.
Total variance The total variance can be expressed as Within-class, from before Between-class, Minimizing the within-class variance is the same as maximizing the between-class variance. compute the quantities in range of t values. recursively as we run through the
Recursive algorithm Initialization. . . Recursion. . . ;
Example Input image Global thresholding Histogram Otsu’s method
Example (in presence of noise) Input image Histogram Global threshold Smoothened image Histogram Otsu’s method
Image partitioning Input image Global Otsu’s Method Histogram Image partitioning Global threshold Local Otsu’s method
Thresholding (non-uniform background) Input image Global thresholding using Otsu’s method Local thresholding with moving average
Region based segmentation • Goal: find coherent (homogeneous) regions in the image • Coherent regions contain pixel which share some similar property • Advantages: Better for noisy images • Disadvantages: Oversegmented (too many regions), Undersegmented (too few regions) • Can’t find objects that span multiple disconnected regions
Types of segmentations Input Oversegmentation Undersegmentation Multiple Segmentations
Region Segmentation: Criteria Homogeneity predicate is satisfied by each region. Union of adjacent regions does not satisfy it. Define and implement the similarity predicate.
Methods of Region Segmentation • Region growing • Split and merge • Clustering
Region Growing • It start with one pixel of a potential region • Try to grow it by adding adjacent pixels till the pixels being compared are too dissimilar • The first pixel selected can be • The first unlabelled pixel in the image • A set of seed pixels can be chosen from the image. • Usually a statistical test is used to decide which pixels can be added to a region
Example Histogram Input image Initial Seed image Final seeds Threshold 1 Threshold 2 Region growing Output image
Split and Merge •
Example Input image R 1 R 23 R 24 R 32 R 4 R 33 Split R 22 R 1 R 3 R 21 R 34 Split Merge
Quadtree representation R 21 R 23 R 31 R 32 R 33 R 34 R 3 R 24 R 23 R 24 R 2 R 22 R 1 R 21 R 31 R 4 R 32 R 33 R 34
Clustering • Task of grouping a set of objects • Objects in the same group (called a cluster) are more similar (in some sense or another) to each other • Object of one cluster is different from an object of the another cluster • Connectivity model, centroid model, distribution model, density model, graph based model, hard clustering, soft-clustering, …
Feature Space Source: K. Grauman
Centroid model • Computational time is short • User have to decide the number of clusters before starting classifying data • The concept of centroid • One of the famous method: K-means Method
Partitional Clustering • K-mean algorithm : Decide the number of the final classified result with N. Numbers of cluster: N we now assume N=3
Partitional Clustering • K-mean algorithm : Randomly choose N point for the centroids of cluster. (N=3) Numbers of cluster: N
Partitional Clustering • K-mean algorithm : Find the nearest point for every centroid of cluster. Classify the point into the cluster. Notice the definition of th nearest!
Partitional Clustering • K-mean algorithm : Calculate the new centroid of every cluster. Notice the definition of the centroid!
Partitional Clustering • K-mean algorithm : Repeat step 1~ step 4 until all the point are classified.
Partitional Clustering • K-mean algorithm : Repeat step 1~ step 4 until all the point are classified.
Partitional Clustering • K-mean algorithm : Repeat step 1~ step 4 until all the point are classified.
Partitional Clustering • K-mean algorithm : Repeat step 1~ step 4 until all the point are classified.
Partitional Clustering • K-mean algorithm : Repeat step 1~ step 4 until all the point are classified.
Partitional Clustering • K-mean algorithm : Data clustering completed For N=3
Example Image Clusters on intensity Clusters on color Slides by D. A. Forsyth
Example Input image Segmentation using K-means
Thank you Next Lecture: Image segmentation
- Sig fig
- 654 to 1 significant figure
- 654
- Ece 654
- 01:640:244 lecture notes - lecture 15: plat, idah, farad
- Image transform in digital image processing
- Linear position invariant degradation
- Fundamentals of image compression
- Key stages in digital image processing
- Analog image and digital image
- Fidelity criteria in digital image processing
- Image sharpening and restoration
- Image geometry in digital image processing
- Zooming and shrinking in digital image processing
- Image transforms in digital image processing
- Maketform
- Image restoration in digital image processing
- Image processing lecture notes
- Geometric transformation in digital image processing
- Exploratory data analysis lecture notes
- Sensitivity analysis lecture notes
- Factor analysis lecture notes
- Analysis of algorithms lecture notes
- Streak plate method performed on
- Power system analysis lecture notes
- H.i.n.k.merupakan akronim dari
- E-commerce: digital markets, digital goods
- Digital data digital signals
- Data encoding and modulation
- E-commerce: digital markets, digital goods
- Data encoding techniques
- Luxembourg digital innovation hub
- E-commerce digital markets digital goods
- Boundary descriptors in digital image processing
- Representation and description in digital image processing
- Threshold image matlab
- Oerdigital
- Relationship between pixels in digital image processing
- Intensity transformation and spatial filtering
- For coordinates p(2,3)the 4 neighbors of pixel p are
- Digital photography with flash and no-flash image pairs
- Digital images definition
- Gray level transformation in digital image processing
- For coordinates p(2,3)the 4 neighbors of pixel p are
- Coordinate conventions in digital image processing
- Dam construction in digital image processing