IMAGE SEGMENTATION. Václav Hlaváč

Similar documents
Image segmentation. Václav Hlaváč. Czech Technical University in Prague

2D image segmentation based on spatial coherence

Image Segmentation. Shengnan Wang

Region-based Segmentation

Dr. Ulas Bagci

Image Segmentation. Selim Aksoy. Bilkent University

Image Segmentation. Selim Aksoy. Bilkent University

Norbert Schuff VA Medical Center and UCSF

MR IMAGE SEGMENTATION

Processing and Others. Xiaojun Qi -- REU Site Program in CVMA

Clustering Lecture 5: Mixture Model

Mixture Models and EM

EE 701 ROBOT VISION. Segmentation

Idea. Found boundaries between regions (edges) Didn t return the actual region

Applications. Foreground / background segmentation Finding skin-colored regions. Finding the moving objects. Intelligent scissors

CMPSCI 670: Computer Vision! Grouping

Basic Algorithms for Digital Image Analysis: a course

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

An Introduction To Automatic Tissue Classification Of Brain MRI. Colm Elliott Mar 2014

Image Processing. Bilkent University. CS554 Computer Vision Pinar Duygulu

Segmentation (continued)

Segmentation and Grouping April 19 th, 2018

Brightness and geometric transformations

Application of fuzzy set theory in image analysis. Nataša Sladoje Centre for Image Analysis

Histograms. h(r k ) = n k. p(r k )= n k /NM. Histogram: number of times intensity level rk appears in the image

Clustering Color/Intensity. Group together pixels of similar color/intensity.

ECG782: Multidimensional Digital Signal Processing

CS 534: Computer Vision Segmentation and Perceptual Grouping

Topic 4 Image Segmentation

Problem definition Image acquisition Image segmentation Connected component analysis. Machine vision systems - 1

Understanding Clustering Supervising the unsupervised

CSE152a Computer Vision Assignment 2 WI14 Instructor: Prof. David Kriegman. Revision 1

intro, applications MRF, labeling... how it can be computed at all? Applications in segmentation: GraphCut, GrabCut, demos

Image Processing, Analysis and Machine Vision

Content-based Image and Video Retrieval. Image Segmentation

Lecture 10: Semantic Segmentation and Clustering

Outline. Segmentation & Grouping. Examples of grouping in vision. Grouping in vision. Grouping in vision 2/9/2011. CS 376 Lecture 7 Segmentation 1

CITS 4402 Computer Vision

Multiple Model Estimation : The EM Algorithm & Applications

Performance Evaluation of the TINA Medical Image Segmentation Algorithm on Brainweb Simulated Images

Multiple Model Estimation : The EM Algorithm & Applications

MINIMUM ERROR CONTRAST ENHANCEMENT. Jarkko Vartiainen, Pekka Paalanen, Joni-Kristian Kämäräinen, Lasse Lensu and Heikki Kälviäinen

Norbert Schuff Professor of Radiology VA Medical Center and UCSF

CSSE463: Image Recognition Day 21

Introduction to Medical Imaging (5XSA0) Module 5

Basic relations between pixels (Chapter 2)

Introduction to Pattern Recognition Part II. Selim Aksoy Bilkent University Department of Computer Engineering

Machine Learning and Data Mining. Clustering (1): Basics. Kalev Kask

Clustering. Discover groups such that samples within a group are more similar to each other than samples across groups.

Image Analysis - Lecture 5

CS4442/9542b Artificial Intelligence II prof. Olga Veksler

Lecture: k-means & mean-shift clustering

Segmentation by Clustering. Segmentation by Clustering Reading: Chapter 14 (skip 14.5) General ideas

CS4442/9542b Artificial Intelligence II prof. Olga Veksler

Segmentation by Clustering Reading: Chapter 14 (skip 14.5)

A New iterative triclass thresholding technique for Image Segmentation

Schools of thoughts on texture

Outline. Advanced Digital Image Processing and Others. Importance of Segmentation (Cont.) Importance of Segmentation

Lecture 16 Segmentation and Scene understanding

human vision: grouping k-means clustering graph-theoretic clustering Hough transform line fitting RANSAC

