• lockingtang
    了解作者
  • matlab
    开发工具
  • 12KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 4
    下载次数
  • 2010-01-18 11:20
    上传日期
数字图像处理中的用小波进行图像边缘检测!希望对大家有用matlab
edgedetect.rar
  • 基于小波变换的边缘检测MATLAB程序
  • 基于小波变换的边缘检测MATLAB程序.docx
    14.9KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/622bb70e15da9b288bd9cf8e/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/622bb70e15da9b288bd9cf8e/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">clear all; </div><div class="t m0 x1 h3 y3 ff1 fs0 fc0 sc0 ls0 ws0">load wbarb; </div><div class="t m0 x1 h4 y4 ff1 fs0 fc0 sc0 ls0 ws0">I = ind2gray(X,map);<span class="fc1">%<span class="ff2">&#26816;&#32034;&#22270;&#36716;&#25104;&#28784;&#24230;&#22270; </span></span></div><div class="t m0 x1 h3 y5 ff1 fs0 fc0 sc0 ls0 ws0">imshow(I); </div><div class="t m0 x1 h4 y6 ff1 fs0 fc0 sc0 ls0 ws0">I1 = imadjust(I,stretchlim(I),[0,1]);<span class="fc1">%<span class="_ _0"></span><span class="ff2">&#35843;&#25972;&#22270;&#20687;&#30340;&#20687;&#32032;&#20540;&#65292;&#21487;&#20197;&#25913;&#21464;&#23545;&#27604;&#24230;&#21644;&#39068;&#33394; </span></span></div><div class="t m0 x1 h3 y7 ff1 fs0 fc0 sc0 ls0 ws0">figure; </div><div class="t m0 x1 h3 y8 ff1 fs0 fc0 sc0 ls0 ws0">imshow(I1); </div><div class="t m0 x1 h3 y9 ff1 fs0 fc0 sc0 ls0 ws0">[N,M] = size(I); </div><div class="t m0 x1 h3 ya ff1 fs0 fc0 sc0 ls0 ws0">h = [0.125,0.375,0.375,0.125]; </div><div class="t m0 x1 h3 yb ff1 fs0 fc0 sc0 ls0 ws0">g = [0.5,-0.5]; </div><div class="t m0 x1 h3 yc ff1 fs0 fc0 sc0 ls0 ws0">delta = [1,0,0]; </div><div class="t m0 x1 h3 yd ff1 fs0 fc0 sc0 ls0 ws0">J = 3; </div><div class="t m0 x1 h4 ye ff1 fs0 fc0 sc0 ls0 ws0">a(1:N,1:M,1,1:J+1) = 0; <span class="fc1">%<span class="ff2">&#36171;&#21021;&#20540;</span></span></div><div class="t m0 x1 h3 yf ff1 fs0 fc0 sc0 ls0 ws0">dx(1:N,1:M,1,1:J+1) = 0; </div><div class="t m0 x1 h3 y10 ff1 fs0 fc0 sc0 ls0 ws0">dy(1:N,1:M,1,1:J+1) = 0; </div><div class="t m0 x1 h3 y11 ff1 fs0 fc0 sc0 ls0 ws0">d(1:N,1:M,1,1:J+1) = 0; </div><div class="t m0 x1 h4 y12 ff1 fs0 fc0 sc0 ls0 ws0">a(:,:,1,1) = conv2(h,h,I,'same'); <span class="fc1">%<span class="_ _0"></span><span class="ff3">C = conv2(A,B) C = conv2(A,B)<span class="ff2">&#36820;&#22238;&#30697;&#38453;<span class="_ _1"> </span></span>A<span class="_ _1"> </span><span class="ff2">&#21644;<span class="_ _2"> </span></span>B<span class="_ _2"> </span><span class="ff2">&#30340;&#20108;</span></span></span></div><div class="t m0 x1 h4 y13 ff2 fs0 fc1 sc0 ls0 ws0">&#32500;&#21367;&#31215;<span class="_ _2"> </span><span class="ff3">C<span class="_ _0"></span></span>&#12290;&#33509;<span class="_ _2"> </span><span class="ff3">A<span class="_ _1"> </span></span>&#20026;<span class="_ _2"> </span><span class="ff3">ma&#215;na<span class="_ _1"> </span></span>&#30340;&#30697;&#38453;&#65292;<span class="ff3">B<span class="_ _2"> </span></span>&#20026;<span class="_ _1"> </span><span class="ff3">mb&#215;nb<span class="_ _2"> </span></span>&#30340;&#30697;&#38453;&#65292;&#21017;<span class="_ _1"> </span><span class="ff3">C<span class="_ _2"> </span></span>&#30340;&#22823;&#23567;&#20026;</div><div class="t m0 x1 h4 y14 ff3 fs0 fc1 sc0 ls0 ws0">(ma+mb+1)&#215;(na+nb+1)<span class="ff2">&#12290;</span></div><div class="t m0 x1 h3 y15 ff1 fs0 fc0 sc0 ls0 ws0">dx(:,:,1,1) = conv2(delta,g,I,'same'); </div><div class="t m0 x1 h3 y16 ff1 fs0 fc0 sc0 ls0 ws0">dy(:,:,1,1) = conv2(g,delta,I,'same'); </div><div class="t m0 x1 h3 y17 ff1 fs0 fc0 sc0 ls0 ws0">x = dx(:,:,1,1); </div><div class="t m0 x1 h3 y18 ff1 fs0 fc0 sc0 ls0 ws0">y = dy(:,:,1,1); </div><div class="t m0 x1 h3 y19 ff1 fs0 fc0 sc0 ls0 ws0">d(:,:,1,1) = sqrt(x.^2+y.^2); </div><div class="t m0 x1 h3 y1a ff1 fs0 fc0 sc0 ls0 ws0">I1 = imadjust(d(:,:,1,1),stretchlim(d(:,:,1,1)),[0 1]);figure;imshow(I1); </div><div class="t m0 x1 h3 y1b ff1 fs0 fc0 sc0 ls0 ws0">lh = length(h); </div><div class="t m0 x1 h3 y1c ff1 fs0 fc0 sc0 ls0 ws0">lg = length(g); </div><div class="t m0 x1 h3 y1d ff1 fs0 fc0 sc0 ls0 ws0">for j = 1:J+1 </div><div class="t m0 x1 h3 y1e ff1 fs0 fc0 sc0 ls0 ws0">lhj = 2^j*(lh-1)+1; </div><div class="t m0 x1 h3 y1f ff1 fs0 fc0 sc0 ls0 ws0">lgj = 2^j*(lg-1)+1; </div><div class="t m0 x1 h3 y20 ff1 fs0 fc0 sc0 ls0 ws0">hj(1:lhj)=0; </div><div class="t m0 x1 h3 y21 ff1 fs0 fc0 sc0 ls0 ws0">gj(1:lgj)=0; </div><div class="t m0 x1 h3 y22 ff1 fs0 fc0 sc0 ls0 ws0">for n = 1:lh </div><div class="t m0 x1 h3 y23 ff1 fs0 fc0 sc0 ls0 ws0">hj(2^j*(n-1)+1)=h(n); </div><div class="t m0 x1 h3 y24 ff1 fs0 fc0 sc0 ls0 ws0">end </div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐
    • 小波边缘检测.zip
      数学地角度来看,信号与图像处理可以统一看作是信号处理(图像可以看作是二维信号),在小波分析地许多分析的许多应用中,都可以归结为信号处理问题。对于其性质随时间是稳定不变的信号,处理的理想工具仍然是傅立叶...
    • 图像边缘检测 MATLAB
      MATLAB写的用于边缘检测的程序,希望对大家有帮助。
    • 边缘检测算法实现matlab.zip
      matlab实现图像边缘检测
    • 图像处理小波分析matlab程序
      图像处理小波分析matlab程序,希望对大家有用。
    • 小波边缘检测matlab程序
      里面有一个关于边缘检测matlab程序,是用小波做的基于多尺度模极大值边缘检测
    • matlab图像边缘检测GUI
      Matlab GUI做的图像边缘检测程序,分别用经典时域算子和小波多尺度分析检测图像边缘
    • canny边缘检测算法-matlab
      数字图像处理中边缘检测,canny是最优的边缘检测算法。对图像高斯滤波、求梯度、局部非极大值抑制、设置图像边缘为不可能的边缘点
    • 小波边缘检测matlab程序
      基于方向可调小波边缘检测,包含matlab源程序,图片,算法介绍,还有一份详细的报告,希望读者都能看懂
    • matlab 小波域维纳滤波处理图像
      图像处理与分析作业:以lena图像为例,编程实现小波域维纳滤波.  首先使用高斯噪声叠加在原始图像上。  使用分解三次后进行维纳滤波再逐层返回,使用的是dwt2这个函数  [cA,cH,cV,cD]=dwt2(X,' bior2.2')  ...
    • canny边缘检测算法的matlab实现
      canny算法,实现边缘检测。本程序主要分为4步,第一步是输入图像,第二步和第三步实现canny算法,第三步实现输出