91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

包含二值化、canny算子邊緣檢測、感興趣區域提取、自動多閾值分割等程序,及分水嶺分割和連通域字符識別兩篇文章。

資源截圖

代碼片段和文件信息

%?Canny邊緣檢測的函數
%?Input:
%???a:?input?image
%???sigma:?Gaussian的均方差
function?e=canny_edge(asigma)

a?=?double(a);?????%?將圖像像素數據轉換為double類型
[mn]?=?size(a)
e?=?repmat(logical(uint8(0))mn);??%?生成初始矩陣

?GaussianDieOff?=?.0001;??
??PercentOfPixelsNotEdges?=?.7;?%?Used?for?selecting?thresholds
??ThresholdRatio?=?.4;??????????%?Low?thresh?is?this?fraction?of?the?high.
??
??%?Design?the?filters?-?a?gaussian?and?its?derivative
??
??pw?=?1:30;?%?possible?widths
??ssq?=?sigma^2;
??width?=?find(exp(-(pw.*pw)/(2*ssq))>GaussianDieOff1‘last‘);
??if?isempty(width)
????width?=?1;??%?the?user?entered?a?really?small?sigma
??end

??t?=?(-width:width);
??gau?=?exp(-(t.*t)/(2*ssq))/(2*pi*ssq);?????%?the?gaussian?1D?filter

??%?Find?the?directional?derivative?of?2D?Gaussian?(along?X-axis)
??%?Since?the?result?is?symmetric?along?X?we?can?get?the?derivative?along
??%?Y-axis?simply?by?transposing?the?result?for?X?direction.
??[xy]=meshgrid(-width:width-width:width);
??dgau2D=-x.*exp(-(x.*x+y.*y)/(2*ssq))/(pi*ssq);
??
??%?Convolve?the?filters?with?the?image?in?each?direction
??%?The?canny?edge?detector?first?requires?convolution?with
??%?2D?gaussian?and?then?with?the?derivitave?of?a?gaussian.
??%?Since?gaussian?filter?is?separable?for?smoothing?we?can?use?
??%?two?1D?convolutions?in?order?to?achieve?the?effect?of?convolving
??%?with?2D?Gaussian.??We?convolve?along?rows?and?then?columns.

??%smooth?the?image?out
??aSmooth=imfilter(agau‘conv‘‘replicate‘);???%?run?the?filter?accross?rows
??aSmooth=imfilter(aSmoothgau‘‘conv‘‘replicate‘);?%?and?then?accross?columns
??
??%apply?directional?derivatives
??ax?=?imfilter(aSmooth?dgau2D?‘conv‘‘replicate‘);
??ay?=?imfilter(aSmooth?dgau2D‘?‘conv‘‘replicate‘);
mag?=?sqrt((ax.*ax)+(ay.*ay));??%?每個像素點的梯度強度

magmax?=?max(mag(:));
if?magmax>0
????mag?=?mag/magmax;??%?歸一化
end

%[countsx]?=?imhist(mag64);????%?直方圖統計
%high?=?min(find(cumsum(counts)>Perc*m*n))/64;
%low?=?Th*high;
high=0.1;
low=0.04;

thresh?=?[low?high];???%?根據直方圖統計確定上下限

%?Nonmax-suppression
idxStrong?=?[];
for?dir?=?1:4
????Localmax?=?Findlocalmax(diraxaymag);
????idxWeak?=?Localmax(mag(Localmax)>low);
????e(idxWeak)?=?1;
????idxStrong?=?[idxStrong;?idxWeak(mag(idxWeak)>high)];
end

rstrong?=?rem(idxStrong-1m)+1;
cstrong?=?floor((idxStrong-1)/m)+1;
e?=?bwselect(ecstrongrstrong8);??%??
e?=?bwmorph(e‘thin‘1);???%?使用形態學的方法把邊緣變細

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-05-22?10:22??DIP\canny\
?????文件????????2517??2013-05-22?10:21??DIP\canny\canny_edge.m
?????文件??????361879??2003-06-28?23:55??DIP\canny\Fig1006(a)(building).tif
?????文件????????1339??2008-12-12?16:17??DIP\canny\Findlocalmax.m
?????文件?????????195??2013-05-22?10:22??DIP\canny\seg_canny_edge.m
?????目錄???????????0??2013-05-22?10:59??DIP\ROI\
?????文件??????371691??2013-05-22?10:27??DIP\ROI\ID2.jpg
?????文件?????????789??2009-07-12?20:28??DIP\ROI\iteration.m
?????文件??????786488??2013-04-12?10:59??DIP\ROI\Lena.bmp
?????文件????????1074??2013-05-22?10:59??DIP\ROI\mca.jpg
?????文件????????1339??2013-05-22?10:59??DIP\ROI\mcaa.m
?????文件?????????931??2009-07-12?20:26??DIP\ROI\zbthresh.m
?????文件?????5056124??2011-03-27?18:02??DIP\標記分水嶺分割算法.pdf
?????目錄???????????0??2013-05-22?17:00??DIP\二值化\
?????文件?????????643??2013-05-22?17:00??DIP\二值化\erzhihua.m
?????文件????????1183??2013-05-22?16:59??DIP\二值化\imagebw.m
?????文件?????????572??2013-05-22?17:00??DIP\二值化\mainx.m
?????目錄???????????0??2011-12-30?13:58??DIP\感興趣區域提取\
?????文件????????3121??2011-12-30?13:59??DIP\感興趣區域提取\a.m
?????文件???????11501??2011-12-30?13:55??DIP\感興趣區域提取\go.asv
?????文件????????9803??2012-05-30?20:10??DIP\感興趣區域提取\go.fig
?????文件???????11510??2013-05-22?10:49??DIP\感興趣區域提取\go.m
?????目錄???????????0??2011-12-30?13:58??DIP\感興趣區域提取\imag\
?????文件???????17147??2011-12-20?21:26??DIP\感興趣區域提取\imag\213.jpg
?????文件???????16560??2011-12-20?21:26??DIP\感興趣區域提取\imag\220.jpg
?????文件???????21274??2011-12-20?21:26??DIP\感興趣區域提取\imag\242.jpg
?????文件????????9144??2011-11-20?22:53??DIP\感興趣區域提取\imag\b.jpg
?????文件???????33500??2011-11-20?22:54??DIP\感興趣區域提取\imag\c.jpg
?????文件???????94577??2011-11-20?22:53??DIP\感興趣區域提取\imag\d.jpg
?????文件???????23930??2011-11-20?22:55??DIP\感興趣區域提取\imag\e.jpg
?????文件????????1446??2011-12-30?13:55??DIP\感興趣區域提取\loadimage.asv
............此處省略9個文件信息

評論

共有 條評論