Computer and Robot Vision I Chapter 10 Image
Computer and Robot Vision I Chapter 10 Image Segmentation Presented by: 陳雲濤 0921192337 r 03525056@ntu. edu. tw 指導教授: 傅楸善 博士 Digital Camera and Computer Vision Laboratory Department of Computer Science and Information Engineering National Taiwan University, Taipei, Taiwan, R. O. C.
10. 0 關於投影片 l l Online slide: https: //goo. gl/xg. YW 9 X 共同編輯筆記吧 : D DC & CV Lab. NTU CSIE
10. 1 Introduction l image segmentation: l l l segmentation purpose: l l partition of image into set of non-overlapping regions union of segmented regions is the entire image to decompose image into meaningful parts to application segmentation based on valleys in gray level histogram into regions DC & CV Lab. NTU CSIE
10. 1 Introduction (cont’) DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 1 Introduction (cont’) rules for general segmentation procedures l 1. 2. 3. 4. region uniform, homogeneous w. r. t. characteristic e. g. gray level, texture region interiors simple and without many small holes adjacent regions with significantly different values on characteristic boundaries simple not ragged spatially accurate DC & CV Lab. NTU CSIE
10. 1 Introduction (cont’) l Clustering: l l process of partitioning set of pattern vectors into clusters set of points in Euclidean measurement space separated into 3 clusters l In some sense close to one another DC & CV Lab. NTU CSIE
10. 1 Introduction (cont’) DC & CV Lab. NTU CSIE
10. 1 Introduction (cont’) l l l no full theory of clustering no full theory of image segmentation techniques: ad hoc, different in emphasis and compromise DC & CV Lab. NTU CSIE
l Joke DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering l The technique of measurement-space-guided spatial clustering for image segmentation uses the measurement-space-clustering process to define a partition in measurement space. DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l histogram mode seeking: l a measurement-space-clustering process l homogeneous objects as clusters in histogram l one pass, the least computation time DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l enlarged image of a polished mineral ore section DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l 3 nonoverlapping modes: l l l black holes Pyrorhotite pyrite DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l 2 valleys in histogram is a virtually perfect (meaningful) segmentation DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l 原圖 l DC & CV Lab. NTU CSIE 切割後的結果
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l example image not ideal for measurementspace-clustering image segmentation DC & CV Lab. NTU CSIE
l 10. 2 Measurement-Space-Guided Spatial Clustering (cont’) histogram with three modes and two valleys DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l Undesirable: many border regions show up as dark segments DC & CV Lab. NTU CSIE
10. 2 比較 DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l segmentation into homogeneous regions: not necessarily good solution DC & CV Lab. NTU CSIE
l joke DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) ldiagram of an F-15 bulkhead DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l image of a section of the F-15 bulkhead DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l Histogram of the image DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l Five clusters: bad spatial continuation, boundaries noisy and busy DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l three clusters: less boundary noise, but much less detail DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l recursive histogram-directed spatial clustering DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l applied to the bulkhead image DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l performing morphological opening with 3 x 3 square structuring element DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l tiny regions removed, but several long, thin regions lost DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l a color image DC & CV Lab. NTU CSIE
10. 2 Measurement-Space-Guided Spatial Clustering (cont’) l recursive histogram-directed spatial clustering using R, G, B bands and other DC & CV Lab. NTU CSIE
l joke DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding l Kohler denotes the set E(T) of edges detected by a threshold T to be the set of all pairs of neighboring pixels one of whose gray level intensities is less than or equal to T and one of whose gray level intensities is greater than T DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l l 1. pixels 2. min and are neighbors max DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l The total contrast C(T) of edges detected by threshold T is given by DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l The average contrast of all edges detected by threshold T: l The best threshold Tb is determined by the value that maximizes DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l l l l Example T = 50 [45, 110] [33, 88] [15, 65] [45, 115] [0, 225] DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l l l l Example T = 50 [5, 60] [17, 33] [35, 15] [5, 65] [50, 175] DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l l l l Example T = 50 [5, 60] [17, 33] [35, 15] [5, 65] [50, 175] The average contrast of all edges (5+17+15+5+50) / 5 = 18. 4 DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l l l l Example T = 50 [5, 60] [17, 33] [35, 15] [5, 65] [50, 175] The average contrast of all edges (5+17+15+5+50) / 5 = 18. 4 The best threshold Tb is determined by the maximizes DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l l approach for segmenting white blob against dark background pixel with small gradient: not likely to be an edge DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l l if not an edge, then either dark background pixel or bright blob pixel histogram of small gradient pixels: bimodal DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l pixels with small gradients: valley between two modes: threshold point DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l FLIR (Forward Looking Infra-Red) image from NATO (North Atlantic Treaty Organization) database DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l thresholded at gray level intensity 159 and 190 DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l pixels having large gradient magnitude DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l 2 D gray level intensity-gradient space DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 2. 1 Thresholding (cont’) l resulting segmentation: bright object with slightly darker appendage on top DC & CV Lab. NTU CSIE
l joke DC & CV Lab. NTU CSIE
10. 2. 2 Multidimensional Measurement-Space Clustering LANDSAT image: consists of seven separate images called bands Constraints of reality l l 1. 2. high correlation between band-to-band pixel values large amount of spatial redundancy in image data DC & CV Lab. NTU CSIE
10. 2. 2 Multidimensional Measurement-Space Clustering l l l l l Spectral sensitivity of LANDSAT 7 Bands. Band Number Wavelength Interval Spectral Response. 1. 0. 45 -0. 52 µm Blue-Green 2. 0. 52 -0. 60 µm Green 3. 0. 63 -0. 69 µm Red 4. 0. 76 -0. 90 µm Near IR 5. 1. 55 -1. 75 µm Mid-IR 6. 10. 40 -12. 50 µm Thermal IR 7. 2. 08 -2. 35 µm Mid-IR DC & CV Lab. NTU CSIE
10. 2. 2 Multidimensional Measurement-Space Clustering DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 2. 2 Multidimensional Measurement-Space Clustering l l Gonzalez Digital Image Processing First Edition Fig 3. 31 DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 3 Region Growing 10. 3. 1 Single-Linkage Region Growing l l l Single-linkage region-growing schemes: regard each pixel as node in graph neighboring pixels with similar enough properties: joined by an arc image segments: l l maximal sets of pixels belonging to same connected component simple image and the corresponding graph DC & CV Lab. NTU CSIE
10. 3. 1 Single-Linkage Region Growing (cont’) l two pixels connected by edge: if 4 -neighbor and values differ 5 DC & CV Lab. NTU CSIE
10. 3. 1 Single-Linkage Region Growing (cont’) DC & CV Lab. NTU CSIE
l Joke DC & CV Lab. NTU CSIE
10. 3. 2 Hybrid-Linkage Region Growing l l hybrid single-linkage techniques: more powerful than simple single-linkage hybrid techniques: assign property vector to each pixel property vector: depends on K x K neighborhood of the pixels similar: because neighborhoods similar in some special sense DC & CV Lab. NTU CSIE
10. 3. 2 Hybrid-Linkage Region Growing (cont’) l l region cannot be declared segment unless completely surrounded by edge pixels edge image with gaps in the edges can cause problems in segmentation DC & CV Lab. NTU CSIE
10. 3. 2 Hybrid-Linkage Region Growing (cont’) l edges from second directional derivative zero -crossing l l l Edge detection Edge Non-edge DC & CV Lab. NTU CSIE
10. 3. 2 Hybrid-Linkage Region Growing (cont’) l after region-filling l Some edges have been assigned to neighbor region l Solve edge gap l More region DC & CV Lab. NTU CSIE
10. 3. 2 Hybrid-Linkage Region Growing (cont’) l l Pong et al. suggest an approach to segmentation based on the facet model one iteration of Pong algorithm l l l Split image to small regions Calculate property vector( Which contains a lot of attributes ) Merge regions with close property vector DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 3. 2 Hybrid-Linkage Region Growing (cont’) l second iteration of the Pong algorithm DC & CV Lab. NTU CSIE
10. 3. 2 Hybrid-Linkage Region Growing (cont’) l third iteration of the Pong algorithm DC & CV Lab. NTU CSIE
10. 3. 2 Hybrid-Linkage Region Growing (cont’) l after removing regions smaller than size 25 DC & CV Lab. NTU CSIE
l joke DC & CV Lab. NTU CSIE
10. 3. 3 Centroid-Linkage Region Growing l In centroid-linkage region growing, the image is scanned in some predetermined manner, such as left right, top-bottom. A pixel’s value is compared with the mean of an already existing but not necessarily completed neighboring segment. If its value and the segment’s mean value are close enough, then the pixel is added to the segment and the segment’s mean is updated. DC & CV Lab. NTU CSIE
10. 3. 3 Centroid-Linkage Region Growing (cont’) l If more than one region is close enough, then it is added to the closest region. However, if the means of the two competing regions are close enough, the two regions are merged and the pixel is added to the merged region. If no neighboring region has a close-enough mean, then a new segment is established having the given pixel’s value as it's first member. DC & CV Lab. NTU CSIE
10. 3. 3 Centroid-Linkage Region Growing (cont’) l caption of Fig 10. 33 explains and the figure illustrates the geometry DC & CV Lab. NTU CSIE
10. 3. 3 Centroid-Linkage Region Growing (cont’) l second image of the F-15 bulkhead DC & CV Lab. NTU CSIE
10. 3. 3 Centroid-Linkage Region Growing (cont’) l One-pass centroid-linkage segmentation DC & CV Lab. NTU CSIE
10. 3. 3 Centroid-Linkage Region Growing (cont’) l Two-pass centroid segmentation of the bulkhead image DC & CV Lab. NTU CSIE
10. 3. 4 Hybrid-Linkage Combinations l l l centroid linkage, hybrid linkage: can be combined to use relative strengths single linkage strength: boundaries are spatially accurate single linkage weakness: edge gaps result in excessive merging centroid linkage strength: to place boundaries in weak gradient area One-pass combined centroid and hybrid-linkage segmentation of bulkhead DC & CV Lab. NTU CSIE
10. 3. 4 Hybrid-Linkage Combinations (cont’) DC & CV Lab. NTU CSIE
10. 3. 4 Hybrid-Linkage Combinations (cont’) l Two-pass combined centroid and hybridlinkage segmentation DC & CV Lab. NTU CSIE
l joke DC & CV Lab. NTU CSIE
10. 5 Spatial Clustering l l Spatial-clustering: combining clustering with spatial region growing Spatial-clustering: combine histogram-modeseeking with region growing or spatial-linkage technique DC & CV Lab. NTU CSIE
10. 6 Split and Merge l A splitting method for segmentation begins with the entire image as the initial segment. Then the method successively splits each of its current segments into quarters if the segment is not homogeneous enough; that is, if the difference between the largest and smallest gray level intensities is large. A merging method starts with an initial segmentation and successively merges regions that are similar enough. DC & CV Lab. NTU CSIE
10. 6 Split and Merge (cont’) l Split-and-merge segmentation of the bulkhead image DC & CV Lab. NTU CSIE
10. 6 Split and Merge (cont’) l Image, segmentation, reconstruction based on least-squares-error polynomial DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 7 Rule-Based Segmentation l l Rule-based seg. : easier to try different concepts without reprogramming knowledge in the system: not application domain specific General-purpose, scene-independent knowledge about images, grouping criteria allowable data entry types in the Nazif and Levine rule-based segmentation DC & CV Lab. NTU CSIE
10. 7 Rule-Based Segmentation (cont’) DC & CV Lab. NTU CSIE
10. 7 Rule-Based Segmentation (cont’) l numerical descriptive features that can be associated with condition DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 7 Rule-Based Segmentation (cont’) l numerical spatial features that can be associated with condition DC & CV Lab. NTU CSIE
10. 7 Rule-Based Segmentation (cont’) l logical features that can be associated with condition DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 7 Rule-Based Segmentation (cont’) l Area, region, and line analyzer actions DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 7 Rule-Based Segmentation (cont’) l Focus-of-attention and supervisor actions DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 7 Rule-Based Segmentation (cont’) l examples of rules from the Nazif and Levine system DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
l joke DC & CV Lab. NTU CSIE
10. 8 Motion-Based Segmentation l l In time-varying image analysis the data are a sequence of images instead of a single image. One paradigm under which such a sequence can arise is with a stationary camera viewing a scene containing moving objects. In each frame of the sequence after the first frame the moving objects appear in different positions of the image from those in the previous frame. Thus the motion of the objects creates a change in the images that can be used to help locate the moving objects. DC & CV Lab. NTU CSIE
10. 8 Motion-Based Segmentation (cont’) l l l (a) image ti (b) image tj (c) difference image Gonzalez, Digital Image Processing, First Edition Fig 7. 40 DC & CV Lab. NTU CSIE
DC & CV Lab. NTU CSIE
10. 9 Summary l l Single-linkage region-growing schemes: simplest and most prone to errors Split-and-merge: large memory usage, excessively blocky region boundaries DC & CV Lab. NTU CSIE
l Joke DC & CV Lab. NTU CSIE
- Slides: 109