Image Analysis - Lecture 5

Similar documents
Image Segmentation. Selim Aksoy. Bilkent University

Image Segmentation. Selim Aksoy. Bilkent University

CS 534: Computer Vision Segmentation and Perceptual Grouping

Segmentation and Grouping

Computer Vision 5 Segmentation by Clustering

Segmentation (continued)

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

CS 534: Computer Vision Segmentation II Graph Cuts and Image Segmentation

Lecture 7: Segmentation. Thursday, Sept 20

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

Schedule for Rest of Semester

Segmentation and Grouping April 19 th, 2018

Image Segmentation continued Graph Based Methods

Segmentation. Bottom Up Segmentation

Lecture 11: E-M and MeanShift. CAP 5415 Fall 2007

Segmentation by Clustering

The goals of segmentation

Robotics Programming Laboratory

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

Segmentation by Clustering Reading: Chapter 14 (skip 14.5)

Grouping and Segmentation

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

Cluster Analysis. Mu-Chun Su. Department of Computer Science and Information Engineering National Central University 2003/3/11 1

EE 701 ROBOT VISION. Segmentation

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

Computer Vision I - Filtering and Feature detection

CS 2770: Computer Vision. Edges and Segments. Prof. Adriana Kovashka University of Pittsburgh February 21, 2017

Segmentation Computer Vision Spring 2018, Lecture 27

Segmentation and Grouping

Segmentation and Grouping April 21 st, 2015

Segmentation & Grouping Kristen Grauman UT Austin. Announcements

Normalized cuts and image segmentation

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

Targil 12 : Image Segmentation. Image segmentation. Why do we need it? Image segmentation

CS 534: Computer Vision Segmentation and Perceptual Grouping

Chapter 3 Image Registration. Chapter 3 Image Registration

Lecture 10: Semantic Segmentation and Clustering

How and what do we see? Segmentation and Grouping. Fundamental Problems. Polyhedral objects. Reducing the combinatorics of pose estimation

CMPSCI 670: Computer Vision! Grouping

School of Computing University of Utah

Content-based Image and Video Retrieval. Image Segmentation

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Topic 4 Image Segmentation

Edge and local feature detection - 2. Importance of edge detection in computer vision

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

Region-based Segmentation

Introduction to Medical Imaging (5XSA0) Module 5

Image Analysis - Lecture 1

Clustering CS 550: Machine Learning

K-Means Clustering Using Localized Histogram Analysis

Image Segmentation. Srikumar Ramalingam School of Computing University of Utah. Slides borrowed from Ross Whitaker

Image Processing and Image Analysis VU

Announcements. Image Segmentation. From images to objects. Extracting objects. Status reports next Thursday ~5min presentations in class

Lecture: k-means & mean-shift clustering

Clustering. SC4/SM4 Data Mining and Machine Learning, Hilary Term 2017 Dino Sejdinovic

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

SGN (4 cr) Chapter 11

Ulrik Söderström 16 Feb Image Processing. Segmentation

Other Linear Filters CS 211A

(10) Image Segmentation

Norbert Schuff VA Medical Center and UCSF

Lecture 6: Unsupervised Machine Learning Dagmar Gromann International Center For Computational Logic

Hard clustering. Each object is assigned to one and only one cluster. Hierarchical clustering is usually hard. Soft (fuzzy) clustering

Feature extraction. Bi-Histogram Binarization Entropy. What is texture Texture primitives. Filter banks 2D Fourier Transform Wavlet maxima points

Lecture: k-means & mean-shift clustering

Segmentation: Clustering, Graph Cut and EM

Image Segmentation. Shengnan Wang

Computer Vision for HCI. Topics of This Lecture

Image Segmentation continued Graph Based Methods. Some slides: courtesy of O. Capms, Penn State, J.Ponce and D. Fortsyth, Computer Vision Book

Image Analysis Lecture Segmentation. Idar Dyrdal

Image Analysis - Lecture 1

Artistic Stylization of Images and Video Part III Anisotropy and Filtering Eurographics 2011

Topics to be Covered in the Rest of the Semester. CSci 4968 and 6270 Computational Vision Lecture 15 Overview of Remainder of the Semester

Computer Vision I - Basics of Image Processing Part 2

Image Segmentation. GV12/3072 Image Processing.

Scale Space and PDE methods in image analysis and processing. Arjan Kuijper

Modern Medical Image Analysis 8DC00 Exam

Clustering. CS294 Practical Machine Learning Junming Yin 10/09/06

CS 534: Computer Vision Texture

Clustering and Visualisation of Data

