Presentation is loading. Please wait.

Presentation is loading. Please wait.

3-D Computer Vision CSc 83020 – Ioannis Stamos 3-D Computer Vision CSc 83020 Binary Images Horn (Robot Vision): pages 46-64.

Similar presentations


Presentation on theme: "3-D Computer Vision CSc 83020 – Ioannis Stamos 3-D Computer Vision CSc 83020 Binary Images Horn (Robot Vision): pages 46-64."— Presentation transcript:

1 3-D Computer Vision CSc 83020 – Ioannis Stamos 3-D Computer Vision CSc 83020 Binary Images Horn (Robot Vision): pages 46-64.

2 3-D Computer Vision CSc 83020 – Ioannis Stamos Binary Images Binary Image b(x,y): Obtained from Gray-Level (or other image) g(x,y) By Thresholding. Characteristic Function: 1 g(x,y) < T b(x,y)= 0 g(x,y) >= T 1)Geometrical Properties 2)Discrete Binary Images 3)Multiple objects 4)Sequential and Iterative Processing.

3 3-D Computer Vision CSc 83020 – Ioannis Stamos Selecting the Threshold (T) g(x,y) HISTOGRAM h(i) T i (intensity) BIMODAL b(x,y)

4 3-D Computer Vision CSc 83020 – Ioannis Stamos Histogram Thresholding T

5 3-D Computer Vision CSc 83020 – Ioannis Stamos Geometric Properties Assume: 1) b(x,y) is continuous 2) Only one object y x b(x,y)

6 3-D Computer Vision CSc 83020 – Ioannis Stamos Geometric Properties Assume: 1) b(x,y) is continuous 2) Only one object y x b(x,y) Area: (Zeroth Moment)

7 3-D Computer Vision CSc 83020 – Ioannis Stamos Geometric Properties Assume: 1) b(x,y) is continuous 2) Only one object y x b(x,y) Area: (Zeroth Moment) Position: “Center” (x,y) of Area (First Moment)

8 3-D Computer Vision CSc 83020 – Ioannis StamosOrientation Difficult to define! We use axis of least second moment (x,y) r ρ θ axis y x

9 3-D Computer Vision CSc 83020 – Ioannis StamosOrientation Difficult to define! We use axis of least second moment For mass distribution: Axis of minimum Inertia. (x,y) r ρ θ axis y x Minimize:

10 Orientation Difficult to define! We use axis of least second moment For mass distribution: Axis of minimum Inertia. (x,y) r ρ θ axis y x Minimize: Equation of Axis: y=mx+b ??? 0<= m <= infinity We use: ( ρ, θ) finite. Find ( ρ, θ) that minimize E for a given b(x,y)

11 3-D Computer Vision CSc 83020 – Ioannis Stamos We can show that: So:

12 3-D Computer Vision CSc 83020 – Ioannis Stamos We can show that: So: Using dE/dρ=0 we get:

13 3-D Computer Vision CSc 83020 – Ioannis Stamos We can show that: So: Using dE/dρ=0 we get: Note: Axis passes through center (x,y)!! So, change coordinates: x’=x-x, y’=y-y

14 3-D Computer Vision CSc 83020 – Ioannis Stamos We can show that: So: Using dE/dρ=0 we get: Note: Axis passes through center (x,y)!! So, change coordinates: x’=x-x, y’=y-y We get: Second Moments w.r.t. (x, y)

15 3-D Computer Vision CSc 83020 – Ioannis Stamos We can show that: So: Using dE/dρ=0 we get: Note: Axis passes through center (x,y)!! So, change coordinates: x’=x-x, y’=y-y We get: Second Moments w.r.t. (x, y) Mistake in your handout.

16 3-D Computer Vision CSc 83020 – Ioannis Stamos Using dE/dθ=0, we get: tan(2θ)=b/(a-c) 2θ b a-c

17 3-D Computer Vision CSc 83020 – Ioannis Stamos Using dE/dθ=0, we get: tan(2θ)=b/(a-c) So: 2θ b a-c

18 3-D Computer Vision CSc 83020 – Ioannis Stamos Using dE/dθ=0, we get: tan(2θ)=b/(a-c) So: Solutions with positive sign may be used to find θ that minimizes E (why??). Emin/Emax -> (ROUDNESS of the OBJECT). 2θ b a-c

19 3-D Computer Vision CSc 83020 – Ioannis Stamos Discrete Binary Images bij: value at pixel in row i & column j. 1 1 11111 11111 1111 1 O j (y) m i (x) n

20 3-D Computer Vision CSc 83020 – Ioannis Stamos Discrete Binary Images bij: value at pixel in row i & column j. Assume pixel area is 1. Area: Position (Center of Area): 1 1 11111 11111 1111 1 O j (y) m i (x) n

