Upcoming SlideShare
×

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

174 views

Published on

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

Published in: Technology, Art & Photos
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
174
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
8
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

1. 1. © 2011 Frank Nielsen INF555 Fundamentals of 3D Lecture 1 Follow-up: Connected Components Lecture 2: Convolutions and Filters Matrix decompositions Frank Nielsen 21 Septembre 2011
2. 2. © 2011 Frank Nielsen Labelling connected components (Union-Find) Input: binary image Foreground/Background pixels Output: Each connected component Extracting one component
3. 3. © 2011 Frank Nielsen Useful in computer vision... → Image segmentation How many (large) objects?
4. 4. © 2011 Frank Nielsen A simple algorithm Initially each pixel defines its own region (labelled by say the pixel index: x+y*width) Scan the image from left to right and top to bottom: If current pixel is background AND East pixel is background: Merge their regions into one = « connect » them If current pixel is background AND South pixel is background: Merge their regions into one = « connect » them Extract regions (floodfilling or single pass algorithm) Initially each pixel defines its own region (labelled by say the pixel index: x+y*width) Scan the image from left to right and top to bottom: If current pixel is background AND East pixel is background: Merge their regions into one = « connect » them If current pixel is background AND South pixel is background: Merge their regions into one = « connect » them Extract regions (floodfilling or single pass algorithm) How do we merge quickly disjoint sets?
5. 5. © 2011 Frank Nielsen Union-Find abstract data-structures c RANK=DEPTH Visual Depiction
6. 6. © 2011 Frank Nielsen class UnionFind{ int [ ] rank; int [ ] parent; UnionFind(int n) {int k; parent=new int[n]; rank=new int[n]; for (k = 0; k < n; k++) {parent[k] = k; rank[k] = 0; } } int Find(int k) {while (parent[k]!=k ) k=parent[k]; return k;} int Union(int x, int y) { x=Find(x);y=Find(y); if ( x == y ) return -1; // Do not perform union of same set if (rank[x] > rank[y]) {parent[y]=x; return x;} else { parent[x]=y; if (rank[x]==rank[y]) rank[y]++;return y;} } } c // Attach tree(y) to tree(x) // else // Attach tree(x) to tree(y) and if same depth, then increase depth of y by one // Attach tree(y) to tree(x) // else // Attach tree(x) to tree(y) and if same depth, then increase depth of y by one
7. 7. © 2011 Frank Nielsen ● Variable name aliases. • Pixels in a digital photo. • Computers in a network. • Web pages on the Internet. • Transistors in a computer chip. Many applications of the union-find data-structure
8. 8. © 2011 Frank Nielsen Yet another example of UF/segmentation: Inbetweening for cell animation http://www.vuse.vanderbilt.edu/~bobbyb/pubs/sca06.html
9. 9. © 2011 Frank Nielsen Minimum Spanning Tree (Kruskal's algorithm) http://en.wikipedia.org/wiki/Minimum_spanning_tree http://en.wikipedia.org/wiki/Kruskal's_algorithm Implemented using Union-Find data structure
10. 10. © 2011 Frank Nielsen Intensity=0.3red+0.59green+0.11blue Convolutions et filtres Color image Grey image
11. 11. © 2011 Frank Nielsen Image Convolution Roberts Cross (edge) detection Discrete gradient (maximal response for edge at 45 degrees) The two filters are 90 degrees apart (inner product is zero) Approximated by
12. 12. © 2011 Frank Nielsen Roberts Cross edge detector Approximated by Input Filter response (x5) Thresholded
13. 13. © 2011 Frank Nielsen Sobel edge detector Approximated by
14. 14. © 2011 Frank Nielsen Sobel Roberts Crossl http://homepages.inf.ed.ac.uk/rbf/HIPR2/sobeldemo.htm
15. 15. © 2011 Frank Nielsen Gaussian smoothing Normalize discrete Gaussian kernel to 1 Two parameters to tune: ● K, the dimension of the matric ● Sigma, the smoothing width...
16. 16. © 2011 Frank Nielsen Blurring, low-pass filter eliminates edges... Source Sigma=1, 5x5 Sigma=2, 9x9 Sigma=4, 15x15
17. 17. © 2011 Frank Nielsen Mean filter= Uniform average Source Corrupted, Gaussian noise (sigma=8) Mean filter 3x3
18. 18. © 2011 Frank Nielsen Corrupted, Gaussian noise (sigma=13) Mean filter= Uniform average Source Mean filter 3x3
19. 19. © 2011 Frank Nielsen Median filter Source Median filter 3x3Corrupted, Gaussian noise (sigma=8)
20. 20. © 2011 Frank Nielsen Sharpening: Identity+Laplacian kernel Source image
21. 21. © 2011 Frank Nielsen Bilateral filtering Traditional spatial gaussian filtering
22. 22. © 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...
23. 23. © 2011 Frank Nielsen * * * input output Same Gaussian kernel everywhere. Bilateral filtering Traditional spatial gaussian filtering
24. 24. © 2011 Frank Nielsen * * * input output The kernel shape depends on the image content. space weight not new range weight I new normalization factor new ( ) ( )∑∈ −−= S IIIGG W IBF q qqp p p qp |||||| 1 ][ rs σσ
25. 25. © 2011 Frank Nielsen Bilateral filtering l Example of Bilateral filtering l Low contrast texture has been removed ● Brute-force implementation is slow > 10min (but real-time with GPU and better algorithms)
26. 26. © 2011 Frank Nielsen Originimage Bilateral(3) Bilateral filtering
27. 27. © 2011 Frank Nielsen Results OriginImage Oneiteration fiveiterations Bootstrapping http://people.csail.mit.edu/sparis/siggraph07_course/
28. 28. © 2011 Frank Nielsen Bilateral mesh denoising Bilateral filtering extends to meshes Source
29. 29. © 2011 Frank Nielsen Harris-Stephens edge detector: Feature points Aim at finding good feature
30. 30. © 2011 Frank Nielsen Harris-Stephens edge detector Measure the corner response as Algorithm: – Find points with large corner response function R (R > threshold) – Take the points of local maxima of R
31. 31. © 2011 Frank Nielsen Harris-Stephens edge detector Corner response R
32. 32. © 2011 Frank Nielsen Thresholding R>cste Local maxima of R
33. 33. © 2011 Frank Nielsen Superposing local maxima on source images
34. 34. © 2011 Frank Nielsen Invariant to orientation but Depends on the scaling of the image