Title: Image Processing and Computer Vision
1Image Processing and Computer Vision
- Edge Detection
- Generalized Hough Transform
2Edge Detection
Contour edge
- Edge ?? 2 ????
- Contour edge
- Texture edge
Texture edge
3Edge Detection
- ???????? Edge ????????????? pixel ?????????????
?????????????????????? intensity ??? ? ???? ???
0-255 ??????? 255-0
4Edge Filter (Robert Operator)
5Example (Robert operator)
Gx
Gray scale Image
Gy
G
6Edge Filter (Prewitt Operator)
7Edge Filter (Sobel Operator)
8Edge Filter (Canny Operator)
- d. Canny operator
- Ii,j image
- Convolution image by Gaussian Filter we will
get - Si,j Gi,j ? Ii,j
- ? spread of gaussian (??????????????? gaussian
filter) - ?????????? filter ???????
- Pi,j (Si,j1 Si,j Si1,j1
Si1,j) / 2 - Qi,j (Si,j Si1,j Si,j1
Si1,j1) /2
9Edge Filter (Canny Operator)
- -Edge pixel
- Mi,j ? Pi,j2 Qi,j2
- - Each ? in edge pixel
- ?i,j arctan(Qi,j, Pi,j)
10Sample Image
11Generalized Hough Transform
- ?????????????????? ? ?? ???????????????? (Target
Image) - ?????????????? 2 ???????? ? ???
- ??????????????????????? ? ??? Template
shape??????? - ????????????????? (shape) ????????????????(Target
image)
12Learn Shape
- ?????????? Shape ?????????? Template ??????????
- ?????????????????????????????????
- ?????? pixel ??????? edge ??????
- ???????????????????????? ????????????
- ??????? ? ??????
- ? ????????????????? X
- ? ??? gradient ??????????????
- edge detector
- r ????????????????????????????
- ???????????
-
13GHT R-Table
????? R-Table ?????? ??????????????????? ?
14Search for Shapes
Target Image
15Search for Shape
- Algorithm ?????? search ?????????????(Target)
- 1. ?????????? ?????????????????
??????????????? ? (gradient direction) - ???
- 2. ????????? ? edge pixel ?????? ? ???????????? 1
?????????????????? - ? ??? r ?????????????? R-Table
- 3. ???????????? ? ??? r ???????????????????
R-Table ??? ? ???? ???????? - ????????? ? ??? r ??????
- xc x rcos(?)
- yc y rsin(?)
- 4. ????? Vote xc ??? yc ????????????????????
Maximum vote - ??? xc ??? yc ????????????????????????????????
????????????? template - ????????? target
16Search for Shapes
17Case when Image Scale or Rotate
Scale factor S Rotation factor ? ??????????
Array ???? 4 ???? ???????????????? Vote ??????
Arrayxc, yc, S, ? ??????? S
???????????????? 0.1, 0.2, 0.3, 0.4, 0.5,
0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3,
1.4, 1.5 ??????? R ??????????????? 0-359
18Case when Image Scale or Rotate
- ????????????????? Scale ??? Rotation
??????????????????????????????????????????????????
???????? ??????
xc x rcos(?) yc y rsin(?)
xc x r S cos(? ?) yc y r S
sin(? ?)
19Case when Image Scale or Rotate
- Algorithm
- 1. For each (?, r) from R-Table
- For each S 0.3 to 1.5
- For each ? 0 to 359 find
-
- Arrayxc, yc, S, ?
- Look for Maximum vote in 4-D Array
-
xc x r S cos(? ?) yc y r S
sin(? ?)
20Example
21Example
22Example
23(No Transcript)
24Example