Mathematics in Image Processing

Similar documents
Discrete Optimization Methods in Computer Vision CSE 6389 Slides by: Boykov Modified and Presented by: Mostafa Parchami Basic overview of graph cuts

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

CS6670: Computer Vision

Models for grids. Computer vision: models, learning and inference. Multi label Denoising. Binary Denoising. Denoising Goal.

What have we leaned so far?

Image Restoration using Markov Random Fields

Markov/Conditional Random Fields, Graph Cut, and applications in Computer Vision

Super Resolution Using Graph-cut

Computer Vision : Exercise 4 Labelling Problems

Graph Cuts vs. Level Sets. part I Basics of Graph Cuts

Markov Networks in Computer Vision. Sargur Srihari

Markov Random Fields and Segmentation with Graph Cuts

CAP5415-Computer Vision Lecture 13-Image/Video Segmentation Part II. Dr. Ulas Bagci

Markov Networks in Computer Vision

Image Restoration. Diffusion Denoising Deconvolution Super-resolution Tomographic Reconstruction

CS4670: Computer Vision

Segmentation with non-linear constraints on appearance, complexity, and geometry

Introduction à la vision artificielle X

Continuous and Discrete Optimization Methods in Computer Vision. Daniel Cremers Department of Computer Science University of Bonn

Fast Approximate Energy Minimization via Graph Cuts

Supervised texture detection in images

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

MRFs and Segmentation with Graph Cuts

Algorithms for Markov Random Fields in Computer Vision

MEDICAL IMAGE COMPUTING (CAP 5937) LECTURE 10: Medical Image Segmentation as an Energy Minimization Problem

Combinatorial optimization and its applications in image Processing. Filip Malmberg

3D Computer Vision. Dense 3D Reconstruction II. Prof. Didier Stricker. Christiano Gava

Fundamentals of Digital Image Processing

Segmentation. Bottom up Segmentation Semantic Segmentation

Maximum flows and minimal cuts. Filip Malmberg

Multi-Label Moves for Multi-Label Energies

Guided Image Super-Resolution: A New Technique for Photogeometric Super-Resolution in Hybrid 3-D Range Imaging

Comparison of Graph Cuts with Belief Propagation for Stereo, using Identical MRF Parameters

USING ONE GRAPH-CUT TO FUSE MULTIPLE CANDIDATE MAPS IN DEPTH ESTIMATION

Digital Image Restoration

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

Super-Resolution from Image Sequences A Review

Super-Resolution. Many slides from Miki Elad Technion Yosi Rubner RTC and more

Digital Image Processing COSC 6380/4393

Energy Minimization for Segmentation in Computer Vision

Image Segmentation Using Iterated Graph Cuts BasedonMulti-scaleSmoothing

A Novel Image Super-resolution Reconstruction Algorithm based on Modified Sparse Representation

Digital Image Processing

COMPUTER AND ROBOT VISION

Markov Random Fields and Segmentation with Graph Cuts

Mesh segmentation. Florent Lafarge Inria Sophia Antipolis - Mediterranee

Norbert Schuff VA Medical Center and UCSF

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

Computer Vision I - Basics of Image Processing Part 1

Super-resolution on Text Image Sequences

ADAPTIVE GRAPH CUTS WITH TISSUE PRIORS FOR BRAIN MRI SEGMENTATION

A Feature Point Matching Based Approach for Video Objects Segmentation

Segmentation Based Stereo. Michael Bleyer LVA Stereo Vision

Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923

An Approach for Reduction of Rain Streaks from a Single Image

Computer Vision I - Filtering and Feature detection

MEDICAL IMAGE COMPUTING (CAP 5937) LECTURE 10: Medical Image Segmentation as an Energy Minimization Problem

Interactive segmentation, Combinatorial optimization. Filip Malmberg

Learning based face hallucination techniques: A survey

Dense Image-based Motion Estimation Algorithms & Optical Flow

Solving Vision Tasks with variational methods on the GPU

