当前位置:网站首页>【图像去噪】基于matlab双立方插值和稀疏表示图像去噪【含Matlab源码 2009期】
【图像去噪】基于matlab双立方插值和稀疏表示图像去噪【含Matlab源码 2009期】
2022-08-02 06:34:00 【海神之光】
一、稀疏表示模型简介
图像的稀疏表示能够更好地表示出图像的特征, 其理论依据就是, 有用的图像信号是有序的, 而噪声普遍是杂乱无章的, 因此可以提取出能够表示图像特有奇异性特征的信息, 比如边缘、线段、条纹、端点等, 再用特定的过完备字典中的原子进行线性组合, 重构出这些特征信息。红外图像相比于普通的可见光图像更易于受到各种噪声的干扰, 图像的边缘以及纹理等特征更加模糊不清。传统的空域、频域图像去噪方法对红外图像的去噪效果并不理想, 所以我们提出基于稀疏表示的红外图像去噪方法。
基于稀疏表示的图像去噪方法先将待处理的图像分成n×n的图像块, 然后对这些图像块分别进行稀疏分解, 以滤除图像中的噪声, 再将图像块拼接成去噪后的完整图像。
对于一个给定的图像块信号x∈RN, 用一个过完备字典Φ=[d1, d2, …, dK]∈RN×K (N<K) 中元素的线性组合来表示:
α=[α1, α2, …, αK]T∈RK是稀疏矩阵信号, 则基于过完备字典的图像稀疏表示x即:
l0范数可以转换为l1范数的凸优化问题, 即:
考虑到实际情况下红外图像去噪这一问题, 上式可以写为以下不等式:
把式 (4) 中求解得到的每一个图像块拼接在一起, 得到去噪后的完整图像。对于给定的图像X∈RM, 可以分割成许多小的图像块xi=Rix, 其中Ri为分割矩阵[5]。为了防止在图像边界留下拼接的痕迹, 采用重叠的方式分解图像, 因此这种方法会在图像块元素间存在冗余。所以由图像块重构的去噪后的图像是一个欠定问题, 可用最小二乘法来解决, 得到以下的解析解:
二、部分源代码
clear all; clc;
% read test image
im_l = imread('Data/Testing/input.bmp');
% set parameters
lambda = 0.2; % sparsity regularization
overlap = 4; % the more overlap the better (patch size 5x5)
up_scale = 2; % scaling factor, depending on the trained dictionary
maxIter = 20; % if 0, do not use backprojection
% load dictionary
load('Dictionary/D_1024_0.15_5.mat');
% change color space, work on illuminance only
im_l_ycbcr = rgb2ycbcr(im_l);
im_l_y = im_l_ycbcr(:, :, 1);
im_l_cb = im_l_ycbcr(:, :, 2);
im_l_cr = im_l_ycbcr(:, :, 3);
% image super-resolution based on sparse representation
[im_h_y] = ScSR(im_l_y, 2, Dh, Dl, lambda, overlap);
[im_h_y] = backprojection(im_h_y, im_l_y, maxIter);
% upscale the chrominance simply by "bicubic"
[nrow, ncol] = size(im_h_y);
im_h_cb = imresize(im_l_cb, [nrow, ncol], 'bicubic');
im_h_cr = imresize(im_l_cr, [nrow, ncol], 'bicubic');
im_h_ycbcr = zeros([nrow, ncol, 3]);
im_h_ycbcr(:, :, 1) = im_h_y;
im_h_ycbcr(:, :, 2) = im_h_cb;
im_h_ycbcr(:, :, 3) = im_h_cr;
im_h = ycbcr2rgb(uint8(im_h_ycbcr));
% bicubic interpolation for reference
im_b = imresize(im_l, [nrow, ncol], 'bicubic');
% read ground truth image
im = imread('Data/Testing/gnd.bmp');
% compute PSNR for the illuminance channel
bb_rmse = compute_rmse(im, im_b);
sp_rmse = compute_rmse(im, im_h);
bb_psnr = 20*log10(255/bb_rmse);
sp_psnr = 20*log10(255/sp_rmse);
% show the images
figure,
subplot(131),imshow(im_l);title('原图')
subplot(132),imshow(im_h);
title(['PSNR for 稀疏表示',num2str( sp_psnr)]);
subplot(133), imshow(im_b);
title(['PSNR for 双立方插值',num2str(bb_psnr)]);
三、运行结果

四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1] 何培亮,舒倩.基于稀疏表示的红外图像去噪算法研究[J].红外. 2018,39(10)
3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除
边栏推荐
- MySQL Advanced Statements (1)
- Toolbox App 1.25 New Features at a Glance | Version Update
- 实例032:反向输出II
- SimpleChannelInboundHandler使用总结
- PMP新考纲考试内容介绍
- 2022.07.31(LC_6133_分组的最大数量)
- 8/1 思维+扩展欧几里得+树上dp
- 【npm install 报错问题合集】- npm ERR! code ENOTEMPTY npm ERR! syscall rmdir
- 享年94岁,图灵奖得主、计算复杂性理论先驱Juris Hartmanis逝世
- MySQL high-level statements (1)
猜你喜欢
![(Part of it is not understood, and the notes are not completed) [Graph Theory] Difference Constraints](/img/e0/385579fc8657db8b175318bd739908.gif)
(Part of it is not understood, and the notes are not completed) [Graph Theory] Difference Constraints

每周推荐短视频:为什么产品开发需要数字化?如何做到数字化?

文件上传漏洞(二)

System.Security.SecurityException: 未找到源,但未能搜索某些或全部事件日志。不可 访问的日志: Security

数据库概论-MySQL的数据表的基本操作

GCC编译器技术解析

MySQL Advanced Statements (1)

(笔记整理未完成)【图论】图的遍历

2022夏暑假每日一题(六)

速看!PMP新考纲、PMBOK第七版解读
随机推荐
实例027:递归输出
张驰课堂:六西格玛培训工具——箱线图
How does abaqus quickly import the assembly of other cae files?
Toolbox App 1.25 New Features at a Glance | Version Update
(部分不懂,笔记整理未完成)【图论】差分约束
GCC编译器技术解析
nacos源码启动找不到istio包
July 18-July 31, 2022 (Ue4 video tutorials and documentation, 20 hours. Total 1412 hours, 8588 hours left)
线程的创建方式
request.getSession(), the story
ASP.NET Core Web API 幂等性
交换网络----三种生成树协议
Clapper that can interact with the audience in real time
odoo field 设置匿名函数domain
Detailed explanation of 9 common reasons for MySQL index failure
MySQL (3)
【论文精读】Geometric Structure Preserving Warp for Natural Image Stitching
反射课后习题及做题记录
Connection reset by peer problem analysis
abaqus如何快速导入其他cae文件的assembly?