資源簡(jiǎn)介
matlab實(shí)現(xiàn)邊緣檢測(cè)以及hough實(shí)現(xiàn)邊緣檢測(cè)
代碼片段和文件信息
function?[Ibw?thres]?=?autoThreshold(I);
%?迭代法自動(dòng)閾值分割
%
%?輸入:I?-?要進(jìn)行自動(dòng)閾值分割的灰度圖像
%?輸出:Ibw?-?分割后的二值圖像
%??????thres?-?自動(dòng)分割采用的閾值
I?=?imread(‘C:\Users\MXL\Desktop\The?Third?Year\be?a?doer\image\_img\00000165_001.png‘);
thres?=?0.5?*?(double(min(I(:)))?+?double(max(I(:))));?%初始閾值
done?=?false;?%結(jié)束標(biāo)志
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);?%?二值化
imshow(Ibw)
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????目錄???????????0??2010-07-26?21:18??邊緣檢測(cè)和hough?變換實(shí)現(xiàn)邊緣檢測(cè)MATLAB\
?????目錄???????????0??2018-10-03?20:42??邊緣檢測(cè)和hough?變換實(shí)現(xiàn)邊緣檢測(cè)MATLAB\code\
?????文件?????????543??2018-09-28?16:45??邊緣檢測(cè)和hough?變換實(shí)現(xiàn)邊緣檢測(cè)MATLAB\code\autoThreshold.m
?????文件????????1991??2018-09-28?18:49??邊緣檢測(cè)和hough?變換實(shí)現(xiàn)邊緣檢測(cè)MATLAB\code\regionGrow.m
?????文件???????78634??2009-08-18?12:54??邊緣檢測(cè)和hough?變換實(shí)現(xiàn)邊緣檢測(cè)MATLAB\line.bmp
- 上一篇:隱馬爾可夫模型源代碼(matlab)
- 下一篇:圖像測(cè)距代碼
評(píng)論
共有 條評(píng)論