Advanced Computer Graphics

Similar documents
Advanced Computer Graphics

10 - ARAP and Linear Blend Skinning

(Sparse) Linear Solvers

(Sparse) Linear Solvers

CS 775: Advanced Computer Graphics. Lecture 4: Skinning

Computational Design. Stelian Coros

Solving Sparse Linear Systems. Forward and backward substitution for solving lower or upper triangular systems

Rigging / Skinning. based on Taku Komura, Jehee Lee and Charles B.Own's slides

As-Rigid-As-Possible Shape Manipulation

AMS526: Numerical Analysis I (Numerical Linear Algebra)

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Character animation Christian Miller CS Fall 2011

CS 523: Computer Graphics, Spring Shape Modeling. Skeletal deformation. Andrew Nealen, Rutgers, /12/2011 1

Mesh-Based Inverse Kinematics

Def De orma f tion orma Disney/Pixar

Animations. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Kavita Bala

Dynamic Geometry Processing

Animation of 3D surfaces.

Large Mesh Deformation Using the Volumetric Graph Laplacian

Skeleton Based As-Rigid-As-Possible Volume Modeling

Animation. CS 465 Lecture 22

CSE452 Computer Graphics

calibrated coordinates Linear transformation pixel coordinates

Geometric Modeling and Processing

Skeletal deformation

Easy modeling generate new shapes by deforming existing ones

Parallel Computation of Spherical Parameterizations for Mesh Analysis. Th. Athanasiadis and I. Fudos University of Ioannina, Greece

Geostatistics 2D GMS 7.0 TUTORIALS. 1 Introduction. 1.1 Contents

Locally Injective Mappings

Animation. CS 4620 Lecture 33. Cornell CS4620 Fall Kavita Bala

CS 775: Advanced Computer Graphics. Lecture 3 : Kinematics

N-Views (1) Homographies and Projection

CSE 554 Lecture 7: Deformation II

Surface Reconstruction. Gianpaolo Palma

Introduction to Computer Graphics. Animation (1) May 19, 2016 Kenshi Takayama

Interlude: Solving systems of Equations

Free-Form Deformation and Other Deformation Techniques

Real-Time Shape Editing using Radial Basis Functions

Assignment 5: Shape Deformation

Surface Registration. Gianpaolo Palma

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

Computer Vision Projective Geometry and Calibration. Pinhole cameras

03 - Reconstruction. Acknowledgements: Olga Sorkine-Hornung. CSCI-GA Geometric Modeling - Spring 17 - Daniele Panozzo

Discrete Geometry Processing

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

Skinning Mesh Animations

Efficient Linear System Solvers for Mesh Processing

Least-Squares Fitting of Data with B-Spline Curves

Advanced Graphics and Animation

5.2 Surface Registration

Robot Mapping. Least Squares Approach to SLAM. Cyrill Stachniss

Graphbased. Kalman filter. Particle filter. Three Main SLAM Paradigms. Robot Mapping. Least Squares Approach to SLAM. Least Squares in General

Scanning Real World Objects without Worries 3D Reconstruction

12 - Spatial And Skeletal Deformations. CSCI-GA Computer Graphics - Fall 16 - Daniele Panozzo

Practical Least-Squares for Computer Graphics

How to create a bone diagram?

Kinematics and Orientations

Animation of 3D surfaces

Game Programming. Bing-Yu Chen National Taiwan University

05 Mesh Animation. Steve Marschner CS5625 Spring 2016

Camera Calibration. Schedule. Jesus J Caban. Note: You have until next Monday to let me know. ! Today:! Camera calibration

Lecture 3: Camera Calibration, DLT, SVD

COS429: COMPUTER VISON CAMERAS AND PROJECTIONS (2 lectures)

This week. CENG 732 Computer Animation. Warping an Object. Warping an Object. 2D Grid Deformation. Warping an Object.

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 253

Computing and Processing Correspondences with Functional Maps

