注册 登录
编程论坛 Matlab

根据下图怎么看出来hough变换的角度

wuyan850904 发布于 2008-10-24 18:31, 1281 次点击
通过以下代码得出了倾斜字体的hough变换,怎么看出来他的倾斜角度那?

f=imread('基线倾斜之前.jpg');
BW = edge(f,'sobel');
f=f(:,:,1)
BW = edge(f,'sobel');
figure(1),imshow(f)
figured(2),imshow(BW)
figure(2),imshow(BW)
F=double(f)
M=hough(F)
[G,theta,rho]=hough(F)
figure(3),imshow(theta,rho,G,[],'notruesize');
axis on,axis normal
xlabel('\theta'),ylabel('\rho')
0 回复
1