Machine Learning. Unsupervised Learning. Manfred Huber

Segmentation of Images

Segmentation Computer Vision Spring 2018, Lecture 27

INTRODUCTION TO IMAGE PROCESSING (COMPUTER VISION)

Lecture: Segmentation I FMAN30: Medical Image Analysis. Anders Heyden

Digital Image Processing COSC 6380/4393

DATA MINING LECTURE 7. Hierarchical Clustering, DBSCAN The EM Algorithm

CS 534: Computer Vision Segmentation and Perceptual Grouping

Clustering CS 550: Machine Learning

DIGITAL IMAGE ANALYSIS. Image Classification: Object-based Classification

CS443: Digital Imaging and Multimedia Binary Image Analysis. Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University

Segmentation and low-level grouping.

Lecture: k-means & mean-shift clustering

Pattern Recognition. Kjell Elenius. Speech, Music and Hearing KTH. March 29, 2007 Speech recognition

Webpage: Volume 3, Issue V, May 2015 eissn:

Image Segmentation Based on Watershed and Edge Detection Techniques

Image Segmentation. Segmentation is the process of partitioning an image into regions

Clustering algorithms

CS 664 Segmentation. Daniel Huttenlocher

6.801/866. Segmentation and Line Fitting. T. Darrell

Operators-Based on Second Derivative double derivative Laplacian operator Laplacian Operator Laplacian Of Gaussian (LOG) Operator LOG

Part 3: Image Processing

Normalized Texture Motifs and Their Application to Statistical Object Modeling

Clustering: K-means and Kernel K-means

Classification. Vladimir Curic. Centre for Image Analysis Swedish University of Agricultural Sciences Uppsala University

Time Stamp Detection and Recognition in Video Frames

C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S. Image Operations I

Prof. Fanny Ficuciello Robotics for Bioengineering Visual Servoing

Chapter 3 Image Registration. Chapter 3 Image Registration

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier

Grouping and Segmentation

Image Analysis Image Segmentation (Basic Methods)

Image Segmentation Using Iterated Graph Cuts Based on Multi-scale Smoothing

The goals of segmentation

Segmentation & Clustering

Texture Image Segmentation using FCM

EXAM SOLUTIONS. Image Processing and Computer Vision Course 2D1421 Monday, 13 th of March 2006,

Motivation. Intensity Levels

Norbert Schuff Professor of Radiology VA Medical Center and UCSF

Object-Based Classification & ecognition. Zutao Ouyang 11/17/2015

Transcription:

IMAGE SEGMENTATION Václav Hlaváč Czech Technical University in Prague Faculty of Electrical Engineering, Department of Cybernetics Center for Machine Perception http://cmp.felk.cvut.cz/ hlavac, hlavac@fel.cvut.cz Outline of the talk: What is segmentation? Segmentation is application dependent because it needs image interpretation. Taxonomy of segmentation methods. Thresholding-based segmentation.... the rest comes in another presentation.

What is image segmentation? 2/35

What is image segmentation? 3/35 Segmentation is a collection of methods allowing to interpret spatially close parts of the image as objects. Regions (i.e., compact sets) represent spatial closeness naturally and thus are important building steps towards segmentation. Objects in a 2D image very often correspond to distinguishable regions. The object is everything what is of interest in the image (from the particular application point of view). The rest of the image is background. The approach is similar to that used in pattern recognition, i.e., division of the image into set of equivalence classes.

Easy or not? 4/35 Where is the border between the cup and the background?

Image segmentation 5/35 Easy for humans we use top-down information (segmentation after recognition) Many segmentation methods settle for less. They put bits of image which are similar to the same segment. There is often no single answer how to segment. Courtesy, images: Thomas Brox, TU Dresden, 2008 Special cases when segmentation to e.g. foreground and background is easy. Segmentation usually makes sense in a scope of a particular application.

Segmentation is application dependent 6/35 Methods are usually not universally applicable to all images. Direct segmentation of the input image takes pragmatically into account all available information about a particular application. A vital role of a priori information: Low-level: e.g., brightness, spatial coherence, color, texture, motion,... Mid-level: object symmetries, proximity on larger scale,...

