資源簡介
《數字圖像處理與機器視覺:Visual C++與Matlab實現》5
圖像分割,霍夫變換,Hough變換直線檢測的Matlab實現
代碼片段和文件信息
function?[Ibw?thres]?=?autoThreshold(I)
%?迭代法自動閾值分割
%
%?輸入:I?-?要進行自動閾值分割的灰度圖像
%?輸出:Ibw?-?分割后的二值圖像
%??????thres?-?自動分割采用的閾值
thres?=?0.5?*?(double(min(I(:)))?+?double(max(I(:))));?%初始閾值
done?=?false;?%結束標志
while?~done
g?=?I?>=?thres;
Tnext?=?0.5?*?(mean(I(g))?+?mean(I(~g)));
done?=?abs(thres?-?Tnext)?0.5;
thres?=?Tnext;
end;
Ibw?=?im2bw(I?thres/255);?%?二值化
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????78634??2009-08-18?12:54??chapter9\line.bmp
?????文件????????439??2009-08-16?11:57??chapter9\code\autoThreshold.m
?????文件???????1934??2009-08-16?14:04??chapter9\code\regionGrow.m
?????目錄??????????0??2010-04-21?19:39??chapter9\code
?????目錄??????????0??2010-04-21?19:39??chapter9
-----------?---------??----------?-----??----
????????????????81007????????????????????5
評論
共有 條評論