Quadratic Pseudo-Boolean Optimization(QPBO): Theory and Applications At-a-Glance

Prof. Feng Liu. Spring /17/2017. With slides by F. Durand, Y.Y. Chuang, R. Raskar, and C.

Applied Bayesian Nonparametrics 5. Spatial Models via Gaussian Processes, not MRFs Tutorial at CVPR 2012 Erik Sudderth Brown University

Adaptive Kernel Regression for Image Processing and Reconstruction

Approximate decoding: ICM, block methods, alpha-beta swap & alpha-expansion

Stereo Correspondence with Occlusions using Graph Cuts

Regularization and Markov Random Fields (MRF) CS 664 Spring 2008

EECS 442 Computer vision. Stereo systems. Stereo vision Rectification Correspondence problem Active stereo vision systems

Texture Modeling using MRF and Parameters Estimation

Final Review CMSC 733 Fall 2014

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

Collaborative Sparsity and Compressive MRI

MEDICAL IMAGE ANALYSIS

SPM-BP: Sped-up PatchMatch Belief Propagation for Continuous MRFs. Yu Li, Dongbo Min, Michael S. Brown, Minh N. Do, Jiangbo Lu

Advanced phase retrieval: maximum likelihood technique with sparse regularization of phase and amplitude

MR IMAGE SEGMENTATION

Dr. Ulas Bagci

Belief propagation and MRF s

Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation

Image Segmentation and Registration

Joint 3D-Reconstruction and Background Separation in Multiple Views using Graph Cuts

Graph Cuts in Vision and Graphics: Theories and Applications

Lecture 10: Multi view geometry

CS4670 / 5670: Computer Vision Noah Snavely

A Patch Prior for Dense 3D Reconstruction in Man-Made Environments

Graph-cut methods for joint reconstruction and segmentation

Stereo vision. Many slides adapted from Steve Seitz

Markov Random Fields with Efficient Approximations

CS 565 Computer Vision. Nazar Khan PUCIT Lectures 15 and 16: Optic Flow

An Introduc+on to Mathema+cal Image Processing IAS, Park City Mathema2cs Ins2tute, Utah Undergraduate Summer School 2010

Image Processing. Filtering. Slide 1

Motion. 1 Introduction. 2 Optical Flow. Sohaib A Khan. 2.1 Brightness Constancy Equation

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

IMAGE DENOISING TO ESTIMATE THE GRADIENT HISTOGRAM PRESERVATION USING VARIOUS ALGORITHMS

Visual Tracking. Image Processing Laboratory Dipartimento di Matematica e Informatica Università degli studi di Catania.

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

Introduction to Image Super-resolution. Presenter: Kevin Su

EE795: Computer Vision and Intelligent Systems

Department of Electronics and Communication KMP College of Engineering, Perumbavoor, Kerala, India 1 2

Transcription:

Mathematics in Image Processing Michal Šorel Department of Image Processing Institute of Information Theory and Automation (ÚTIA) Academy of Sciences of the Czech Republic http://zoi.utia.cas.cz/

Mathematics in image processing Mathematics in image processing, CV etc. My subjective importance Linear algebra 70% Numerical mathematics mainly optimization 60% Analysis (including convex analysis and variational calculus) 50% Statistics and probability basics + machine learning 30% Graph theory (mainly graph algorithms) 15% Universal algebra (algebraic geometry, Gröbner bases ) Probably similar for many engineering fields not much

Talk outline What is digital image processing? Typical problems and their mathematical formulation. Bayesian view of inverse problems in (not only) image restoration, analysis and synthesis based sparsity Discrete labeling problems and Markov random fields (MRFs, CRFs)

Image processing and related fields Image processing Image restoration (denoising, deblurring, SR) Computational photography (includes restoration) Segmentation Registration Pattern recognition Many applied subfields image forensics, cultural heritage conservation etc. Computer vision recognition and 3D reconstruction but growing overlap with image processing Machine learning Compressive sensing (intersects with computational photography)