COMPUTER ANIMATION 3 KEYFRAME ANIMATION, RIGGING, SKINNING AND CHARACTER ANIMATION. Rémi Ronfard, Animation, M2R MOSIG

Lecture 15: More Iterative Ideas

SCAPE: Shape Completion and Animation of People

Course Review. Computer Animation and Visualisation. Taku Komura

IN OUR LAST HOMEWORK, WE SOLVED LARGE

Numerical Linear Algebra

Structure from Motion

animation computer graphics animation 2009 fabio pellacini 1 animation shape specification as a function of time

3D Geometry and Camera Calibration

Digital Geometry Processing

animation computer graphics animation 2009 fabio pellacini 1

About this document. Introduction. Where does Life Forms fit? Prev Menu Next Back p. 2

A skeleton/cage hybrid paradigm for digital animation

Translations. Geometric Image Transformations. Two-Dimensional Geometric Transforms. Groups and Composition

Introduction to Computer Graphics. Modeling (3) April 27, 2017 Kenshi Takayama

Geometric Modeling Assignment 5: Shape Deformation

Lecture 11: Randomized Least-squares Approximation in Practice. 11 Randomized Least-squares Approximation in Practice

6.837 LECTURE 7. Lecture 7 Outline Fall '01. Lecture Fall '01

COMP 558 lecture 19 Nov. 17, 2010

T6: Position-Based Simulation Methods in Computer Graphics. Jan Bender Miles Macklin Matthias Müller

CIS 580, Machine Perception, Spring 2014: Assignment 4 Due: Wednesday, April 10th, 10:30am (use turnin)

Special Topics in Visualization

Applications of Dual Quaternions in Three Dimensional Transformation and Interpolation

Geometric Registration for Deformable Shapes 3.3 Advanced Global Matching

Interpolating and approximating scattered 3D-data with hierarchical tensor product B-splines

Quaternions and Exponentials

Parameterization II Some slides from the Mesh Parameterization Course from Siggraph Asia

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 263

Bounded Distortion Mapping and Shape Deformation

Computer Vision. Coordinates. Prof. Flávio Cardeal DECOM / CEFET- MG.

THE FORCE DENSITY METHOD: A BRIEF INTRODUCTION

SM2231 :: 3D Animation I :: Basic. Rigging

Geometric Modeling and Processing

计算机图形学. Computer Graphics 刘利刚.

Transcription:

G22.2274 001, Fall 2009 Advanced Computer Graphics Project details and tools 1

Project Topics Computer Animation Geometric Modeling Computational Photography Image processing 2

Optimization All projects have a global optimization component: Define some energy functional E(x) x is the shape, or the image Compute the optimal x such that E(x) is minimized There are some constraints to the minimization 3

Computer Animation Character animation Create a system for rigging and posing of digital characters (shapes) Step 1: compute a skeleton 4

Computer Animation Character animation Create a system for rigging and posing of digital characters (shapes) Step 1: compute a skeleton Suggestion: implement the paper Skeleton Extraction by Mesh Contraction, SIGGRAPH 2008 also implement GUI to manually create a skeleton 5

Computer Animation Character animation Function E(x) measures how smooth the shape x is E( x) = n x i w ij i= 1 j N( i) Constraints: extremities (finger tips, ears, etc.) x j 2 6

Computer Animation Character animation Create a system for rigging and posing of digital characters (shapes) Step 2: GUI for skeleton posing Forward kinematics just change joint angles Optional: also add inverse kinematics 7

Computer Animation Character animation Create a system for rigging and posing of digital characters (shapes) Step 3: implement skinning algorithm Basic linear blend skinning Dual Quaternions (Kavan et al. 2008) Optional: also implement one of the recent optimization based skinning techniques, such as Real Time Enveloping with Rotational Regression, SIGGRAPH 2007 8

Computer Animation Character animation Create a system for rigging and posing of digital characters (shapes) Step 3: implement skinning algorithm Basic linear blend skinning Dual Quaternions (Kavan et al. 2008) The functional E(x) measures how similar the deformed shape x is to the original shape in terms of local details E( x) = n i= 1 L( x i ) T L( ( x orig i )) 2 9