21 3-D Computer Vision CSc 83020 – Ioannis Stamos Discrete Binary Images bij: value at pixel in row i & column j. Assume pixel area is 1. Area: Position (Center of Area): 1 1 11111 11111 1111 1 O j (y) m i (x) n Second Moments.

22 3-D Computer Vision CSc 83020 – Ioannis Stamos Discrete Binary Images (cont) Note: a’,b’,c’ are second moments w.r.t ORIGIN a,b,c (w.r.t “center”) can be found from (a’,b’,c’,x,y,A). Note: UPDATE (a’,b’,c’,x,y,A) during RASTER SCAN.

23 3-D Computer Vision CSc 83020 – Ioannis Stamos Multiple Objects Need to SEGMENT image into separate COMPONENTS (regions). Connected Component: Maximal Set of Connected Points: B A Points A and B are connected: Path exists between A and B along which b(x,y) is constant.

24 3-D Computer Vision CSc 83020 – Ioannis Stamos Connected Components Label all pixels that are connected 4-way connected8-way connected

25 3-D Computer Vision CSc 83020 – Ioannis Stamos Region Growing Algorithm (Connected Component Labeling)  Start with “seed” point where bij=1.  Assign LABEL to seed point.  Assign SAME LABEL to its NEIGHBORS (b=1).  Assign SAME LABEL to NEIGHBORS of NEIGHBORS. Terminates when a component is completely labeled. Then pick another UNLABELED seed point.

26 3-D Computer Vision CSc 83020 – Ioannis Stamos What do we mean by NEIGHBORS? Connectedness 4-Connectedness (4-c) 8-Connectedness (8-c) Neither is perfect!

27 3-D Computer Vision CSc 83020 – Ioannis Stamos What do we mean by NEIGHBORS? Jordan’s Curve Theorem: Closed curve -> 2 connected regions 010 1 1 10 00 B1O1B1 O2 O4 O3B2 B1 (4-c) Hole without closed curve!

28 What do we mean by NEIGHBORS? Jordan’s Curve Theorem: Closed curve -> 2 connected regions 010 1 1 10 00 B1O1B1 O2 O4 O3B2 B1 BOB O O OB BB (4-c) Hole without closed curve! (8-c) Connected background with closed ring!

29 3-D Computer Vision CSc 83020 – Ioannis Stamos Solution: Introduce Assymetry Use: or 010 1 1 10 00 BO1B O2 O1B BB (a)(b) Using (a) Two separate line segments. Hexagonal Tesselation Above assymetry makes SQUARE grid like HEXAGONAL grid.

30 3-D Computer Vision CSc 83020 – Ioannis Stamos Sequential Labeling Algorithm A BD C Raster Scan Note: B,C,D are already labeled

31 3-D Computer Vision CSc 83020 – Ioannis Stamos Sequential Labeling Algorithm A BD C Raster Scan Note: B,C,D are already labeled 0 XX X a. Label(A) = background 1 XD X b. Label(A) = label(D)

32 3-D Computer Vision CSc 83020 – Ioannis Stamos Sequential Labeling Algorithm A BD C Raster Scan Note: B,C,D are already labeled 1 00 C c. Label(A) = label(C) 1 B0 0 d. Label(A) = label(B) 1 B0 C d. If Label(B) = label(C ), then Label(A)=Label(B)= Label(C)

33 3-D Computer Vision CSc 83020 – Ioannis Stamos Sequential Labeling Algorithm A BD C Raster Scan Note: B,C,D are already labeled 0 XX X a. Label(A) = background 1 XD X b. Label(A) = label(D) 1 00 C c. Label(A) = label(C) 1 B0 0 d. Label(A) = label(B) 1 B0 C d. If Label(B) = label(C ), then Label(A)=Label(B)= Label(C)

34 3-D Computer Vision CSc 83020 – Ioannis Stamos Sequential Labeling (Cont.) What if B & C are labeled but label(B) label(C) ?

35 3-D Computer Vision CSc 83020 – Ioannis Stamos Sequential Labeling (Cont.) What if B & C are labeled but label(B) label(C) ? 222 222222 2 22222 2222222222222 2 111 111 111111 111 111 111111 1 1 1 1 1 1 11 11 111 ?

36 3-D Computer Vision CSc 83020 – Ioannis Stamos Sequential Labeling (Cont.) Solution: Let: Label(A)=Label(B) =2 & create an EQUIVALENCE TABLE. Resolve Equivalences in SECOND PASS. 73,6,4 21 …


Download ppt "3-D Computer Vision CSc 83020 – Ioannis Stamos 3-D Computer Vision CSc 83020 Binary Images Horn (Robot Vision): pages 46-64."

Similar presentations


Ads by Google