GeneralizedHough

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Generalized Hough Transform (GHT)

(Ballard and Brown, section 4.3.4, Sonka et al., section 5.2.6)

-The Hough transform was initially developed to detect analytically defined shapes (e.g., lines, circles, ellipses etc.).

-The generalized Hough transform can be used to detect arbitrary shapes (i.e., shapes having no simple analytical form).

-It requires the complete specification of the exact shape of the target object.•

Special case: fixed orientation and size

y

x =x c +x ′or x c =x −x ′y =y c +y ′or y c =y −y ′

cos (π−α)=y ′r or y ′=rcos (π−α)=−rsin (α)sin (π−α)=x ′r

or x ′=rsin (π−α)=−rcos (α)

-Combining the above equations we have:

x c=x+rcos(α)

y c=y+rsin(α)

Preprocessing step

(1) Pick a reference point (e.g.,(x c,y c))

(2) Draw a line from the reference point to the boundary.

(3) Computeφ(i.e., perpendicular to gradient’s direction).

(4) Store the reference point(x c,y c)as a function ofφ(i.e., build the R-table)

φ1:(r11,α11),(r12,α12),...

φ2:(r21,α21),(r22,α22),...

φn:(r n1,αn1),(r n2,αn2),...

-The R-table allows us to use the contour edge points and gradient angle to recompute the location of the reference point.

Note:we need to build a separate R-table for each different object.

Detection

(1) Quantize the parameter space:

P[x c

min (x)

c max

][y c

min

...y

c max

]

(2) for each edge point(x,y)

(2.1) Using the gradient angleφ,retrieve from the R-table all the (α,r)values

indexed underφ.

(2.2) For each (α,r), compute the candidate reference points:

x c=x+rcos(α)

y c=y+rsin(α)

(2.3) Increase counters (voting):

++(P[x c][y c])

(3) Possible locations of the object contour are given by local maxima in P[x c][y c]

-If P[x c][y c]>T,then the object contour is located at x c,y c)

•General case

-Suppose the object has undergone some rotationθand uniform scaling s:

(x′,y′)−−>(x′′,y′′)

x′′ =(x′cos(θ)−y′sin(θ))s

y′′ =(x′sin(θ)+y′cos(θ))s

-Replacing x′by x′′and y′by y′′we have:

x c=x−x′′or x c=x−(x′cos(θ)−y′sin(θ))s

y c=y−y′′or y c=y−(x′sin(θ)+y′cos(θ))s

(1) Quantize the parameter space:

P[x c

min (x)

c max

][y c

min

...y

c max

][θmin...θmax][s min...s max]

(2) for each edge point(x,y)

(2.1) Using its gradient angleφ,retrieve all the (α,r)values from the R-table

(2.2) For each (α,r), compute the candidate reference points:

x′=rcos(α)

y′=rsin(α)

for(θ=θmin;θ≤θmax;θ++)

for(s=s min;s≤s max;s++)

x c=x−(x′cos(θ)−y′sin(θ))s

y c=y−(x′sin(θ)+y′cos(θ))s

++(P[x c][y c][θ][s]);

(3) Possible locations of the object contour are given by local maxima in P[x c][y c][θ][s]

-If P[x c][y c][θ][s]>T,then the object contour is located at x c,y c),has under-gone a rotationθ,and has been scaled by s.

相关文档
最新文档