Geometric Modeling Interactive shape editing system A system to edit shapes interactively by grab and drag interface 10

As rigid as possible surface deformation Smooth effect on the large scale As rigid as possible effect on the small scale (preserves details) 11

Direct ARAP modeling We actually may want to preserve the shapes of cells covering the surface 12

Direct ARAP modeling Let s look at cells on a mesh 13

Direct ARAP modeling Ask all the star edges to transform rigidly, then the shape of the cell is preserved v j2 v i vj1 14

Direct ARAP modeling Cell energy: min ( v i v j) Ri( vi v j) j N() i 2 v j2 v i vj1 15

Direct ARAP modeling If v, v are known then R i is uniquely defined v j2 v j2 v i v j1 v i v j1 R i It s the shape matching problem! Build covariance matrix S = VV T SVD: S = UΣP T R i = UP T R i is a non-linear function of v 16

Direct ARAP modeling Can formulate overall energy of the deformation: n min ( v v ) R ( v v ) v i= 1 j N( i) i j i i j 2 st.. v = c, j C j j 17

Geometric Modeling Interactive shape editing system Implement one of the recent papers: PriMo, SGP 2006 As rigid as possible surface modeling, SGP 2007 Add multiresolution hierarchy Try both the optimization method in the paper and direct Gauss Newton optimization, helped by this paper: Shape Decomposition Using Modal Analysis, Eurographics 2009 18

Computational Photography Rectifying fish eye lens distortion 19

Computational Photography Rectifying fish eye lens distortion Implement the paper Optimizing Content Preserving Projections for Wide Angle Images, SIGGRAPH 2009 They optimize the mapping from the viewing sphere onto the image plane 20

Computational Photography Rectifying fish eye lens distortion Implement the paper Optimizing Content Preserving Projections for Wide Angle Images, SIGGRAPH 2009 They optimize the mapping from the viewing sphere onto the image plane E(x) measures: How well the quads are preserved (want all angles to be 90) How well straight lines that the user marked are preserved 21

Computational Photography Shaky cam stabilization Implement Content Preserving Warps for 3D Video Stabilization, SIGGRAPH 2009 22

Computational Photography Shaky cam stabilization Implement Content Preserving Warps for 3D Video Stabilization, SIGGRAPH 2009 E(x) measures: How well the quads are preserved (want all angles to be 90) Constraints: point to point 23

Image Processing Image retargeting (resizing) The problem: resize an image to fit a display device with a different aspect ratio 24

Image Processing Image retargeting (resizing) The problem: resize an image to fit a display device with a different aspect ratio 25

Approach: Image Processing Image retargeting (resizing) Compute an importance map of the image Warp the image such that regions with high importance are preserved at the expense of unimportant regions importance map 26

Image Processing Image retargeting (resizing) Grid mesh, preserve the shape of the important quads quads with high importance: uniform scaling quads with low importance: allowed non uniform scaling Optimize the location of mesh vertices, interpolate image 27

Image Processing Image retargeting (resizing) Grid mesh, preserve the shape of the important quads Optimize the location of mesh vertices, interpolate image 28

Image Processing Image retargeting (resizing) Grid mesh, preserve the shape of the important quads Optimize the location of mesh vertices, interpolate image 29

E(x) measures: How well the quad shape is preserved How smooth the grid lines are In this project: how well straight lines are preserved Constraints: The boundary of the image (has to fit new dimensions) Image Processing Image retargeting (resizing) 30

Optimization In the projects: mostly linear optimization, i.e. linear least squares problems 31

Solving linear systems in LS sense Wish list of equations: i=1,, n: f (x i ) = f i Example: measuring surface smoothness E( x) = n x i w ij i= 1 j N( i) x j 2 32

Solving linear systems in LS sense Wish list of equations: i=1,, n: f (x i ) = f i Example: measuring surface smoothness E( x) = n x i w ij i= 1 j N( i) x j 2 i = 1, K, n: x i w ij j N( i) x j = 0 Wish equation 33

