当前位置:网站首页>【图像融合】基于matlab DCT域多焦点图像融合【含Matlab源码 1973期】
【图像融合】基于matlab DCT域多焦点图像融合【含Matlab源码 1973期】
2022-07-16 00:35:00 【海神之光】
一、基于DCT变换的图像融合算法简介
在图像融合过程中,最主要的就是如何提取低高频系数以及低高频系数的融合准则。基于DCT变换的图像融合算法原理如图2所示。
图2 DCT融合算法原理
算法步骤如下。
步骤1精确配准待融合的源图像。
步骤2采用分块的方法将参与融合的每幅大小为M×N的源图像分别分成m×m个小块。
步骤3对步骤2中得到的小块都进行DCT变换。
步骤4对通过DCT变换的小块分别提取低频系数和高频系数,并对相应位置的低高频系数根据低高频融合准则进行融合。
步骤5对已融合的DCT系数进行IDCT,最终得到融合图像。
2.1 低频系数融合
对视觉最重要的信息部分,都集中在图像的低频。低频代表图像像素之间慢变化,即图像框架部分[11] 。为了保持图像的可视性,保留图像的低频部分,低频部分的改变有可能引起图像较大的变动。基于DCT变换的融合图像的低频系数采用平均法,假设有p幅多曝光图像,可定义为
式中Gk(i,j)是源图像经DCT变换后提取的低频系数;G(i,j)为融合后的低频系数;wk是权重因子。
2.2 高频系数融合
高频系数对应于图像的细节信息,如边缘等特征。高频系数的融合规则如下。
(1)分块后的图像经DCT变换后,提取它的高频系数。
分别计算高频系数D(i,j)以像素点(i,j)为中心的(2k+1)×(2k+1)邻域内的图像标准差表达式为

(2)记p幅多曝光图像的某高频系数的区域标准差分别为[C1(i,j),C2(i,j),…,Cp(i,j)],则提取的高频系数对应的权重系数为
(3)由式(7)可以得出p幅多曝光图像的权重,对它们进行比较,融合后的高频系数D(i,j)为最大的权重系数所对应的高频系数。如果
那么
二、部分源代码
clc
clear
close all
%Select First Image
disp('Please Select First Image:')
[filename, pathname]= uigetfile({
'*.jpg;*.png;*.tif'},'Select First Image');
path=fullfile(pathname, filename);
im1=imread(path);
disp('Great! First Image is selected')
%Select Second Image
disp('Please Select Second Image:')
[filename, pathname]= uigetfile({
'*.jpg;*.png;*.tif'},'Select Second Image');
path=fullfile(pathname, filename);
im2=imread(path);
disp('Great! Second Image is selected')
if size(im1,3) == 3 % Check if the images are grayscale
im1 = rgb2gray(im1);
end
if size(im2,3) == 3
im2 = rgb2gray(im2);
end
if size(im1) ~= size(im2) % Check if the input images are of the same size
error('Size of the source images must be the same!')
end
三、运行结果

四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1]刘卫华,马洋花,刘颖.基于DCT变换的多曝光图像融合方法[J].西安邮电大学学报. 2016,21(06)
3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除
边栏推荐
- flutter EventBus
- Summary of commonly used tricks in torch
- Which machine learning model is suitable for different evaluation methods?
- Vertical/Column text select in PyCharm
- JSON data parsing of Scala
- What effective measures can be taken to improve the efficiency of discussing research issues?
- How to write each part of the thesis well?
- Wireless communication safety operation 4
- JDBC connection to mysql8.0 driver
- 内存管理:内存的分配与回收
猜你喜欢

redis数据类型

Jsd-2204-mvc-weibo project-day15

Wireless communication safety operation 3

转本结束暑假2022.6.29-7.13我的深圳之行(体验)

Linux上安装mysql

Calculate the average wage excluding the maximum wage and the minimum wage of the Department (ByteDance interview)

JS12day(构造函数创建类对象,prototype, proto,原型链,forEach,filter,some,Oblect.keys(),Object.defineProperty())
![[MySQL project actual combat optimization] add index through execution plan analysis](/img/27/d7b6ba77b617f14905aec38dc92618.png)
[MySQL project actual combat optimization] add index through execution plan analysis

mysql报错 1142 - SELECT command denied to user ‘dev‘@‘localhost‘ for table ‘user‘ (已解决)

Which machine learning model is suitable for different evaluation methods?
随机推荐
Mobile Robotics (II) posture solution
[step on pit] attaching a row → dataframe
面试官:怎么不用定时任务实现关闭订单?
[C language] implementation of static address book
如何基于知识图谱技术构建现代搜索引擎系统、智能问答系统、智能推荐系统?
Pendingintent details
End of summer vacation 2022.6.29-7.13 my trip to Shenzhen (experience)
Wireless communication safety operation 1- latest news of wireless communication safety
ThinkPHP 3 adds word segmentation weight search function and phpanalysis plug-in
Critique of A Novel Proof-of-Reputation Consensus for Storage Allocation in Edge Blockchain Systems
JS12day(构造函数创建类对象,prototype, proto,原型链,forEach,filter,some,Oblect.keys(),Object.defineProperty())
mysql json字段查询
How to write each part of the thesis well?
二叉树相关的习题讲解
Plug in development of meshlab
Reading the pointpillar code of openpcdet -- Part 1: data enhancement and data processing
Explanation of exercises related to binary tree
jeesite登录流程
晴空一“鹤”排“云”上:以数为翅的中国飞鹤
02. Resttemplate learning notes