aaa.rar

  • sujiraj
    了解作者
  • matlab
    开发工具
  • 433KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 1
    下载次数
  • 2014-09-22 14:34
    上传日期
matlab source code to implement canny edge detection ...
aaa.rar
  • aaa
  • GETK.m
    236B
  • GETG.m
    119B
  • compMA.m
    390B
  • boat.tif
    258KB
  • cameraman.tif
    63.7KB
  • densupress.m
    1.1KB
  • wt2d.m
    953B
  • getth.m
    316B
  • normf.m
    233B
  • GETL.m
    271B
  • nmsupress2d.m
    1.1KB
  • compcorsca2d.m
    802B
  • compcor2d.m
    658B
  • getf2d.m
    602B
  • compFR.m
    572B
  • GETNH.m
    174B
  • WT.m
    466B
  • getf.m
    312B
  • Lena512.tif
    258KB
  • cell.png
    20.3KB
  • getsigma2d.m
    753B
  • normf2d.m
    280B
  • edge.tif
    72.8KB
  • nmsupress.m
    333B
  • compcorsca.m
    326B
  • GETH.m
    159B
  • main.m
    1.2KB
  • getsigmaz1.m
    583B
  • getth2d.m
    320B
内容介绍
%�Canny edge detection,� clc; close all; clear all; img_name = input('Enter the image name :','s'); ima = imread(img_name); ima=imread('boat.tif','tif'); ima=double(ima); pima=mean(mean(ima.^2)); figure(1),clf; imshow(ima,[0 255]); n=length(ima); v=10; noi=v*randn(n,n); iman=ima+noi;%%add noise to image n=size(ima); M=n(1); N=n(2); fprintf('\n Befor Edge Detection'); MSE = sum(sum((ima).^2))/(M*N); PSNR = 10*log10(256*256/MSE); fprintf('\nMSE: %7.2f ', MSE); fprintf('\nPSNR: %9.7f \n', PSNR); figure(2),clf; imshow(iman,[0 255]); sca=3; th=getth2d(sca-1);th=th(sca-1); [wr,wc,s,m]=wt2d(iman,sca); [w1r,w2r,w1c,w2c,corr,corc]=compcorsca2d(wr,wc,m); %%%%%%%%%%%%%%%%%%%%%%% maskr=(corr>0); maskc=(corc>0); corr=corr.*maskr; corc=corc.*maskc; %%%%%%%%%%%%%%%%%%%%%%%%%%% k=2; for con=16:2:26 [Mod,Ang]=compMA(w2r,w2c,corr,corc,th,v,con);%%get the edge map in different threshold edmap=nmsupress2d(Mod,Ang); k=k+1;figure(k);clf imshow(edmap); end fprintf('\nAfter Edge Detection'); n=size(edmap); M=n(1); N=n(2); MSE = sum(sum((edmap).^2))/(M*N); PSNR = 10*log10(256*256/MSE); fprintf('\nMSE: %7.2f ', MSE); fprintf('\nPSNR: %9.7f \n', PSNR);
评论
    相关推荐