edge detection, multi-scale edge detection, sometimes hard for humans
2. Hough Transform for Line Detection
Edges need not be connected, need not visible
Edges VOTE for the possible models
Image and Parameter Space
y = mx + b -> parameter space: b = -mx + y
각 점(1,1),...을 지날 수 있는 모든 직선의 기울기 m과 y절편 b를 나타내는 직선이 그려짐
교점 좌표는 두 점을 동시에 지나는 유일한 직선의 (기울기 m, y절편 b)를 의미
parameter space의 직선들이 많이 교차되는 지점으로 직선 검출 가능
Algorithm
직선들이 많이 교차하는 점을 찾기 위해 축적 배열 A 사용
0으로 초기화된 2차원 배열에서 직선이 지나가는 위치의 배열 원소 값을 1씩 증가시켜 생성
일정 임계값 이상인 점의 m,c(기울기, y절편)로 직선 검출
Quantize parameter space (m,c)
Create accumulator array A(m,c) 축적자
Set A(m,c) = 0 ∀m,c
for each image edge (xi,yi) 증가
A(m,c) = A(m,c) + 1 if (m,c) on the line c=−xim+yi
find local maxima in A(m,c)
Better Parameterization −∞≤m≤∞
-> improvement: finite accumulator size
극좌표계의 직선 방정식 사용
Line equation: ρ=xcosθ+ysinθrho: perpendicular distance to line from origin 수직 거리 where0≤θ≤2π,0≤ρ≤ρmax image space is limited
Given a point (xi,yi),ρ=xicosθ+yisinθ
image space -> parameter space, ρ,θ의 공간으로 변환
곡선들이 많이 교차되는 점을 축적 배열로 찾음, 직선 검출
Image and Parameter Space
Mechanics of the Hough Transform
line 수: Hough array의 peak 세기, 인접한 피크는 하나로 취급
line에 속한 points: line에 가까운 points 찾기
Quantization error- cell 크기:
too big: 다른 line을 합침
too small: line 못 찾음, large vote가 없음
difficulties of noise
noise 크면, fewer votes land in the single bin, false peaks
clutter: 혼란
3. Hough Transform for Circle Detection
Imae and Parameter Space
radius is unknown
surface of a cone
use Accumulator array A(a,b,r)
save computation: Gradient information
assume radius is known- increment only one point in accumulator
Finding Coins
Pennie 주황 동전, quarter 나머지 동전 size: 27, 34.5 pixels
Pennie Hough detector, Quarter Hough detector
4. Generalized Hough Transform
Model Shape NOT described by equation, Silhouette only
Goal: Find the object center (x0,y0)
1. Pick a reference point (xc.yc)
2. For each point (xi.yi) obtain (ri,αi,ϕi) ri: a vector form from boundary point to reference ri=(ri,αi) ϕi: gradient orientation 방향
Finding object center (x0,y0) given edges (xi,yi,ϕi)
Initialize Accumulator Array A(xc,yc)for∀(xc,yc)
For each edge point (xi,yi,ϕi), compute: xc=xi+rkicosαki yc=xi+rkisinαki
increment accumulator: A(xc,yc)=A(xc,yc)+1
Find local maxima in A(xc,yc)
Comments
good:Deals with occlusion well 폐색
Detects multiple instances
Robust to noise
Bad: Bad computational complexity
Difficult to set parameters