Image restoration (inverse problems) Denoising Deblurring (defocus, camera motion, object motion) Tomography (CT, MRI, PET etc.)

Image segmentation and classification Separating objects, categories, foreground/background, cells or organs in biomedical applications etc.

Image Registration Transforming different sets of data into one coordinate system Transform is constrained to have a specific form (rotation, affine, projective, splines etc.) Important general forms optical flow & stereo

Optical flow Sequence of images contains information about the scene, We want to estimate motion special case of image registration

2D Motion Field = Optical Flow 3D motion field 2D motion field I 1 Projection on the image plane of the 3D scene velocity I 2 Image intensity Optical center

Optical flow example Source: CBIA Brno, http://cbia.fi.muni.cz

Stereo reconstruction Principle Result (depth map or disparity map) Result (3D model) Source: http://lcav.epfl.ch

Image processing problems Image restoration denoising deblurring tomography Segmentation and classification Image registration optical flow stereo

Mathematical image Greyscale image Continuous representation Discrete matrix or vector Both can be extended to 3D Color image = set of 3 or more greyscale images RGB channels are highly correlated many algorithms work with greyscale only

Inverse problems in image restoration Denoising Linear image degradations Deconvolution and deblurring Super-resolution CT, MRI, PET etc. reconstruction (reconstruction from projections) JPEG decompression

Image degradations Gaussian noise Homogeneous blur = convolution with a kernel h (PSF Point-spread function) Spatially-varying blur

Presentation outline What is digital image processing? Typical problems and their mathematical formulation. Bayesian view of inverse problems in (not only) image restoration, sparsity Discrete labeling problems and Markov random fields (MRFs, CRFs) Surprising result: a large family of non-convex MRF problems can be solved exactly in polynomial time/ reformulated as convex optimization problems

Bayesian Paradigm a posteriori distribution unknown likelihood given by our problem z observation, u unknown original image Maximum a posteriori (MAP): max p(u z) Maximum likelihood (MLE): max p(z u) a priori distribution our prior knowledge

MAP corresponds to regularization data term regularization term

Data term for image denoising

Image Prior 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0-0.5-0.4-0.3-0.2-0.1 0 0.1 0.2 0.3 0.4 0.5 Intensity histogram Gradient histogram

Image Prior 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0-0.5-0.4-0.3-0.2-0.1 0 0.1 0.2 0.3 0.4 0.5 Gradient histogram Theory on when we can do this will be given later (CRF)

Tikhonov versus TV Image Prior 1 0.9 0.8 0.7 Tikhonov regularization 0.6 0.5 0.4 0.3 0.2 0.1 0-0.5-0.4-0.3-0.2-0.1 0 0.1 0.2 0.3 0.4 0.5 1 0.9 0.8 0.7 0.6 0.5 TV regularization (isotropic) 0.4 0.3 0.2 0.1 0-0.5-0.4-0.3-0.2-0.1 0 0.1 0.2 0.3 0.4 0.5

Non-convex Image Prior Non-convex regularization

Bayesian MAP approach for denoising

Analysis-based sparsity TV regularization can be extended to other sparse representations W often a set of convolutions with highpass filters Wavelets (property of the Daubechie wavelets) Learned by PCA

Synthesis-based sparsity Bayesian approach applied on transform coefficients: (for a Parseval frame W) PETER G. CASAZZA AND JANET C. TREMAIN: A BRIEF INTRODUCTION TO HILBERT SPACE FRAME THEORY AND ITS APPLICATIONS

norms Measures of sparsity norm, counts nonzero elements many other sparsity measures smooth l 1 l 1 is the only sparsity enforcing convex p-norm

l 2 unit ball

l 1 unit ball

l 0.9 unit ball

l 0.5 unit ball

l 2 -norm

l 1 -norm

Deblurring Denoising Deblurring

Super-resolution (with deblurring) Several possibly shifted blurred images D i downsampling operator Convolutions represent also the shift

Super-resolution http://zoi.utia.cas.cz/bsr-toolbox

