资源简介
实现和比较了卡尔曼和维纳滤波器的去噪性能,MATLAB代码可运行
代码片段和文件信息
% function exampleFilter
%
% Example of how the Kalman filter performs for real data
obj=VideoReader(‘julius.avi‘);
aviobj=VideoWriter(‘outputvideo.avi‘)
open(aviobj)
nframes=obj.NumberOfframes;
for k=1:nframes
img=read(objk);
im2 = imnoise(img‘gaussian‘0.10.2)
f=im2frame(im2)
writeVideo(aviobjf)
end
close(aviobj)
%--------------------------------------------------------------------------
%---------------------End of Gaussian noise adding-------------------------
%--------------------------------------------------------------------------
%implay(‘outputvideo.avi‘);
filename = ‘outputvideo.avi‘;
mov = VideoReader(filename);
% Output folder
%getting no of frames
videoframes=[];
newframes=[];
realframe=[];
wienerframe=[];
psnrk=[];
filteredframe=[];
filteredframe1=[];
numberOfframes = mov.NumberOfframes;
numberOfframesWritten = 0;
for frame = 1 :numberOfframes
thisframe = read(mov frame);
% outputbaseFileName = sprintf(‘%3.3d.bmp‘ frame);
%outputFullFileName = fullfile(outputFolder outputbaseFileName);
%imwrite(thisframe outputFullFileName ‘bmp‘);
%progressIndication = sprintf(‘Wrote frame %4d of %d.‘ framenumberOfframes);
videoframes = cat(3videoframesthisframe);
%disp(progressIndication);
%numberOfframesWritten = numberOfframesWritten + 1;
end
for frame=1:size(videoframes3)
x=videoframes(::frame);
y=im2single(x);
newframes = cat(3newframesy);
end
%Apply filter
k=Kalman_Stack_Filter(newframes);
k75=Kalman_Stack_Filter(newframes0.75);
outputFolder= fullfile(cd ‘filteredframe‘);
if ~exist(outputFolder ‘dir‘)
mkdir(outputFolder);
end
y=size(k3);
disp(y);
for frame=1:y
thisframe=k(::frame);
thisframe1=k75(::frame);
y=im2single(thisframe);
y1=im2single(thisframe1);
filteredframe = cat(3filteredframey);
filteredframe1=cat(3filteredframe1y1);
%outputbaseFileName1 = sprintf(‘%3.3d.bmp‘ frame);
%disp(x);
%disp(outputbaseFileName1);
%outputFullFileName1 = fullfile(outputFolder outputbaseFileName1);
%disp(outputFullFileName1);
%disp(y);
%imwrite(thisframe outputFullFileName1 ‘bmp‘);
end
%--------------------------------------------------------------------------
%---------------------Wiener Filering--------------------------------------
%--------------------------------------------------------------------------
%implay(videoframes);
outputFolder3 = fullfile(cd ‘wienerframes‘);
if ~exist(outputFolder3 ‘dir‘)
mkdir(outputFolder3);
end
disp(outputFolder3);
for frame=1:size(newframes3)
I=videoframes(::frame);
I=im2single(I);
%x=frame+5;
%outputbaseFileName1 = sprintf(‘%3.3d.bmp‘x);
%outputFullFileName1 = fullfile(outputFolder3 outputbaseFileName1);
%disp(outputFullFileName1);
J=wiener2(I[5 5]);
wienerframe=cat(3wienerframeJ);
end
%--------------------------------------------------------------------------
%---------------------End of Wiener Filering---------------------
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-09-12 16:53 Comparing-and-combining-Kalman-and-Wiener-Filter-for-video-denoising-master\
文件 613275 2016-09-12 16:53 Comparing-and-combining-Kalman-and-Wiener-Filter-for-video-denoising-master\FinalYearProjectPaper-2.docx
文件 1088 2016-09-12 16:53 Comparing-and-combining-Kalman-and-Wiener-Filter-for-video-denoising-master\Kalman_Stack_Filter.m
文件 742 2016-09-12 16:53 Comparing-and-combining-Kalman-and-Wiener-Filter-for-video-denoising-master\README.md
文件 6065 2016-09-12 16:53 Comparing-and-combining-Kalman-and-Wiener-Filter-for-video-denoising-master\exampleFilter.m
文件 4035 2016-09-12 16:53 Comparing-and-combining-Kalman-and-Wiener-Filter-for-video-denoising-master\gaussiannoise.m
文件 820224 2016-09-12 16:53 Comparing-and-combining-Kalman-and-Wiener-Filter-for-video-denoising-master\julius.avi
文件 370 2016-09-12 16:53 Comparing-and-combining-Kalman-and-Wiener-Filter-for-video-denoising-master\psnrcalculationnew.m
文件 532 2016-09-12 16:53 Comparing-and-combining-Kalman-and-Wiener-Filter-for-video-denoising-master\terminal.m
文件 249 2016-09-12 16:53 Comparing-and-combining-Kalman-and-Wiener-Filter-for-video-denoising-master\wienerfilter.m
相关资源
- BSAS顺序聚类算法matlab实现代码注释很
- matlab与信号处理
- 基于matlab的人脸识别系统
- MATLAB M_map 中文说明书
- MATLABR2017b linux ubuntu Crack
- 背景建模,MATLAB
- 基于MATLAB&CCS;实现代码生成及
- MATLAB_R2015a(8.5.0.197613)安装及破解方
- 电机控制,vf电机控制,矢量电机控制
- 显著性检测——LC算法matlab实现
- MATLAB gui设计入门
- matlab编写的 32个降维程序
- matlab sift特征提取
- 维纳滤波的matlab实现
- K均值聚类+Matlab实现.rar
- MATLAB 目标追踪单目标、多目标 可以运
- 数字图像处理图像的骨架生成和提取
- 数字基带/带通仿真 含BPSK、QPSK、16Q
- 双馈风力发电机MATLAB实现.zip
- 滤波器设计及Matlab代码
- matlab下多种方法进行心电信号去噪
- 电力电子技术学习指导习题集及仿真
- saber&MATLAB;联合仿真设置
- 基于MATLAB 的脉搏信号处理软件系统
- matlab最全的图像处理方面的工具箱
- matlab的gui的slider滑动条和可编辑文本
- matlab串口通信官方教程
- 多普勒效应的matlab仿真程序
- 加速度计原始数据进行matlab的fft分析
- 神经网络遥感图像分类matlab
评论
共有 条评论