mem380_04

# mem380_04 - 1 MEM380 Fundamental Robotics II Winter 2010...

This preview shows pages 1–4. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 MEM380 Fundamental Robotics II Winter 2010 Physics of Color MEM380: Fundamental Robotics I Fal 2009 1 Physics of Color and Color Calibration Connected Components Labeling Segmentation 1 2 6 5 4 3 7 8 9? 10? Recursive Labeling Algorithm Let I denote the image. Step 1: Convert I to B , Step 2: Let B’ = - B , label = 0 1. for i = 1:rows 2. for j = 1:columns 3. if B’(i,j) == -1 4. label = label + 1; 5. Add (i,j) onto Stack and set B’(i,j) = label; 6. 7. while (Stack is not empty) 8. Remove pixel P from Stack 9. Let M = neighbors of P whose pixel value = -1; 10. Add M onto Stack; 11. Set B’(M) = label; 12. end 13. end 14. end Algorithm Pictorially 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1-1 -1-1 -1-1 -1 -1 -1-1 -1-1 -1 -1 -1-1-1 -1-1 -1 1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1-1 (2,3) (3,3) (3,2) (3,1) 2 Recursive Labeling Algorithm Let I denote the image. Step 1: Convert I to B , Step 2: Let B’ = - B , label = 0 1. for i = 1:rows 2. for j = 1:columns 3. if B’(i,j) == -1 4. label = label + 1; 5. Add (i,j) onto Stack and set B’(i,j) = label; 6. 7. while (Stack is not empty) 8. Remove pixel P from Stack 9. Let M = neighbors of P whose pixel value = -1; 10. Add M onto Stack; 11. Set B’(M) = label; 12. end 13. end 14. end Result 1 1 2 2 1 1 1 1 2 2 1 1 1 1 2 1 1 1 1 2 1 1 2 2 Morphological Operators Structuring Elements ( S ) BOX(3,5) DISK(5) Basic Operators Translation X t of a set of pixels by a position vector t is given by X t = {x+t | x ∈ X} RING(5) Morphological Operators Dilation: Minkowski addition 1 1 1 1 1 1 1 1 1 3 Morphological Operators Erosion: 1 1 1 1 1 1 1 1 1 Morphological Operators Opening: Morphological Operators Closing: Region Properties Area – Total # of pixels in the region of interest Centroid Perimeter Circularity...
View Full Document

{[ snackBarMessage ]}

### Page1 / 16

mem380_04 - 1 MEM380 Fundamental Robotics II Winter 2010...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online