Optical flow Based on the assumption of constant brightness and Taylor series Optical flow is the velocity field

Optical flow Data term Weighting parameter Regularization term

JPEG compression x C TQ Q -1 C -1 y

50 jpg

Bayesian MAP restoration MAP maximum a posteriori probability C 2D cosine transform (orthogonal 64x64 operator) Q diagonal quantization operator (division by entries q i of the quantization table)

Bayesian JPEG decompression Using total variation (TV) (Bredies and Holler, 2012) Or using redundant wavelets C 2D cosine transform (orthogonal 64x64 operator) Q diagonal quantization operator (division by entries q i of the quantization table)

50 jpg

50 est

45

Convex variational problems Denoising, deblurring, SR, optical flow, JPEG decompression Solution by convex optimization (interior point, proximal methods) N. Parikh, S. Boyd: Proximal Algorithms What to do for discrete or non-convex problems such as segmentation and stereo?

Discrete labeling problems For each site (pixel) we look for a label (or a vector of labels) Labels depend on local image content and a smoothness constraint Image restoration, segmentation, stereo, and optical flow are all labeling problems 47

Discrete labeling problems For each site (pixel) we look for a label (or a vector of labels) Labels depend on local image content and a smoothness constraint Segmentation foreground/background or object number {0,1} {1.. k} Stereo disparity (inverse depth) -k..k Optical flow local motion vector (-k..k) x (-k..k) Restoration intensity 0..255 48

Segmentation by graph cuts 49

Graph cuts & Belief propagation Graph cuts Classical local algorithms Belief propagation 50

Markov Random Fields (MRFs) Markov Random Field, Gibbs Random Field MRF GRF (Hammersley-Clifford theorem) MRF models including smoothness priors stereo segmentation restoration (denoising, deblurring) Discrete optimization on MRFs based on graph cuts 51

Markov Random Field (MRF) sites S = {1,..., m} F... set of random variables defined on S N... neighborhood system... (possibly discrete) label configuration f = {f 1... f K }, Other possible properties homogeneity, isotropy 52

Gibbs Random Field P(f) > 0! Partition function Energy function U(f) V c (f)... clique potentials 53

Hammersley-Clifford theorem MRF = GRF F is an MRF on S with respect to N if and only if F is a Gibbs random field on S with respect to N MRF... conditional independence of non-neighbor nodes (variables) GRF... global function depending on local compatability functions 54

Hammersley-Clifford theorem - proof An MRF is also a GRF complicated, introduction of canonical potentials needed A GRF is a MRF 55

MRF = GRF MAP-MRF How to incorporate smoothness? Penalties/potentials similar for most applications 56

Smoothness prior Priors on derivatives, usually first derivative segmentation, sometimes in stereo Tikhonov regularization Discontinuity preserving penalties TV regularization line process, Mumford-Shah functional 57

MAP-MRF for stereo (Boykov & al.) 2 images d 1,d 2 on the input Birchfield-Tomasi matching cost insensitive to sampling: 58

MAP-MRF for segmentation GrabCut Interactive Foreground Extraction using Iterated Graph Cuts, C. Rother, V. Kolmogorov, A. Blake, SIGGRAPH 2004 59

MAP-MRF for segmentation Grab cut example V 1 (f i,d i ) ~ probability to be in fg/bg based on a feature space (intensities, texture features etc...) modeled for example as a mixture of Gaussians 60

MAP-MRF for restoration Denoising (with anisotropic TV regularization) 2D indexing - only this slide Deblurring (with TV regularization) Discrete methods not efficient for restoration! 61

MRFs - Summary Common framework for many image processing a CV problems Fits well to the Bayesian framework MRF = GRF 62

MAP-MRF using graph cuts MAP Maximum a posteriori probability Graph cuts = min-cut ~ max-flow (Ford-Fulkerson theorem) Much better than simulated annealing based methods, often very close to global optimum 63

