Lecture 11: Group Assignment 1 Review, Procrustes Intro - - PowerPoint PPT Presentation

lecture 11 group assignment 1 review procrustes intro
SMART_READER_LITE
LIVE PREVIEW

Lecture 11: Group Assignment 1 Review, Procrustes Intro - - PowerPoint PPT Presentation

Lecture 11: Group Assignment 1 Review, Procrustes Intro COMPSCI/MATH 290-04 Chris Tralie, Duke University 2/18/2016 COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro Table of Contents Assignment Concepts Review


slide-1
SLIDE 1

Lecture 11: Group Assignment 1 Review, Procrustes Intro

COMPSCI/MATH 290-04

Chris Tralie, Duke University

2/18/2016

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-2
SLIDE 2

Table of Contents

◮ Assignment Concepts Review ⊲ PCA New Convention ⊲ Procrustes Distance

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-3
SLIDE 3

Code Layout: Recursive Scene Graph Traversal

f(node, mvMatrix): for c in node.children: if (’mesh’ in node) { //Do some stuff if this isn’t a dummy node } f(c, mat4.mul(mvMatrix, node.transform));

Call this function with “scene” to start the recursion

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-4
SLIDE 4

Code Layout: Meshes (What Is A Mesh??)

var mesh = node.mesh; //Loop through faces for (var f = 0; f < mesh.faces.length; f++) { //"Pointer" to face var face = mesh.faces[f]; //For each face get vertices in CCW order var verts = face.getVerticesPos(); //Do stuff with the vertices... }

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-5
SLIDE 5

Code Layout: Image Sources

scene.imsources = [scene.source]; for (order = 1:k): for s in scene.imsources: if s.order == order-1 { //Reflect (call recursive scene tree function) //Generate a bunch of images snew snew.parent = s snew.genFace = face reflected }

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-6
SLIDE 6

Reflections / Projections

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-7
SLIDE 7

Reflections / Projections

Plane: ( q, n) Point: p Reflection: p − 2(( p − q) · n) n

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-8
SLIDE 8

Ray Intersect Plane

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-9
SLIDE 9

Ray Intersect Plane

( p0 + t v − q) · n = 0

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-10
SLIDE 10

Ray Intersect Plane

( p0 + t v − q) · n = 0 t = ( q − p0) · n

  • v ·

n

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-11
SLIDE 11

Point Inside Convex Polygon: Area Test

1 2 3 4 5 6 7

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-12
SLIDE 12

Convex Polygon Area?

1 2 3 4 5 6 7

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-13
SLIDE 13

Convex Polygon Area: Triangle Fan

1 2 3 4 5 6 7

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-14
SLIDE 14

Extra Stuff: Binaural Sound

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-15
SLIDE 15

Extra Stuff: Transmission

1 2 3

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-16
SLIDE 16

Extra Stuff: Transmission (Raffle Point)

Regular expressions

1 2 3 COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-17
SLIDE 17

Extra Stuff: Transmission (Raffle Point)

Regular expressions (r|t)∗

1 2 3 COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-18
SLIDE 18

Extra Stuff: Frequency dependent transmission

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-19
SLIDE 19

Extra Stuff: Bounding Box Speedup

root

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-20
SLIDE 20

Table of Contents

⊲ Assignment Concepts Review ◮ PCA New Convention ⊲ Procrustes Distance

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-21
SLIDE 21

PCA New Convention

Organize point cloud into d × N matrix, each point along a column X =    | | . . . |

  • v1
  • v2

. . .

  • vN

| | . . . |    Choose a unit column vector direction u ∈ Rd×1 Then d = uTX gives projections onto u

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-22
SLIDE 22

PCA New Convention

Organize point cloud into d × N matrix, each point along a column X =    | | . . . |

  • v1
  • v2

. . .

  • vN

| | . . . |    Choose a unit column vector direction u ∈ Rd×1 Then d = uTX gives projections onto u ⊲ More consistent with what we’ve done; points in columns

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-23
SLIDE 23

PCA New Convention

d = uTX

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-24
SLIDE 24

PCA New Convention

d = uTX ⊲ How to express the sum of the squares of the dot products?

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-25
SLIDE 25

PCA New Convention

d = uTX ⊲ How to express the sum of the squares of the dot products? ddT

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-26
SLIDE 26

PCA New Convention

d = uTX ⊲ How to express the sum of the squares of the dot products? ddT ddT = (uTX)(uTX)T = uTXX Tu Want to find u that maximizes the above quadratic form

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-27
SLIDE 27

PCA New Convention

Use eigenvectors of A = XX T to find principal directions maximizing uTAu λ1 = 422

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-28
SLIDE 28

PCA New Convention

Use eigenvectors of A = XX T to find principal directions maximizing uTAu λ2 = 21.6

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-29
SLIDE 29

Table of Contents

⊲ Assignment Concepts Review ⊲ PCA New Convention ◮ Procrustes Distance

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-30
SLIDE 30

Procrustes Distance

http://www.procrustes.nl/gif/illustr.gif

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-31
SLIDE 31

Procrustes Alignment

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro

slide-32
SLIDE 32

Procrustes Distance

Given two point clouds { xi}N

i=1 and {

yi}N

i=1

where xi and yi are in correspondence Seek to minimize

N

  • i=1

||R( xi + t) − yi||2

2

  • ver all orthogonal matrices R and translation vectors t. ||.||2 is

squared distance

COMPSCI/MATH 290-04 Lecture 11: Group Assignment 1 Review, Procrustes Intro