資源簡介
國外網上找的自適應閾值分割的源程序,測試過,好用。 可以下載
代碼片段和文件信息
function?f_threshold(file_name)
%?Evan?Ruzanski?and?Chiou-Wei?Tsai
%?UCSB?11/3/2003
clc
%?Initialize?variables
thresh?=?77;
gray_range?=?256;
%?Read?and?display?test?image?as?given?in?Lee?p.?712
im?=?imread(file_name);
figure
imshow(im);?title(‘Original?2D?image‘);
%?Perform?binary?spatial?lifting
s?=?size(im);
imz(1:s(1)1:s(2)1:gray_range)?=?0;?
im?=?double(im);?%?Typecast?for?arithmetic?operations
for?i?=?1:s(1)
????for?j?=?1:s(2)
????????if?im(ij)?>?1
????????????imz(ij1:im(ij))?=?1;?%?Make?3rd?Dim?binary
????????end
????end
end
%?3D?representation?of?lifting?the?image
figure(2)
x?=?1:s(1);
y?=?1:s(2);
[XY]?=?meshgrid(xy);
colormap(gray)
rotate3d
mesh(XYim);?axis?tight
title(‘Lifted?representation?of?2D?image‘)
%?Take?3D?FFT?o
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3072??2003-10-30?13:05??f_threshold\278Aprojectimage.jpg
?????文件???????1212??2004-12-14?01:47??f_threshold\f_threshold.m
?????目錄??????????0??2008-06-12?17:24??f_threshold
-----------?---------??----------?-----??----
?????????????????4284????????????????????3
- 上一篇:rfc2544中文翻譯
- 下一篇:基于動態逆的自動駕駛儀
評論
共有 條評論