PCD PHASE CODED DISK for centre-line detection in images
Im trying to find an implementation of "A PHASE CODED DISK APPROACH TO THICK CURVILINEAR LINE DETECTION". How is this implemented?
A convolution approach is used to calculate a HOUGH-like transform similar to that proposed by ATHERTON AND KER- BYSON [4] for circle parameter estimation and extended and ana- lyzed by ZELNIKER AND CLARKSON [10]. This will take the form of Q(x, y) = f (x, y) ⊗ OPCD(x, y), (2) where Q is the resultant, ⊗ is convolution and OPCD is the phase- coded disk.The PCD that we propose is OPCD(x, y) = e j γ(x,y), (3) where γ(x, y) = 2 tan−1(y, x) (4) and tan−1(·, ·) is the four-quadrant arctangent function.
I've the following code, but it doesn't work
function PCD(x, y)
g = 2 * atan(y, x)
O_PCD = exp(im * 2 * g)
return O_PCD
end
i,j=size(mat)
r_pcd=zeros(i,j)
for i1 in 1:i
for j1 in 1:j
r_pcd[i, j] = bw_road[i, j] .* PCD(i, j)
end
end
where mat 开发者_如何转开发is e.g.
mat=vcat(zeros(10,10),ones(3,10))
精彩评论