Solving linear systems in LS sense We have an over determined linear system k n: a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2 a k1 x 1 + a k2 x 2 + + a kn x n = b k 34

Solving linear systems in LS sense In matrix form: = k kn k k n n a a a a a a a a a b b b 2 1 2 1 2 22 21 1 12 11 M K M M M K K K x n x x 2 1 M 9/21/2009 35 Olga Sorkine, Courant Institute

Solving linear systems in LS sense In matrix form: Ax = b where A = (a ij ) is a rectangular k n matrix, k > n x = (x 1, x 2,, x n ) T b = (b 1, b 2,, b k ) T 36

Solving linear systems in LS sense More constrains than variables no exact solutions generally exist We want to find something that is an approximate solution : x opt = argmin Ax b 2 x min E(x) x 37

Finding the LS solution x R n Ax R k As we vary x, Ax varies over the linear subspace of R k spanned by the columns of A: Ax = A 1 A 2 A n x 1 x 2.. + x 2 + + x n x n 38

Finding the LS solution We want to find the closest Ax to b: min Ax b 2 x Ax closest to b b Subspace spanned by columns of A R k 39

Finding the LS solution The vector Ax closest to b satisfies: (Ax b) {subspace of A s columns} column A i : A i, Ax b = 0 These are called the normal equations i, A i T (Ax b) = 0 A T (Ax b) = 0 (A T A)x = A T b 40

Finding the LS solution We got a square symmetric system (A T A)x = A T b (n n) If A has full rank (the columns of A are linearly independent) then (A T A) is invertible. min x x = Ax b 2 ( T ) 1 T A A A b 41

Weighted least squares If each constraint has a weight in the energy: The weights w i > 0 and don t depend on x Then: min x n i= 1 wi (f i ( x i ) b min (Ax b) T W(Ax b) where W = (w i ) ii (A T W A) x = A T W b i 2 ) 42

Linear Systems Matrix is often fixed, rhs changes M x = r A T A A T b 43

Matrix Factorization LU decomposition M = L U Mx = r LUx= r 44

Matrix Factorization LU decomposition M = L U Mx = r L(Ux) = r 45

Matrix Factorization LU decomposition M = L U Mx = r L(Ux) = r Ly = r Ux= y This is backsubstitution. If L, U are sparse it is very fast. The hard work is computing L and U 46

Matrix Factorization LU decomposition M = L U Mx = r L(Ux) = r y = L 1 r x = U 1 y This is backsubstitution. If L, U are sparse it is very fast. The hard work is computing L and U 47

Matrix Factorization Cholesky decomposition M = L L T Cholesky factor exists if M is positive definite. It is even better than LU because we save memory. 48

Cholesky Decomposition M = LL T M is symmetric positive definite (SPD): x 0, Mx, x > 0 all M s eigenvalues > 0 M = L L T 49

Dense Cholesky Factorization M = LL T 500 500 matrix 3500 nonzeros L 36k nonzeros Cholesky Factorization 50

Sparse Cholesky Factorization M = LL T 500 500 matrix 3500 nonzeros L 36k nonzeros Reordering PMP T reverse Cuthill McKee algorithm Cholesky Factorization 51

Sparse Cholesky Factorization M = LL T 500 500 matrix 3500 nonzeros L 36k nonzeros Reordering PMP T reverse Cuthill McKee algorithm Cholesky Factorization L 14k nonzeros 52

Sparse Cholesky Factorization M = LL T 500 500 matrix 3500 nonzeros L 36k nonzeros Reordering PMP T nested dissection (parallelizable) Cholesky Factorization 53

Sparse Cholesky Factorization M = LL T 500 500 matrix 3500 nonzeros L 36k nonzeros Reordering PMP T nested dissection (parallelizable) Cholesky Factorization L 7k nonzeros 54