Segmentation, Example 1 7/35 Segmentation by texture.

Segmentation, Example 2 8/35 Segmentation of an aerial image of the sea coast.

] Complete vs. partial segmentation (1) 9/35 Complete segmentation divides an image into non-overlapping regions that match to the real world objects. Complete segmentation divides an image R into the finite number S of regions R 1,..., R S R = S i=1 R i, R i R j =, i j. Partial segmentation it is possible to find only parts with semantic meaning in the image (e.g., regions, collection of edgels) which will lead to interpretation in later analysis.

Complete vs. partial segmentation (2) 10/35 To proceed from partial to complete segmentation it is needed to explore the higher-level of information processing. This can be performed iteratively in a feed-back loop. Examples of a complete 2D segmentation Seek contrast objects in a homogeneous background. Intensity thresholding provides a silhouette corresponding to objects, e.g., printed characters, cell kernels, back-light illuminated details inspected in industry.

Example A digital profile projector Provides the back-light illumination where object shape appears as a silhouette. The principal is very often used in manufacturing for gauging and verifying correctness of a shape. The picture shows the illumination source (the smaller box containing LED diode and lens) and camera (a bigger box with cable, there is mirror inside). Courtesy: Neovision s.r.o. 11/35

Back-illuminated detail Example from the lathe-turning: Courtesy: Neovision s.r.o. 12/35 Left image a the back-illuminated detail showing imperfection and dust. Right image automatically approximated shape allowing for automatic gauge check against a technical drawing.

Profile projector User s screen Another example: Automatic gauging of the lathe-turning knife from a sintered carbide. 13/35

Use of a priori information The more a priori information the better. 14/35 Illustrative examples: nic Required shape of the region. Required position, orientation. Known initial and final point of the boundary (e.g., in the application analyzing shape of a polymer drop, where the polymer sample comes out a tube of known position). Relation of the region considered to other regions with required properties (e.g., above, inside). Examples from two application areas: nic Remote sensing: Look for ships in the water. Typical properties of railway lines, highways (minimal curvatures). Rivers do not cross. Medical: Blood vessels ar roughly parallel. Relate to anatomic atlas (model-based approach).

Simple approaches for segmentation Threshold-based, according to a global property, usually intensity, where the global knowledge is represented by the intensity histogram. Spatial coherence-based ( clustering of tokens ). Connecting, e.g., edgels because edges bear often an important information about objects (cf. human visual system). Region merging/splitting. Regions come from aggregating pixels with similar properties (homogeneity criterion) Template matching detection and fitting tokens in the image to a priori known template. Parametric model detection, e.g., straight line, circle, ellipse,... Unusual phenomena-based. Camouflage detection based on an unusual texture. Region segmentation for the image compression. 15/35

