1 / 54

電腦視覺 Computer and Robot Vision I

電腦視覺 Computer and Robot Vision I. Chapter2: Binary Machine Vision: Thresholding and Segmentation Instructor: Shih- Shinh Huang. Contents. Introduction Thresholding Connected Components Labeling Signature Segmentation and Analysis. Computer and Robot Vision I. Introduction.

adina
Download Presentation

電腦視覺 Computer and Robot Vision I

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 電腦視覺Computer and Robot Vision I • Chapter2:Binary Machine Vision: • Thresholding and Segmentation • Instructor: Shih-Shinh Huang

  2. Contents Introduction Thresholding Connected Components Labeling Signature Segmentation and Analysis

  3. Computer and Robot Vision I Introduction • 2.1 Introduction

  4. 2.1 Introduction Binary Machine Vision • Binary Image • Binary Value 1: Part of Object • Binary Value 0: Background Pixel • Definition of Binary Machine Vision • Generation and analysis of such a binary image

  5. 2.1 Introduction Binary Machine Vision • Thresholding • It is the first step of binary machine vision • It is a labeling operation • Connected Components / Signature Analysis • They are multilevel vision grouping techniques. • They make a transformation from image pixels to more complex units. • Regions • Segments

  6. Computer and Robot Vision I Introduction • 2.2Thresholding

  7. 2.2 Thresholding Introduction • What is Thresholding ? • It is a labeling operation. • It assigns a binary value to each pixel. • Binary Value 1: pixels have higher intensity values • Binary Value 0: pixels have higher intensity values

  8. 2.2 Thresholding Introduction • Mathematical Formulation • : row and column • : gray-level intensity image • : intensity threshold • : binary intensity image

  9. 2.2 Thresholding Introduction How to select an appropriate threshold ?

  10. 2.2Thresholding Introduction Image Image • Approaches • Global Thresholding: use a global value to make the pixel distinction in the image. • Local Thresholding: use spatial varying threshold to label the local pixels.

  11. 2.2 Thresholding Histogram number of elements m spans each gray level value e.g. 0 - 255 Definition of Histogram Histogram Probability

  12. 2.2 Thresholding Histogram Examples

  13. 2.2 Thresholding Histogram

  14. 2.2 Thresholding Histogram T=110 T=130 T=150 T=170

  15. 2.2 Thresholding Within-Group Variance • Observations • A group is a set of pixels with intensity homogeneity. • Homogeneity is measured by the use of variance • High homogeneity group has low variance • Low homogeneity group has high variance • Objective • Select a dividing score such that the weighted sum of the within-group variances is minimized.

  16. 2.2 Thresholding Within-Group Variance • Definition: weighted sum of group variances • : probability for the group with values • : probability for the group with values • : variance for the group with values • : variance for the group with values

  17. 2.2 Thresholding Within-Group Variance • Objective Formulation • Find a threshold which minimizes

  18. 2.2 Thresholding Within-Group Variance All variables should be re-compute at each iteration. • Implementation Issue • Step1: For t=0,…,255 • Step2: Compute , , , and • Step3: Compute • Step4: If is less than the value in the previous iteration

  19. 2.2 Thresholding Within-Group Variance • Implementation Issue • Speed-Up Formulation

  20. 2.2 Thresholding Within-Group Variance • Implementation Issue • Speed-Up Formulation

  21. 2.2 Thresholding Within-Group Variance • Implementation Issue • Speed-Up Formulation

  22. 2.2 Thresholding Within-Group Variance • Implementation Issue • Speed-Up Formulation

  23. 2.2 Thresholding Within-Group Variance constant minimize maximize • Implementation Issue • Speed-Up Formulation

  24. 2.2 Thresholding Within-Group Variance • Implementation Issue • Speed-Up Formulation • We have recursive form to compute optimal threshold.

  25. 2.2 Thresholding Within-Group Variance Example

  26. 2.2 Thresholding Kullback Information Distance • Assumption • The observations come from a weighted mixture of two Gaussians distributions. • Gaussian Distribution of Background • Gaussian Distribution of Object

  27. 2.2 Thresholding Kullback Information Distance Background Gaussian Distribution Object Gaussian Distribution

  28. 2.2 Thresholding Kullback Information Distance • Objective Formulation • Determine a threshold T that results in two Gaussian distributions which minimizeKullback divergence • P(I) : observed histogram distribution • f(I) : a mixture of Gaussian distributions determined by T

  29. 2.2 Thresholding Kullback Information Distance • Objective Formulation • Known Parameter: Observed Histogram • Unknown Parameter: Two Gaussian Distributions

  30. 2.2 Thresholding Kullback Information Distance Constant Solution Derivation

  31. 2.2 Thresholding Kullback Information Distance • Solution Derivation • Assumption: The modes are well separated.

  32. 2.2 Thresholding Kullback Information Distance Solution Derivation

  33. 2.2 Thresholding Kullback Information Distance • Implementation Issue • Step1: For t=0,…,255 • Step2: Compute , , , and • Step3: Compute • Step4: If is less than the value in the previous iteration

  34. 2.2 Thresholding Kullback Information Distance Example

  35. 2.2 Thresholding Kullback Information Distance Within Group Variance (Otsu) Kullback Information (Kittler-Illingworth)

  36. Computer and Robot Vision I Introduction • 2.3 Connected Component Labeling

  37. 2.3 Connected Component Labeling Introduction • Description • Connected Components labeling is a grouping operation. • It performs the unit change from pixel to region or segment. • All pixels are given the same identifier • Have value binary 1 • Connect to each other

  38. 2.3 Connected Component Labeling Introduction • Terminology • label: unique name or index of the region • connected components labeling: a grouping operation • pixel property: position, gray level or brightness level • region property: shape, bounding box, position, intensity statistics

  39. 2.3 Connected Component Labeling Connected Component Operators • Definition of Connected Component • Two pixels and belong to the same connected component if there is a sequence of 1-pixels , where • are neighbor

  40. 2.3 Connected Component Labeling Connected Component Operators 4-connected Original Image Connected Components 8-connected Neighborhood Types

  41. 2.3 Connected Component Labeling Connected Component Algorithms • Common Features • Process a row of image at a time • Assign a new labels to the first pixel of each component. • Propagate the label of a pixel to its neighbors to the right or below it.

  42. 2.3 Connected Component Labeling Connected Component Algorithms • What label should be assigned to A • How does the algorithm keep track of the equivalence of two labels • How does the algorithm use the equivalence information to complete the processing Common Features

  43. 2.3 Connected Component Labeling Algorithm1: Iterative Algorithm • Use no auxiliary storage • Computational Expensive • Algorithm Steps • Step1 (Initialization): Assign an unique label to each pixel. • Step2 (Iteration) : Perform a sequence of top-down and bottom-up label propagation.

  44. 2.3 Connected Component Labeling Algorithm2: Classic Algorithm • Two-Pass Algorithm • Pass 1: • Perform label assignment and label propagation • Construct the equivalence relations between labels when two different labels propagate to the same pixel. • Apply resolve function to find the transitive closure of all equivalence relations. • Pass 2: • Perform label translation.

  45. 2.3 Connected Component Labeling Algorithm2: Classic Algorithm {2=4} {3=5} {1=5} Example:

  46. 2.3 Connected Component Labeling Algorithm2: Classic Algorithm {2=4} {3=5} {1=5} {2=4} {1=3=5} • Computational Efficiency • Need a lot of space to store equivalence • Example: • Resolve Function

  47. Computer and Robot Vision I Introduction • 2.4 Signature Segmentation and Analysis

  48. 2.4 Signature Segmentation and Analysis Introduction • Description • Signature analysis perform unit change from the pixel to the segment. • It was firstly used in character recognition • Definition of Signature • The signature, which is a projection, is the histogram of the non-zero pixels of the masked image.

  49. 2.4 Signature Segmentation and Analysis Introduction • General Signatures • Vertical Projection • Horizontal Projection • Diagonal Projection

  50. 2.4 Signature Segmentation and Analysis Signature Segmentation • Steps • Thresholding: generate the binary image. • Projection Computation: compute the vertical, horizontal, or diagonal projections. • Projection Segmentation: divide the image into several segments or regions according to the signatures.

More Related