Final Exam Schedule. Final exam has been scheduled. 12:30 pm 3:00 pm, May 7. Location: INNOVA It will cover all the topics discussed in class

Clustering. Subhransu Maji. CMPSCI 689: Machine Learning. 2 April April 2015

Edge and corner detection

Introduction. Introduction. Related Research. SIFT method. SIFT method. Distinctive Image Features from Scale-Invariant. Scale.

Bioimage Informatics

Feature Descriptors. CS 510 Lecture #21 April 29 th, 2013

Unsupervised Learning

CS 4495 Computer Vision. Segmentation. Aaron Bobick (slides by Tucker Hermans) School of Interactive Computing. Segmentation

Clustering. So far in the course. Clustering. Clustering. Subhransu Maji. CMPSCI 689: Machine Learning. dist(x, y) = x y 2 2

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

Feature Detectors and Descriptors: Corners, Lines, etc.

Clustering. Informal goal. General types of clustering. Applications: Clustering in information search and analysis. Example applications in search

Network Traffic Measurements and Analysis

CS 2750 Machine Learning. Lecture 19. Clustering. CS 2750 Machine Learning. Clustering. Groups together similar instances in the data sample

Image Processing. Image Features

Bioimage Informatics

CHAPTER VIII SEGMENTATION USING REGION GROWING AND THRESHOLDING ALGORITHM

SYDE Winter 2011 Introduction to Pattern Recognition. Clustering

Feature descriptors. Alain Pagani Prof. Didier Stricker. Computer Vision: Object and People Tracking

Transcription:

Texture Segmentation Clustering Review Image Analysis - Lecture 5 Texture and Segmentation Magnus Oskarsson

Lecture 5 Texture Segmentation Clustering Review Contents Texture Textons Filter Banks Gabor filters Segmentation What is segmentation? Clustering

Texture Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Texture (ctd.) Texture is easy to recognize, but difficult to explain. A leaf is an object, but foliage is a texture Texture recognition Texture synthesis Shape from texture

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Repetition: Features Examples of features in images are Edges, where the intensity gradients are large. Ridges, the centre of dark or light stripes. Corners or other interesting points that can be tracked reliably.

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Illustration of orientations Illustrations of the partial derivatives f x and f y

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica The Orientation Tensor Construct the matrix [ ] [ Wxx W M = xy ( f x = )2 G b W xy W yy ( f f x y ) G b ( f f x y ) G ] b ( f y )2 G b, where G b denotes the Gaussian function with parameter b. M - orientation tensor. Note: We construct a matrix for every pixel.

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Properties of the orientation tensor The matrix M has the following properties: (Flat) Two small eigenvalues in a region - flat intensity. (Flow) One large and one small eigenvalue - edges and flow regions. (Texture) Two large eigenvalues - corners, interest points, texture regions. This can be used in algorithms for segmenting the image into (flat, flow, texture).

Textons Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Texture often contains regular patterns of parts, often called textons. Idea: If you can detect the textons and measure where they are and how they are distributed? Problem: There is no useful definition of textons that can be used for detection. By convolution with small patterns, a strong response signals existence of that small pattern. This could be thought of as texton-detection. What patterns should we use?

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Filter banks: Edge detection For edge detection we used two filters f f x and y. After non-linear transformation (squaring) and summation we obtained ( ) f 2 ( ) f 2 + = f 2. x y which is used to detect edges (classify pixels as belonging to the texture edge ).

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Filter banks: Corner detection For corner/interest point detection we used two filters a 1 = f x and a 2 = f y. After non-linear transformation (a 2 1, a 1a 2 and a 2 2 ), further smoothing and another non-linear transformation we obtained f cr = (k + 1 k ) det(m) trace(m)2 2 det(m) that was used to detect interest points (classify pixels as belonging to the texture corner ).

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Filter banks: Ridge detection For ridge detection we used three filters 2 f, 2 f x 2 x y and 2 f. y 2 After mean value filtering and a non-linear transformation we obtain a measure that can be used to detect ridges (classify pixels as belonging to the texture ridge ).

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Filter banks: Texture classification Several filters (f h 1,...,f h n ). Non-linear transformation, e.g. squares, absolute values, taking the positive or negative part of a signal, thresholding. Classification (more theory on classification in later lectures).

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Examples of filters and filter banks Spots: Bars: Gabor filters:

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Search (for texture) on different scales

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Response for different filters

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Gabor filter

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Gabor filters (ctd.)

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Non-linear transformations You can try several non-linear transformations, e.g. Squaring, polynomials Absolute value Thresholding (in particular taking the positive and negative parts of a signal).

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Mean value filtering After non-linear transformation, often it is a good idea to form the mean over a region, e.g. using mean value filtering. Similar to what we did with the orientation tensor.

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica General idea The result is a number of values (channels, features) for every pixel. The goal is now to classify pixels in different classes (textures). Classification will be further studied in a later lecture. One could possibly use information from neighboring pixels as well.

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Choice of features One possibility is to take the mean and variance of the channel within a region. It might be desirable that the response in the channels were uncorrelated.

