(slides 3) Visual Computing: Geometry, Graphics, and Vision
-
Upload
frank-nielsen -
Category
Technology
-
view
150 -
download
0
description
Transcript of (slides 3) Visual Computing: Geometry, Graphics, and Vision
![Page 1: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/1.jpg)
© 2011 Frank Nielsen
INF555
Fundamentals of 3DLecture 3:
Debriefing: Lecture 2Rigid transformations/QuaternionsIterative Closest Point (+Kd-trees) Frank Nielsen
28 Septembre 2011
![Page 2: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/2.jpg)
© 2011 Frank Nielsen
• Depth discontinuity• Surface orientation
discontinuity• Reflectance
discontinuity (i.e., change in surface material properties)
• Illumination discontinuity (e.g., shadow)
Harris-Stephens' combined corner/edge detector
![Page 3: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/3.jpg)
© 2011 Frank Nielsen
![Page 4: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/4.jpg)
© 2011 Frank Nielsen
Harris-Stephens edge detector
Aim at finding good feature
![Page 5: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/5.jpg)
© 2011 Frank Nielsen
Harris-Stephens edge detectorMeasure the corner response as
Algorithm:– Find points with large corner response function R (R > threshold)– Take the points of local maxima of R
![Page 6: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/6.jpg)
© 2011 Frank Nielsen
![Page 7: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/7.jpg)
© 2011 Frank Nielsen
Edge thresholding hysterisis
● If a pixel value is above the high threshold, it is an edge.
● If a pixel value is below the low threshold, it is not an edge.
● If a pixel value is between the low and high thresholds,it is an edge if it is connected to another edge pixel,otherwise it is interpreted as noise.
Two thresholds: low and high
Single threshold value for edges -> Streaking
![Page 8: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/8.jpg)
© 2011 Frank Nielsen
Edge hysteresis
![Page 9: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/9.jpg)
© 2011 Frank Nielsen
Homogeneous coordinates and duality point/line
homogenization
Homogeneous vectorInhomogeneous vector
dehomogenization (also known as Perspective division)
![Page 10: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/10.jpg)
© 2011 Frank Nielsen
Projective plane
Equivalence class:
is equivalent to
Line coefficients stored in an inhomogeneous vector
Equation of the line:
Point and line have same homogeneous representation:A point can be interpreted as the coefficients of the line
Point and line have same homogeneous representation:A point can be interpreted as the coefficients of the line
![Page 11: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/11.jpg)
© 2011 Frank Nielsen
Intersection of lines
Cross-product of two vectors:
Intersection point of two lines is obtained from their cross-product:
Line passing through two « points » l1* and l2*: l=p*=l1* x l2*
p= l1 x l2
Duality
![Page 12: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/12.jpg)
© 2011 Frank Nielsen
Application: Detection of line segment intersection
l1=CrossProduct(p,q);l2=CrossProduct(r,s);// intersection point is the cross-product //of the line coefficients (duality)intersection=CrossProduct(l1,l2);intersection.Normalize(); // to get back Euclidean point
![Page 13: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/13.jpg)
© 2011 Frank Nielsen
Overview of duality in projective geometry
The determinant of three points represent the volume of their parallepiped.
![Page 14: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/14.jpg)
© 2011 Frank Nielsen
2D Transformations using homogeneous coordinates
![Page 15: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/15.jpg)
© 2011 Frank Nielsen
2D Transformations using homogeneous coordinates
![Page 16: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/16.jpg)
© 2011 Frank Nielsen
Cartesian coordinate systems in 3D
![Page 17: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/17.jpg)
© 2011 Frank Nielsen
3D Transformations using homogeneous coordinates
Be careful: Gimbal lock
![Page 18: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/18.jpg)
© 2011 Frank Nielsen
Euler rotation
![Page 19: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/19.jpg)
© 2011 Frank Nielsen
Cross-product/outer product
Consider the cross-product as a matrix multiplication:
Outer-product
![Page 20: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/20.jpg)
© 2011 Frank Nielsen
Arbitrary matrix rotation:Rodrigues' formula
Equivalent to:
![Page 21: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/21.jpg)
© 2011 Frank Nielsen
![Page 22: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/22.jpg)
© 2011 Frank Nielsen
![Page 23: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/23.jpg)
© 2011 Frank Nielsen
Rigid transformations
Concatenation (non-commutative!)
![Page 24: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/24.jpg)
© 2011 Frank Nielsen
Quaternions for rotations
● Easy to invert scalars● For 2D vectors, invert using complex numbers...● For 3D vectors??? (-> 4D quaternions)● For dD vectors??? (-> 8D octonions)
● Easy to invert scalars● For 2D vectors, invert using complex numbers...● For 3D vectors??? (-> 4D quaternions)● For dD vectors??? (-> 8D octonions)
Provide rotation operator that is invertible
Sir William Rowan Hamilton
Lectures on Quaternions
http://digital.library.cornell.edu/
![Page 25: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/25.jpg)
© 2011 Frank Nielsen
Quaternions: 1D real+3D imaginary
Real part (1D) Imaginary part (3D, i j k vectors)
Multiplication:
Norm (l2)
![Page 26: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/26.jpg)
© 2011 Frank Nielsen
Unit quaternions
For a given 3D point p, we compute its rotation Rp as
Rotation theta around an axis u: Quaternion representation:
conjugate
![Page 27: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/27.jpg)
© 2011 Frank Nielsen
Unit quaternions for rotations
![Page 28: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/28.jpg)
© 2011 Frank Nielsen
Conversion rotation matrix to quaternion
![Page 29: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/29.jpg)
© 2011 Frank Nielsen
Spherical linear interpolation (SLERP)
LERP is non-sense for rotation matrices:
SLERP is using quaternion algebra:
![Page 30: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/30.jpg)
© 2011 Frank Nielsen
Spherical linear interpolation (SLERP)
Useful for computer graphics animation(bone, skinning at articulation)
![Page 31: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/31.jpg)
© 2011 Frank Nielsen
Bilateral filtering
Edge-preserving smoothing
Videos/demo
![Page 32: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/32.jpg)
© 2011 Frank Nielsen
Gaussian filtering: Blur everything
Traditional spatial gaussian filtering
![Page 33: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/33.jpg)
© 2011 Frank Nielsen
Bilateral filtering
New! gaussian on the intensity difference filtering
Bilateral Filtering for Gray and Color Images, Tomasi and Manduchi 1998.... SUSAN feature extractor...
![Page 34: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/34.jpg)
© 2011 Frank Nielsen
Domainfiltering
Range filtering
![Page 35: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/35.jpg)
© 2011 Frank Nielsen
Iterative Closest Point (ICP)
Align point sets. For example, terrains (DEMs)
Robotics
![Page 36: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/36.jpg)
© 2011 Frank Nielsen
Align point sets obtained from range scanners
http://www-graphics.stanford.edu/projects/mich/
![Page 37: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/37.jpg)
© 2011 Frank Nielsen
Solve stone jigsaws...
ICP for solving jigsaws
![Page 38: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/38.jpg)
© 2011 Frank Nielsen
ICP: Algorithm at a glance
● Start from a not too far transformation
● Match the point of the target to the source● Compute the best transformation from point correspondence● Reiterate until the mismatch error goes below a threshold
In practice, this is a very fast registration method...
A Method for Registration of 3-D Shapes. by: Paul J Besl, Neil D Mckay.IEEE Trans. Pattern Anal. Mach. Intell., Vol. 14, No. 2. (February 1992
![Page 39: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/39.jpg)
© 2011 Frank Nielsen
ICP: Finding the best rigid transformation
Given point correspondences, find the best rigid transformation.
Source/ModelObservation/Target
Find (R,t) that minimizes the squared euclidean error:
![Page 40: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/40.jpg)
© 2011 Frank Nielsen
Align the center of mass of sets:
![Page 41: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/41.jpg)
© 2011 Frank Nielsen
Finding the rotation matrix:
Compute the singular value decomposition
Optimal transformation:
![Page 42: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/42.jpg)
© 2011 Frank Nielsen
Registration of many point sets to a common atlas
Scoliotic Spine (Atlas of 307 patients)
Many variants of ICP method (truncated, robust, etc.)Many variants of ICP method (truncated, robust, etc.)
![Page 43: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/43.jpg)
© 2011 Frank Nielsen
In theory, ICP may provably run very slowly for well-constructedwell-constructed point sets...
What computational geometers say
David Arthur; Sergei VassilvitskiiWorst-case and Smoothed Analysis of the ICP Algorithm, with an Application to the k-means MethodFOCS 2006 => O(n/d)^d iterations (exponential)
... but smooth analysis of ICP is polynomial
![Page 44: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/44.jpg)
© 2011 Frank Nielsen
Computing nearest neighbors in ICP...
● Naive linear-time algorithm● Tree-like algorithm using kd-trees● Tree-like algorithm using metric ball trees●...
Challenging problem in very high-dimensions(common to work up to dimension > 1000 nowadays)
Nearest neighbor of q
![Page 45: (slides 3) Visual Computing: Geometry, Graphics, and Vision](https://reader034.fdocuments.us/reader034/viewer/2022051013/5482f2dcb47959f60c8b4935/html5/thumbnails/45.jpg)
© 2011 Frank Nielsen
Installez Processing.org
→ Rendu des TD1, 2 et 3 pour le Mardi 4 Octobre 17h(Upload work sur la page du cours)