Graph cuts minimization For V 2 0 metric V 2 (a,b) = 0 a = b V 2 (a,b) = V 2 (b,a) (actually not necessary) V 2 (a,b) V 2 (a,c) + V 2 (c,b) or semimetric (without -inequality) Metric: for any norm. Semimetric: 64

Graph cuts minimization General strategy minimum if no possible decrease of E(f) in one move Iterated conditional modes (ICM) iteratively minimizes each node (pixel) easily gets trapped in a local minimum (~ gradient descent) Simulated annealing global moves but without any specific direction slow Graph cuts use much larger set of moves so that the minimum over the whole set can be found in a reasonable (polynomial) time 65

α-β swap and α-expansion moves initial labeling single pixel ICM move α-β swap move α-expansion move 66

α-expansion algorithm Arbitrary metric V 2 (α,β) (Δ-inequality) Not worse than 2x optimum 67

α-β swap algorithm Arbitrary semimetric V 2 (α,β) (without Δ-inequality) No optimality guaranteed 68

α-β swap move graph 69

α-β swap move graph 70

α-β swap move graph Proof step 1: For each p in the set P αβ, the minimum cut contains exactly one edge t p 71

α-β swap move graph Proof step 2: go through 3 types of pairwise configurations. We need binary V to be semi-metric V(α,α)=0 72

α-β swap - summary We know how to transform minimization of E(f) over all possible α-β swap moves to graph cut problem 73

α-expansion move graph 74

α-expansion move graph 75

α-expansion graph - cuts - inequality! 76

α-expansion - summary We know how to transform minimization of E(f) over all possible α-expansion moves to graph cut problem What remains? - how to find the minimum cut 77

Graph cuts algorithm Augmenting path type algorithm with simple heuristics Looks for a non-saturated path ~ path in residual graph Simultaneously builds trees from α and β Maximum complexity O(n 2 mc max ), C max cost of the minimum cut Actually typically linear with respect to the number of pixels On our problems faster than good combinatorial algorithms - Dinic O(n 2 m), Push-relabel O(n 2 m) 78

Graph cuts - summary Minimization of E(f) by finding min-cut in a graph in polynomial time 2 label minimization can be done in polynomial (and typically linear) time with respect to the number of pixels K>2 labels NP hard Equivalent to Multiway Cut Problem α-expansion finds a solution 2*optimum In practice both α-β swap and α-expansion algorithms get very close to global minimum 79

Graph cuts additional example GrabCut Interactive Foreground Extraction using Iterated Graph Cuts, C. Rother, V. Kolmogorov, A. Blake, SIGGRAPH 2004 80

Discrete optimization in MRFs - summary Conditional independence is strong structural information that can be exploited Gives useful approximations for difficult (NPhard) problems For convex problems mostly better to use continuous methods 81

References Graph Cuts Fast Approximate Energy Minimization via Graph Cuts - Y. Boykov, O. Veksler, R. Zabih, PAMI 2001 (Augmenting path mincut algorithm) An Experimental Comparison of Min-Cut/Max-flow Algorithms for Energy Minimization in Vision Y. Boykov, V. Kolmogorov, PAMI 2004 (Graph construction for α-β swap and α-expansion moves) GrabCut Interactive Foreground Extraction using Iterated Graph Cuts, C. Rother, V. Kolmogorov, A. Blake, SIGGRAPH 2004 Belief propagation Understanding Belief Propagation and its Generalizations - J.S. Yedidia, W.T.Freeman, Y.Weiss (Mitsubishi electric research laboratories, Technical report, 2002) 82

Convex formulation of multi-label problems Continuous counterpart of Ishikawa s pairwise MRF problem taking huge memory Arbitrary non-convex data term Pock, Schoenemann, Graber, Bischof, Cremers: A Convex Formulation of Continuous Multilabel Problems (2008)

Functional lifting Representing u in terms of its level sets Layer cake formula

Mathematics in image processing Many image processing/cv problems can be formulated as optimization problems and solved by variational or discrete algorithms within a common framework image restoration (denoising, deblurring, SR, JPEG decompression) image segmentation optical flow stereo