Texture Segmentation Clustering Review Corners Filter bank Non-linear transformations Classifica Example of texture classification

Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications What is segmentation? Goal: Segment the image into pieces/segments, i.e. regions that belong to the same object or that has the same properties. Can also be seen as a problem of grouping of pieces (pixels, regions) together.

Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications Examples of segmentation Some typical segmentation problems are: Cut an image sequence into shots Find manufactured parts in an industrial environment Find humans in images and video Find houses in satellite images Find faces in images Example: OCR. Example: Image interpretation Example: Road user analysis Example: Medical Image Analysis, e.g. Cell analysis

Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications Segmentation using clustering Using clustering: Segment images into pieces Fit lines to a set of points Fit a fundamental matrix to image pairs In some cases it is easier to view segmentation as the problem of putting pieces together. This is usually called grouping (less precise) or clustering (which has a precise meaning in the field of pattern recognition).

Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications Gestalt laws Around 1900 the Gestalt theory was developed by psychologists in Germany, the Berlin school. They developed a descriptive theory of mind and brain. Some principles that they discovered for human grouping of features are: Proximity Similarity Same fate Same region Closedness Symmetry Parallelism

Invariance Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications

Closure Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications

Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications Split and Merge Goal: To segment the image R into n regions R 1, R 2,..., R n. Use a criteria for what a region is: P R i = R R i connected R i R j =, i j (R i disjoint) P(R i )=TRUE, i = 1,...,n P(R i R j )=FALSE, i j.

Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications Pixel-aggregation Example P(R i )=TRUE if the difference in intensities is 3 gray-levels. Initialize with some points and add further points in each iteration.

Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications Split and Merge (ctd.) Idea: Merge areas that are "similar" and split areas that are "different". The criteria P determines what is similar and what is different. Algorithm (Split and Merge) Given an image R and a property P. 1. Start with the division R = {R 1 } 2. If P(R i ) =FALSE: Split R i into four smaller regions (SPLIT) 3. If P(R i R j )=TRUE for two adjacent regions R i and R j : Merge R i and R j to one region (MERGE) 4. Continue with step 2 and 3 until convergence

Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications Foreground Background estimation Study an image sequence Introduce a model for background and estimate its parameters Estimate which pixels deviate from the background model Example: Road user analysis.

Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications Video shots Study an image sequence For every pair of images in a sequence Calculate the distance between the images Cut the sequence into shots where the distance is too large

Texture Segmentation Clustering Review Segmentation Gestalt laws Split and Merge Applications Image metrics Examples of metrics are: Form the difference between the images and calculate some norm, e.g. the 2-norm (the square root of the sum of the squares) Histogram comparison. Calculate the histogram of the two images. Calculate a distance based on the histograms. Block comparison. Divide the image into a number of blocks (e.g. 8 8 pixels) and compare these. Edge comparison. Find edges in both images and see if they are roughly in the same position (context) in both images.

Clustering Texture Segmentation Clustering Review K-means Hierarchical methods Graph Goal: Partition a set on n feature vectors with d components x 1,... x n i.e. x i R d, in groups (clusters) such that all examples in the same group are similar.

Texture Segmentation Clustering Review K-means Hierarchical methods Graph Classification Goal: Given a number of examples, that already are partitioned into groups construct a function (x 1, f 1 ),... (x n, f n ) R : x f such that R(x i ) = f i as good as possible Here x i R n are examples and f i Z is a number representing, which class/group it belongs to.

Texture Segmentation Clustering Review K-means Hierarchical methods Graph The Clustering Problem Input: n examples x 1,... x n. Output: A mapping c : {1,...,n} {1,...k}. Example: K-means algorithm Choose k cluster centres m 1,...,m k and a clustering function c that minimises f(c, m) = n x i m c(i) 2. i=1

Texture Segmentation Clustering Review K-means Hierarchical methods Graph K-means The problem min f(c, m) = min c,m c,m n x i m c(i) 2 is a non-linear optimization problem that can be solved with many methods. However, most only give a local optima. i=1

