(slides 6) visual computing: geometry, graphics, and vision

45
© 2011 Frank Nielsen INF555 Fundamentals of 3D Lecture 6: Metric ball trees/Texture synthesis Advanced coordinate pipelines Fourier analysis/interpolation Frank Nielsen [email protected] 19th October 2011

Upload: frank-nielsen

Post on 05-Dec-2014

85 views

Category:

Technology


1 download

DESCRIPTION

Those are the slides for the book: Visual Computing: Geometry, Graphics, and Vision. by Frank Nielsen (2005) http://www.sonycsl.co.jp/person/nielsen/visualcomputing/ http://www.amazon.com/Visual-Computing-Geometry-Graphics-Charles/dp/1584504277

TRANSCRIPT

Page 1: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

INF555

Fundamentals of 3DLecture 6:

Metric ball trees/Texture synthesisAdvanced coordinate pipelinesFourier analysis/interpolation

Frank [email protected]

19th October 2011

Page 2: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

``Texture Synthesis by Non-parametric Sampling'' Alexei A. Efros and Thomas K. Leung IEEE International Conference on Computer Vision (ICCV'99),

http://graphics.cs.cmu.edu/people/efros/research/EfrosLeung.html

Page 3: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Stochastic texture synthesis

Fast nearest neighbor queries in high dimensions

Page 4: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Ball tree data structures fornearest neighbor search

Compute a k-means on S with k=2Split S into S1 and S2 according to the two centroidsPerform recursion on S1, and S2 until |S1|<n0 and |S2|<n0

Compute a k-means on S with k=2Split S into S1 and S2 according to the two centroidsPerform recursion on S1, and S2 until |S1|<n0 and |S2|<n0

Page 5: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Nearest neighbor queries using ball trees

Pruning some of the nodes:Let NN(q) denote the current best nearest neighbor of q

if ||q-c||-rq> rc then PRUNE (do not explore the subtree)

qcrc

rqAt leaves, perform the

naive linear search,and potentially update NN(q)

At leaves, perform thenaive linear search,

and potentially update NN(q)

Page 6: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Careful seeding for k-means:Perform just a careful initialization!!!

Page 7: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

21x21 patches.21x21 patches.

queryquery

Nearest neighborsNearest neighbors

Vp-trees worked best (=fastest) for image patches....[ECCV'08]

Page 8: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Vantage point trees (or vp-trees)

Partition the data according to a vantage point and a distance thresholdRelative distances are thus used.

First split

Split from a vantage point:Inner partOuter part

do split recursion

Page 9: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Vantage point trees: Pruning condition

Prune outer Prune inner Cannot prune

Page 10: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Many ways to partition the point sets

Page 11: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

GPGPU: General Purpose GPUGPU cores

TrackingROIs(region of interest)

GPU cores

TrackingROIs(region of interest)

Distance au k=2 plus proche voisin

C: couleur (YUV)C3: 3x3 neigh in YG: gradientP: positionk=3

Page 12: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Log-Polar coordinates

Page 13: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Log-Polar coordinates

Scales and rotations become translations

Data reduction for retinal images...

Page 14: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Spherical coordinates

Page 15: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Spherical coordinates High Resolution Full Spherical VideosFrank Nielsen, ITCC'02

Page 16: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Cylindrical coordinates

Panoramic image stitching:

Align by a translation into thecylindrical coordinate map...

Page 17: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Environment maps

Equirectangular, mirror ball, cubic, etc.

Page 18: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Environment maps: Mirror ball

Page 19: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Environment maps for reflections

http://www.debevec.org/ReflectionMapping/

Blinn, 1976

1982

Interface, 1985Lance Williams

Page 20: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Environment maps for reflections

Abyss, Terminator 2 (1991)

Best environment map for real-time graphics?

Dual paraboloid (2 images front/back only)

Page 21: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Transformations and their invariants

Page 22: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Taxonomy of projections:

Page 23: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Multiple centers of projections (MCOP)

Reconstruction from a single MCOP imagesGeneralizes epipolar geometry Resolution dependent

Page 24: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Acquisition Example

Page 25: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Multiple centers of projections (MCOP)

Difficult to obtain in practice...Localization is difficult

Page 26: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Multiple centers of projections (MCOP)

The art of depiction...

Page 27: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Stereo cyclographs...

Page 28: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Image backward vs forward mappingImage warping

ResamplingInterpolation

Page 29: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Image Blending: Alpha channel

Interpretation at themicroscopic level...

Page 30: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Image sampling/reconstruction

Page 31: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Zone plate: Aliasing/ringing effect

1024x1024 256x256downsampledusing bilinear interpolation

Page 32: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Continuous versus discrete convolutions

Page 33: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Fourier analysis

Fourier discovered that all periodic signals can be represented asa sum (eventually infinite) of sinusoidal waves: sin(·) functions, the basis functions.

Let f(·) denote the continuous function in the spatial domain and F(·) denote the dual complex function, also called spectral function.

Euler formula (period 2pi)

Page 34: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Fourier analysis: Duality spatial/spectral domain

Spatial domain

Spectral domain

Page 35: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Fourier analysis: Phase/amplitude

Frequency magnitudes

Polar coordinates:

Amplitude Phase

Power spectrum

Page 36: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Fourier analysis: Convolution theorem

Convolution in spatial domain is a multiplication in Fourier domain

Convolution in frequency domain is a multiplication in spatial domain

Page 37: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Fourier analysis: Discrete transformations

1D

2D

Page 38: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Interpolation/reconstruction filters

Bilinear interpolation

Page 39: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Interpolation/reconstruction filtersSinc (Lanczos) is ideal low-pass filter (infinite support)Sinc (Lanczos) is ideal low-pass filter (infinite support)

Ideal low-pass filter

Fourier transform

The sinc functionFourier domain

Spatial domain

Windowed sinc

Page 40: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Mr Angry Mrs Calm

Low/high frequency perception

Page 41: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Phase correlation

F* is the conjugate function

Stitch by 2D translation two images

FFT can be computedin O(nlog n) time

FFT can be computedin O(nlog n) time

Page 42: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Phase correlation

Algorithme: Calculer le cross-power spectrum des deux images

Calculer la transformation inverse FFT, et chercher le sommet dans l'image spatiale

Extend to rotation and scale using the log-polar transform

Page 43: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Phase correlation

C.D. Kuglin and D.C. Hines. The phase correlation imagealigment method. Proc. Int. Conf. on Cybernetics and Society,pages 163–165, 1975.

E. De Castro and C. Morandi. Registration of translated androtated images using finite fourier transforms.IEEE Trans. PatternAnalysis and Machine Intelligence, (3):700–703, September1987.

Extend up to affine transformations

ROBUST IMAGE REGISTRATION USING LOG-POLAR TRANSFORM,ICIP 2000

Page 44: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Phase correlation: Detecting the peakSub-pixel accuracy if we fit a quadratic function

Clairvoyance systemIEEE IECON 2006

ClairVoyance: A Fast and Robust Precision Mosaicing System for Gigapixel Images

Page 45: (slides 6) Visual Computing: Geometry, Graphics, and Vision

© 2011 Frank Nielsen

Veuillez commencer vos projets sous Processing et autres Java APIs

Utilisez JMyron sous Processing pour capturer la webcamhttp://webcamxtra.sourceforge.net/