Thresholding 16/35 Input image f(i, j), output image g(i, j). For each pixel (i, j) g(i, j) = { 1 for f(i, j) Threshold, 0 for f(i, j) < Threshold. + Simple technique, long time and more often used. + Easy in hardware, intrinsically parallel. The threshold is a parameter which is difficult to adjust automatically in general. Works only for subclass of images in which objects are distinct from background in intensity.

Example, threshold influence 17/35 Original image. Threshold segmentation. Threshold too low. Threshold too high.

Example Border regions by the band thresholding 18/35 Original image. Border regions detected.

Threshold detection, use of the histogram 19/35 p-tile thresholding, if we know that the objects cover 1/p of the image, e.g. printed characters on a sheet = 1/p area of a histogram. Histogram shape analysis, distinct objects on background correspond to a bi-modal histogram. Find middle between the modes.

Automatically found threshold according to a bi-modal histogram 20/35 9000 8000 7000 6000 Threshold Frequency 5000 4000 3000 2000 1000 0 0 32 64 96 128 160 192 224 Intensity

Optimal thresholding by a mixture of Gaussians 21/35 Motivation: (a) optimal threshold optimal optimal distribution of objects distribution of background (b) optimal threshold conventional threshold optimal conventional optimal conventional???

Local thresholds by mixture of Gaussians 22/35 hregion local histogram. hmodel approximation of a histogram by n Gaussian distributions, h model (x) = n 1 π i e ( (x µ i) 2σ i 2 2πσ 2 i 2 ) = n π i N(x, µ i, σ i ) = = i=1 n π i p(x i). i=1 i=1 find the parameters of the approximation, using e.g. EM algorithm compute posterior probabilities p(i x) (soft assignments of individual data to models i)

Example, Segmentation of the brain MR 23/35 Input: T1-weighted NMR images. Desired classes: white matter, grey matter, celebro-spinal fluid (CSF) Volume % 16 Volume % 16 Volume % 16 Gray matter 12 12 12 White matter 8 8 8 4 0 0 50 100 150 200 250 Gray level 4 0 0 50 100 150 200 250 Gray level CSF 0 50 100 150 200 250 Gray level (a) (b) (c) 4 0 Courtesy: Milan Šonka, University of Iowa.

Brain MR, Segmentation result 24/35 original gray matter white matter CSF

Segmentation as clustering 25/35 Image segmentation can be formulated as clustering which has been studied in statistics, pattern recognition or machine learning. Problem formulation: Assign a pixel to a cluster which is the most spatially adjacent and the most most homogeneous with respect to some criterion (e.g., brightness variance). There are several clustering methods. Seek unsupervised learning algorithms in pattern recognition. E.g., K-means, EM.

Lloyd s Algorithm K-means clustering 26/35 Initialize the pixels to belong to a random region. Compute the mean feature vector in each region. Move a pixel to another region if this decreases the total distance J. J = N K x n µ k 2, n=1 k=1 where n points to individual pixels, N is number of pixels, K is an a priori given number of clusters, K < N, x n is a pixel value, µ k is the cluster representative (mean point of a cluster). Iterate until pixels do not move any longer. S. Lloyd, Last square quantization in PCM s. Bell Telephone Laboratories Paper (1957). In the journal much later: S. P. Lloyd. Least squares quantization in PCM. Special issue on quantization, IEEE Trans. Inform. Theory, 28:129 137, 1982.

K-means clustering 27/35 can be thought of as a simplified EM algorithm with Gaussian mixtures all σi equal, all πi equal only distance to µi plays a role there is no posterior probabilities, the assignments p(i x) are hard (binary) n i=1 π i N(x, µ i, σ i ) = n π i p(x i) i=1

K-means clustering, Example 28/35 feature: absolute value of partial derivatives, ( I x, I y ) K = 2

K-means clustering (2) 29/35 There is a danger of ending up in a local minimum of J. Performance depends much on the initial choice of the clusters. There are point sets on which K-means takes superpolynomial time O(2 n ) to converge. D. Arthur, S. Vassilvitskii (2006). How Slow is the k-means Method?. Proceedings of the 2006 Symposium on Computational Geometry. With K = 2 the K-means algorithm can be regarded as a thresholding with an automatically determined threshold (1D case).

Mean shift 30/35 Estimation of the density gradient - Fukunaga K.: Introduction to Statistical Pattern Recognition, Academic Press, New York, 1972. Sample mean of local samples points in the direction of higher density. It provides the estimate of the gradient. Mean shift vector m of each point p m = i window w i (p i p), w i = dist(p, p i ) Based on the assumption that points are more and more dense as we are getting near the cluster central mass.

Mean shift algorithm 31/35 Input: points in the Euclidean (feature) space. Determine the kernel size (usually small). Choose the initial location of the search window. Compute the mean location (centroid of the data) in the search window. Center the search window at the mean location computed in the previous step. Repeat until convergence.

Mean shift segmentation algorithm 32/35 1. Convert the image into tokens (via color, gradients, texture measures etc). 2. Choose initial search window locations uniformly in the data. 3. Compute the mean shift window location for each initial position. 4. Merge windows that end up on the same peak or mode. 5. The data these merged windows traversed are clustered together.

Mean shift segmentation, Example 1 33/35 http://www.caip.rutgers.edu/ comanici/mspami/mspamiresults.html

Mean shift segmentation, Example 2 34/35

Mean shift segmentation, Example 3 35/35 http://www.caip.rutgers.edu/ comanici/mspami/mspamiresults.html