Texture Segmentation Clustering Review K-means Hierarchical methods Graph K-means implementation One popular implementation is the following 1. Randomly choose k cluster centra (e.g. k examples) 2. Optimize c: For every example x i assign c(i) such that x i m c(i) is minimized, i.e. c = argmin c f(c, m). 3. Optimize m: For every group j change m j as the centre of mass of corresponding examples, i.e. m = argmin m f(c, m).

Texture Segmentation Clustering Review K-means Hierarchical methods Graph Hierarchical methods A popular clustering method is hierarchical clustering. Start with one cluster or regard each point as a separate cluster. Reduce one after one or merge one after one. Stop when you are finished. 1. Start with n clusters 2. Choose error criteria, e.g. f(c, m) as above 3. Merge the two clusters that minimizes the error criteria (or split the cluster with the biggest error criteria) 4. If the number of clusters is more than k go to 3. The result is a clustering for every number of clusters, k, between 1 and n. This can often be represented in a so called dendrogram, where you map error criteria and clustering.

Texture Segmentation Clustering Review K-means Hierarchical methods Graph There are many other methods EM-method (Similar to k-means, but better (and slower)) k-mediods adaptive resonance theory fuzzy clustering auto-class mode-separator Self Organizing Maps Agglomerative hierarchical clustering Divisive hierarchical clustering Iso-map

Texture Segmentation Clustering Review K-means Hierarchical methods Graph Graph Theory A graph G = (V, E) consists of vertices(nodes) V and edges E. Every edge connects two vertices. In a directed graph, every edge has an orientation. In a weighted graph, every edge has a weight (a number). A graph is connected if one can walk between all pairs of vertices through one or several edges. Every graph can be split into a disjoint set of connected components.

Texture Segmentation Clustering Review K-means Hierarchical methods Graph Matrix representation Weighted graphs can be represented as a matrix. A weighted edge between vertex i and vertex j with v is represented by matrix element (i, j). For un-directed graphs, half the weight is put at position (i, j) and half in (j, i). Connected components - blocks in block diagonal matrices.

Texture Segmentation Clustering Review K-means Hierarchical methods Graph Affinity measures When solving clustering problems with graph theoretical methods one need a closeness measure v i,j, for every pair of nodes (i, j). A large number means that they are close. A small number means that they are different. The affinity measure depends on which problem one has. Usual ingredients are Distance - e.g. aff(x, y) = e (x y)t (x y)/(2σ 2 d ) Intensity - e.g. aff(x, y) = e (I(x) I(y))T (I(x) I(y))/(2σ 2 I ) Color - e.g. aff(x, y) = e dist(c(x),c(y))2 /(2σ 2 c) Texture - e.g. aff(x, y) = e (f(x) f(y))t (f(x) f(y))/(2σ 2 f )

Texture Segmentation Clustering Review K-means Hierarchical methods Graph Eigenvectors and segmentation Assume that w n is a vector of ones for those elements that belong to a particular cluster and zeros otherwise. Then the sum of all weights for edges within a cluster is w T n Aw n. By maximizing w T n Aw n with the constraint w T n w n = 1 one might argue that we maximize clustering. Maxima with this problem corresponds to stationary points of the Lagrange function.

Texture Segmentation Clustering Review K-means Hierarchical methods Graph Eigenvectors and segmentation Maximize w T n Aw n with constraint w T n w n = 1. Study the Lagrange function L(w n,λ) = w T n Aw n + λ(w T n w n 1). Differentiate and divide with two gives This is an eigenvalue problem. Aw n = λw n.

Texture Segmentation Clustering Review K-means Hierarchical methods Graph Cut-methods for segmentation Popular method: Normalized cuts. Similar to previos graph method, but objective is modified to avoid small clusters. See Section 14.5.5. Works poorly sometimes. Even more popular method: Graph cuts. Works very well. See "Graph cuts homepage" on the internet for recent applications and tutorials. Next time. Very efficient methods exist to find global minima for graph cuts

Texture Segmentation Clustering Review K-means Hierarchical methods Graph Masters thesis suggestion of the day: Road user There are several interesting and useful applications of algorithms for automatic detection and tracking of road users (cars, bicycles, pedestrians). Two such uses are (i) to increase safety in traffic and (ii) decrease the environmental load of traffic.

Texture Segmentation Clustering Review Recommended reading Forsyth & Ponce: 9. Texture, 14. Segmentation. Szeliski: 5. Segmentation.

Texture Segmentation Clustering Review Review - Lecture 5 Texture recognition Filter bank Nonlinear transformations Mean value filtering Classification Segmentation Gestalt laws Clustering Graph theoretical clustering