freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內容

圖像邊緣提取算法源程序-文庫吧資料

2025-07-13 13:35本頁面
  

【正文】 lt_log + Gray_M。 endend % edge detection process result_log = conv2(delta_LOG, Gray_M)。 delta_LOG(i,j)=(exp(m_A/(2*sigma_log^2)))*(m_A2*sigma_log^2)。 delta_LOG = zeros(5,5)。[height width] = size(Gray_M)。MarrHildrech的LOG邊緣檢測算法:(1) 對圖像先進行高斯低通濾波,再進行Laplace算子運算;(2) 保留一階導數峰值的位置記錄,然后從中尋找Laplace跨零點;(3) 采用插值方法對零點進行估計。即使是二階微分算子也不能克服噪聲干擾。 end end endend edgeSeO=edgeimage。amp。amp。(edgeXY(i+1,j)edgeXY(i1,j)2*th)) edgeimage(i,j)=1。(edgeXY(i+1,j)0)amp。 end if((edgeXY(i1,j)0)amp。amp。amp。(edgeXY(i,j+1)edgeXY(i,j1)2*th)) edgeimage(i,j)=1。(edgeXY(i,j+1)0)amp。 end elseif(abs(edgeXY(i,j))2) if((edgeXY(i,j1)0)amp。amp。(edgeXY(i1,j)edgeXY(i,j)th)) edgeimage(i,j)=1。 end if((edgeXY(i1,j)0)amp。amp。(edgeXY(i,j1)edgeXY(i,j)th)) edgeimage(i,j)=1。 %edge detecting by zerocrossingfor i = 2:xlen1 for j = 2:ylen1 if(edgeXY(i,j)0) if((edgeXY(i,j1)0)amp。 counter=counter+1。counter=0。 (updateY=ylen)) edgeXY(i,j) = edgeXY(i,j) + H(m,n)*oimage(updateX,updateY)。 (updateY=1) amp。 (updateX=xlen) amp。 if ((updateX=1) amp。 for i = 1:xlen for j = 1:ylen for m = 1:3 for n = 1:3 updateX = im+2。1,8,1。 edgeimage=zeros(xlen,ylen)。 [xlen ylen] = size(oimage)。當然實踐中可以通過模板來實現,本程序采用如下模板:跨零點難得直接出現在某個像素上,往往需要進行插值等手段進行估計,文獻“HUERTAS and MEDIONI, Detection of Intensity Changes with Subpixel Accuracy Using LaplacianGaussian Masks,1986”給出一種很好的估計方法,本程序采用定義的方法去檢測跨零點。二階微分算子采用一階微分算子很難找到一個一致的閾值選擇辦法,保證檢測出的圖像有相對均勻的寬度,克服這個障礙的辦法是改用二階微分算子進行邊緣檢測定位。(edgeRobinson(i,j)200) edgeRobinsonimage(i,j) = 255。(edgeRobinson(i,j)edgeRobinson(i1,j1))amp。 elseif (d(i,j)==8)amp。amp。amp。(edgeRobinson(i,j)200) edgeRobinsonimage(i,j) = 255。(edgeRobinson(i,j)edgeRobinson(i+1,j1))amp。 elseif (d(i,j)==6)amp。amp。amp。(edgeRobinson(i,j)200) edgeRobinsonimage(i,j) = 255。(edgeRobinson(i,j)edgeRobinson(i+1,j+1))amp。 elseif (d(i,j)==4)amp。amp。amp。(edgeRobinson(i,j)200) edgeRobinsonimage(i,j) = 255。(edgeRobinson(i,j)edgeRobinson(i1,j+1))amp。 elseif (d(i,j)==2)amp。amp。amp。 %save the maximum d(i,j)=c。 [m c]=max(R)。 %Weast R(8) = oimage(i,j1)oimage(i+1,j)+oimage(i1,j)oimage(i,j+1)... +oimage(i1,j1)oimage(i+1,j+1)+oimage(i1,j1)oimage(i+1,j+1)。 %South R(6) = oimage(i,j1)oimage(i1,j)oimage(i,j+1)+oimage(i+1,j)... +oimage(i1,j+1)oimage(i+1,j1)+oimage(i1,j+1)oimage(i+1,j1)。 %East R(4) = oimage(i,j+1)oimage(i1,j)+oimage(i+1,j)oimage(i,j1)... +oimage(i+1,j+1)oimage(i1,j1)+oimage(i+1,j+1)oimage(i1,j1)。 %North R(2) = oimage(i1,j)+oimage(i,j+1)oimage(i+1,j)oimage(i,j1)... +oimage(i1,j+1)oimage(i+1,j1)+oimage(i1,j+1)oimage(i+1,j1)。 %direction of the conresponding points %process the oringin image with the operatorR = zeros(4,1)。 edgeRobinsonimage = zeros(xlen,ylen)。[xlen ylen] = size(oimage)。在本程序中為了比較數值(而不是絕對值,這樣更好地體現方向性)的大小,仍計算8個。 end endendedgeK=edgeimage。amp。amp。(edge(i,j)threshold) edgeimage(i,j) = 255。(edge(i,j)edge(i,j1))amp。 elseif (d(i,j)==7)amp。amp。amp。(edge(i,j)threshold) edgeimage(i,j) = 255。(edge(i,j)edge(i+1,j))amp。 elseif (d(i,j)==5)amp。amp。amp。(edge(i,j)threshold) edgeimage(i,j) = 255。(edge(i,j)edge(i,j+1))amp。 elseif (d(i,j)==3)amp。amp。amp。(edge(i,j)threshold) edgeimage(i,j) = 255。(edge(i,j)edge(i1,j))amp。 %edge detecting for i = 2:xlen1 for j = 2:ylen1 if (d(i,j)==1)amp。 counter=counter+1。counter=0。 %save the maximum d(i,j)=c。 [m c]=max(f)。 %NorthWest for m = 1:8 t(m) = tempK(m)。 %Southweast K(7) = oimage(i+1,j1)+oimage(i,j1)+oimage(i1,j1)。 %Southeast K(5) = oimage(i+1,j+1)+oimage(i+1,j)+oimage(i+1,j1)。 %Northeast K(3) = oimage(i1,j+1)+oimage(i,j+1)+oimage(i+1,j+1)。 K(1) = oimage(i1,j1)+oimage(i1,j)+oimage(i1,j+1)。f = zeros(8,1)。 %direction of the conresponding points %define three voriables to puter fastK = zeros(8,1)。 %read the sizeedge = zeros(xlen,ylen)。實際上可采用以下快速算法:具體程序如下:%filename:%Useage:edge detecting by the Kirsch operator%Writer: Subailong function edgeK=Kirsch(oimage)。 end endend edgeP=edgeimage。amp。amp。amp。edgeX(i,j)threshold) edgeimage(i,j) = 1。edgeX(i,j)edgeX(i,j1)amp。edgeX(i,j)edgeX(i,j+1)amp。 %edge detectingfor i = 2:xlen1 for j = 2:ylen1 if (d(i,j)==1amp。 counter=counter+1。counter=0。%threshold = 4*sum(sum(edgeXY(2:xlen1,2:ylen1)))/((xlen
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1