Highly accurate Manipulate matrix structure No iterations, everything is closed form Easy to use Off the shelf library, no parameters Direct Solvers Discussion If M stays fixed, changing rhs (r) is cheap Just need to back substitute (factor precomputed) 55

High memory cost Direct Solvers Discussion Need to store the factor, which is typically denser than the matrix M If the matrix M changes, need to re compute the factor (expensive) 56

TAUCS tutorial TAUCS: a library of sparse linear solvers Has both iterative and direct solvers Direct (Cholesky and LU) use reordering and are very fast I provide a wrapper for TAUCS on the course homepage 57

TAUCS tutorial Basic operations: Define a sparse matrix structure Fill the matrix with its nonzero values (i, j, v) Factor A T A Provide an rhs and solve 58

TAUCS tutorial Basic operations: Define a sparse matrix structure InitTaucsInterface(); int ida; ida = CreateMatrix(4, 3); #rows #cols 59

TAUCS tutorial Basic operations: Fill the matrix A with its nonzero values (i, j, v) SetMatrixEntry(idA, i, j, v); 60

TAUCS tutorial Basic operations: Fill the matrix A with its nonzero values (i, j, v) SetMatrixEntry(idA, i, j, v); matrix ID, obtained in CreateMatrix 61

TAUCS tutorial Basic operations: Fill the matrix A with its nonzero values (i, j, v) SetMatrixEntry(idA, i, j, v); row index i, column index j, zero based 62

TAUCS tutorial Basic operations: Fill the matrix A with its nonzero values (i, j, v) SetMatrixEntry(idA, i, j, v); value of matrix entry ij for instance, w ij 63

TAUCS tutorial Basic operations: Factor the matrix A T A FactorATA(idA); 64

TAUCS tutorial Basic operations: Provide an rhs and solve taucstype b[4] = {3, 4, 5, 6}; taucstype x[3]; SolveATA(idA, b, x, 1); 65

TAUCS tutorial Basic operations: Provide an rhs and solve taucstype b[4] = {3, 4, 5, 6}; taucstype x[3]; SolveATA(idA, b, x, 1); typedef for double 66

TAUCS tutorial Basic operations: Provide an rhs and solve taucstype b[4] = {3, 4, 5, 6}; taucstype x[3]; SolveATA(idA, b, x, 1); ID of the A matrix 67

TAUCS tutorial Basic operations: Provide an rhs and solve taucstype b[4] = {3, 4, 5, 6}; taucstype x[3]; SolveATA(idA, b, x, 1); rhs for the LS system Ax = b 68

TAUCS tutorial Basic operations: Provide an rhs and solve taucstype b[4] = {3, 4, 5, 6}; taucstype x[3]; SolveATA(idA, b, x, 1); array for the solution 69

TAUCS tutorial Basic operations: Provide an rhs and solve A is 4x3 taucstype b[4] = {3, 4, 5, 6}; taucstype x[3]; SolveATA(idA, b, x, 1); number of rhs s 70

TAUCS tutorial Basic operations: Provide an rhs and solve A is 4x3 taucstype b2[8] = {3, 4, 5, 6, 7, 8, 9, 10}; taucstype xy[6]; SolveATA(idA, b2, xy, 2); number of rhs s 71

TAUCS tutorial If the matrix A is square a priori, no need to solve the LS system Then just use FactorA()and SolveA() 72

Further Reading Efficient Linear System Solvers for Mesh Processing Mario Botsch, David Bommes, Leif Kobbelt Invited paper at IMA Mathematics of Surfaces XI, Lecture Notes in Computer Science, Vol 3604, 2005, pp. 62 83. 73

Next week By September 28 you must: Read up on all the projects and decide on your priorities Discuss with me if you d like to do a customized project (your own ideas) E mail me your project preference (ranked list) No class meeting (do homework! ) 74

Next week and after On September 28 29 I will assign a project to everyone Next class: October 5; everyone presents their initial project plan Up to 20 minutes presentation (can be shorter) Explain the project in your words, with technical details Outline your work plan Bring up things that are unclear/challenges you foresee 75