資源簡介
radon變換檢測圖像中的直線能夠通過掃描測量的平均值求整個衰減系數的分布
代碼片段和文件信息
rgb=imread(‘gantrycrane.png‘);
?i=rgb2gray(rgb);
?bw=edge(i‘sobel‘);
?figure(1)imshow(rgb);figure(2)imshow(i);figure(3)imshow(bw);
?theta_step=1;
?theta=0:theta_step:360;
?[rxp]=radon(bwtheta);
?figure(4)imagesc(thetaxpr);colormap(hot);
?xlabel(‘theta(degrees)‘);ylabel(‘x\prime‘);
title(‘r_{theta}(x\prime)‘);
colorbar;
?max_r=max(max(r));
threshold=0.75;
[IIJJ]=find(r>=(max_r*threshold));
[nd]=size(II);
figure(5
- 上一篇:合成記錄Matlab代碼
- 下一篇:水果智能分類系統模式識別
評論
共有 條評論