小波变换边缘提取程序MATLAB
来源:互联网 发布:php if 多条件 编辑:程序博客网 时间:2024/05/16 10:35
clear all;
load wbarb; %小波变换边缘提取程序
I = ind2gray(X,map);%检索图转成灰度图
imshow(I);
I1 = imadjust(I,stretchlim(I),[0,1]);%调整图像的像素值,可以改变对比度和颜色
figure;
imshow(I1);
[N,M] = size(I);
h = [0.125,0.375,0.375,0.125];
g = [0.5,-0.5];
delta = [1,0,0];
J = 3;
a(1:N,1:M,1,1:J+1) = 0;
dx(1:N,1:M,1,1:J+1) = 0;
dy(1:N,1:M,1,1:J+1) = 0;
d(1:N,1:M,1,1:J+1) = 0;
a(:,:,1,1) = conv2(h,h,I,'same'); %二维卷积
dx(:,:,1,1) = conv2(delta,g,I,'same');
dy(:,:,1,1) = conv2(g,delta,I,'same');
x = dx(:,:,1,1);
y = dy(:,:,1,1);
d(:,:,1,1) = sqrt(x.^2+y.^2);
I1 = imadjust(d(:,:,1,1),stretchlim(d(:,:,1,1)),[0 1]);figure;imshow(I1);
lh = length(h);
lg = length(g);
for j = 1:J+1
lhj = 2^j*(lh-1)+1;
lgj = 2^j*(lg-1)+1;
hj(1:lhj)=0;
gj(1:lgj)=0;
for n = 1:lh
hj(2^j*(n-1)+1)=h(n);
end
for n = 1:lg
gj(2^j*(n-1)+1)=g(n);
end
a(:,:,1,j+1) = conv2(hj,hj,a(:,:,1,j),'same');
dx(:,:,1,j+1) = conv2(delta,gj,a(:,:,1,j),'same');
dy(:,:,1,j+1) = conv2(gj,delta,a(:,:,1,j),'same');
x = dx(:,:,1,j+1);
y = dy(:,:,1,j+1);
dj(:,:,1,j+1) = sqrt(x.^2+y.^2);
I1 = imadjust(dj(:,:,1,j+1),stretchlim(dj(:,:,1,j+1)),[0 1]);figure;imshow(I1);
end
- 小波变换边缘提取程序MATLAB
- matlab小波变换图像边缘检测源代码.m
- matlab 二维小波变换程序
- 边界提取小程序-MATLAB
- matlab小波变换
- matlab 小波变换
- matlab 小波变换
- matlab练习程序(图像Haar小波变换)
- 使用MATLAB设计小波变换程序中的若干问题(转)
- matlab练习程序(图像Haar小波变换)
- matlab练习程序(图像Haar小波变换)小波变换
- matlab小波变换函数
- matlab小波变换函数
- Matlab 图像小波变换
- matlab中的小波变换
- 【Matlab】Canny算子提取边缘
- 基于小波变换的多尺度图像边缘检测matlab源代码(在Matlab7.0下运行)
- Matlab 傅立叶变换 短时傅立叶变换 小波变换
- python26高级[读写Excel]
- union用来节省空间,有些数据项不会同时出现
- Android JNI
- 安装python cx_oracle库
- Linux下SVN学习笔记
- 小波变换边缘提取程序MATLAB
- 3G中的A-GPS移动定位技术
- VC 常用技巧总结 - 108条
- 怎样成为一名优秀的科学家?
- Squid的访问控制列表语法
- Linux常用命令集
- js弹出的窗口居中显示
- 用java压缩文件夹/文件
- jp