clc;clear;
% close;
tic
f = imread('车辆与人/行人-09.jpeg'); % 行人识别
f = imread('00001/img_00009.bmp'); % 车辆识别
if ndims(f) > 2 % 查看维度
f = rgb2gray(f); % 转化成灰度图
end
order = 4; % 小波包
% depth = 4;
f = double(f);
f = medfilt2(f); % 中值滤波器,消躁
T = wpdec2(f,order,'db16'); % db小波
% T = wpdec2(f,order,'dmey'); % meyer小波
% T = wpdec2(f,order,'coif1');
% T = wpdec2(f,order,'haar');
tt1 = wprcoef(T,[3 5]);
tt2 = wprcoef(T,[3 10]);
tt3 = wprcoef(T,[3 20]);
tt4 = wprcoef(T,[3 50]);
tt5 = wprcoef(T,[3 100]);
tt6 = wprcoef(T,[3 200]);
figure
subplot(3,1,2)
mesh(f)
title('原图')
% imagesc(uint8(tt1));
figure
subplot(3,2,1)
mesh(tt1);title('细节图1');
subplot(3,2,2)
mesh(tt2);title('细节图2');
subplot(3,2,3)
mesh(tt3);title('细节图3');
subplot(3,2,4)
mesh(tt4);title('细节图4');
subplot(3,2,5)
mesh(tt5);title('细节图5');
subplot(3,2,6)
mesh(tt6);title('细节图6');
figure
plot(T); % 绘制小波包树
d = tnodes(T);
firstIndex = d(1);
lastIndex = d(end);
gaus = [];
for i = firstIndex:lastIndex
cfs = wpcoef(T,i);
cfs = cfs*1.5;
igass = judgeGausses(cfs);
gaus = [gaus,igass];
if i == firstIndex
cp = wpcoef(T,i);
[h,w] = size(cp);
y = zeros(h,w);
T = write(T,'cfs',i,y);
end
if i > (firstIndex+lastIndex)/2
m = i;
cp = wpcoef(T,m);
[h,w] = size(cp);
y = zeros(h,w);
T = write(T,'cfs',m,y);
end
end
plot(T);%绘制小波包树
f1 = wprec2(T);
means = mean2(f1);
stds = std2(f1);
v = means + stds*4; %
[l1,l2] = size(f1);
for i = 1:l1
for j = 1:l2
if f1(i,j) < .1*v
f1(i,j) = 0;
% else
% f1(i,j) = 1;
end
end
end
z = f1;
a = max(max(z));
[m,n] = find(z == a);
figure
subplot(121)
imagesc(f);
title('原始红外图像');
colormap('gray')
subplot(122)
imagesc(uint8(f1));
% hold on
% plot(n,m,'r*')
title('小波变换背景抑制效果');
colormap('gray')
figure
imagesc(uint8(f1));
dest = drawRect( f, [n-25,m-25], [50,50]);
imagesc(uint8(dest));
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
1、实现效果:《基于小波包和支持向量机的红外图像检测和识别》见链接:https://blog.csdn.net/SoaringLee_fighting/article/details/124902393 2、内容介绍:在大学毕业设计的时候,课题要求实现《红外图像检测和识别》,采用了小波包和支持向量机技术,采用Matlab语言实现。 3、适用人群:适用于计算机,电子信息工程等专业的大学生课程设计和毕业设计。 4、支持答疑:有问题可以订阅博主的《实用毕业设计》专栏(附链接 :https://blog.csdn.net/soaringlee_fighting/category_9288245.html)或者直接购买资源后咨询博主。 5、质量保证:完整代码,可直接运行!
资源推荐
资源详情
资源评论
收起资源包目录
基于小波包和支持向量机的红外图像检测和识别.rar (82个子文件)
毕设程序
judgeGauss.m 2KB
wt2function.m 1KB
judgeGausses.m 473B
testWindowScroll.m 2KB
drawRect.m 2KB
svm_test.m 2KB
00001
img_00029.bmp 85KB
img_00023.bmp 85KB
img_00017.bmp 85KB
img_00025.bmp 85KB
img_00013.bmp 85KB
img_00001.bmp 85KB
img_00008.bmp 85KB
img_00019.bmp 85KB
img_00005.bmp 85KB
img_00028.bmp 85KB
img_00009.bmp 85KB
img_00011.bmp 85KB
img_00026.bmp 85KB
img_00006.bmp 85KB
img_00014.bmp 85KB
img_00018.bmp 85KB
img_00031.bmp 85KB
img_00007.bmp 85KB
img_00003.bmp 85KB
img_00016.bmp 85KB
img_00015.bmp 85KB
img_00021.bmp 85KB
img_00012.bmp 85KB
img_00020.bmp 85KB
img_00022.bmp 85KB
img_00030.bmp 85KB
img_00027.bmp 85KB
img_00002.bmp 85KB
img_00010.bmp 85KB
img_00024.bmp 85KB
img_00004.bmp 85KB
车辆与人
行人-01.jpeg 11KB
行人-04.jpeg 16KB
行人-03.jpeg 43KB
车辆-05.jpeg 14KB
车辆-07.jpeg 13KB
行人-09.jpeg 13KB
车辆-04.jpeg 16KB
车辆-03.jpeg 12KB
车辆-08.jpeg 14KB
行人-08.jpeg 54KB
行人-10.jpeg 11KB
车辆-06.jpeg 18KB
行人-06.jpeg 15KB
车辆-09.jpeg 12KB
车辆-01.jpeg 12KB
行人-07.jpeg 12KB
行人-05.jpeg 14KB
车辆-02.jpeg 11KB
车辆-10.jpeg 10KB
行人-02.jpeg 39KB
新建文件夹
人-02.jpeg 84KB
人-08.jpeg 23KB
鸟-08.jpeg 36KB
鸟-07.jpeg 21KB
人-06.jpeg 30KB
人-test.jpeg 12KB
人-04.jpeg 31KB
人-03.jpeg 52KB
鸟-ttt1.jpeg 35KB
鸟-06.jpeg 16KB
人-07.jpeg 74KB
鸟-09.jpeg 61KB
鸟-04.jpeg 36KB
鸟-ttt.jpeg 20KB
人-01.jpeg 13KB
人-05.jpeg 108KB
鸟-01.jpeg 37KB
人-09.jpeg 12KB
鸟-test.jpeg 27KB
鸟-05.jpeg 59KB
鸟-02.jpeg 34KB
鸟-10.jpeg 11KB
鸟-03.jpeg 90KB
f7.mat 29KB
人-10.jpeg 77KB
共 82 条
- 1
资源评论
飞翔的鲲
- 粉丝: 7046
- 资源: 105
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功