【图像融合】基于SURF算法实现红外与可见光图像配准算法附MATLAB代码
【图像融合】基于SURF算法实现红外与可见光图像配准算法附MATLAB代码
TT_Matlab
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,完整matlab代码或者程序定制加qq1575304183。
1 简介
针对SIFT(Scale Invariant Feature Transform)算法运算速度慢,提出了基于SURF(Speeded Up Robust Features)算法的图像配准.对于可见光和可见光图像,先用SURF算法提取图像的特征点,并采用64维的特征向量作为特征描述子;选用欧氏距离作为匹配方法。
2 部分代码
function ipts=OpenSurf(img,Options)
%
This
function
OPENSURF, is an implementation of SURF (Speeded Up Robust
%
Features). SURF will detect landmark points
in
an image, and describe
%
the points by a vector
which
is robust against (a little bit) rotation
%
,scaling and noise. It can be used
in
the same way as SIFT (Scale-invariant
%
feature transform)
which
is patented. Thus to align (register) two
%
or more images based on corresponding points, or make 3D reconstructions.
%
%
This Matlab implementation of Surf is a direct translation of the
%
OpenSurf C
# code of Chris Evans, and gives exactly the same answer.
%
Chris Evans wrote one of the best, well structured all inclusive SURF
%
implementations. On his site you can find Evaluations of OpenSURF
%
and the C
# and C++ code. http://www.chrisevansdev.com/opensurf/
%
Chris Evans gave me permisson to publish this code under the (Mathworks)
%
BSD license.
%
%
Ipts = OpenSurf(I, Options)
%
%
inputs,
%
I : The 2D input image color or greyscale
%
(optional)
%
Options : A struct with options (see below)
%
%
outputs,
%
Ipts : A structure with the information about all detected Landmark points
%
Ipts.x , ipts.y : The landmark position
%
Ipts.scale : The scale of the detected landmark
%
Ipts.laplacian : The laplacian of the landmark neighborhood
%
Ipts.orientation : Orientation
in
radians
%
Ipts.descriptor : The descriptor
for
corresponding point matching
%
%
options,
%
Options.verbose : If
set
to
true
then
useful information is
%
displayed (default
false
)
%
Options.upright : Boolean
which
determines
if
we want a non-rotation
%
invariant result (default
false
)
%
Options.extended : Add extra landmark point information to the
%
descriptor (default
false
)
%
Options.tresh : Hessian response treshold (default 0.0002)
%
Options.octaves : Number of octaves to analyse(default 5)
%
Options.init_sample : Initial sampling step
in
the image (default 2)
%
%
Example 1, Basic Surf Point Detection
%
% Load image
%
I=imread(
’TestImages/test.png’
);
%
% Set this option to
true
if
you want to see more information
%
Options.verbose=
false
;
%
% Get the Key Points
%
Ipts=OpenSurf(I,Options);
%
% Draw points on the image
%
PaintSURF(I, Ipts);
%
%
Example 2, Corresponding points
%
% See, example2.m
%
%
Example 3, Affine registration
%
% See, example3.m
%
%
Function is written by D.Kroon University of Twente (July 2010)
%
Add subfunctions to Matlab Search path
functionname=’OpenSurf.m’;
functiondir=which(functionname);
functiondir=functiondir(1:end-length(functionname));
addpath([functiondir ’/SubFunctions’])
%
Process inputs
defaultoptions=struct(’tresh’,0.0002,’octaves’,5,’init_sample’,2,’upright’,false,’extended’,false,’verbose’,false);
if(~exist(’Options’,’var’)),
Options=defaultoptions;
else
tags = fieldnames(defaultoptions);
for i=1:length(tags)
if(~isfield(Options,tags{i})), Options.(tags{i})=defaultoptions.(tags{i}); end
end
if(length(tags)~=length(fieldnames(Options))),
warning(’register_volumes:unknownoption’,’unknown options found’);
end
end
%
Create Integral Image
iimg=IntegralImage_IntegralImage(img);
%
Extract the interest points
FastHessianData.thresh = Options.tresh;
FastHessianData.octaves = Options.octaves;
FastHessianData.init_sample = Options.init_sample;
FastHessianData.img = iimg;
ipts = FastHessian_getIpoints(FastHessianData,Options.verbose);
%
Describe the interest points
if(~isempty(ipts))
ipts = SurfDescriptor_DecribeInterestPoints(ipts,Options.upright, Options.extended, iimg, Options.verbose);
end
3 仿真结果
4 参考文献
[1]李冬梅. 基于SURF算法的红外与可见光图像配准[J]. 信息工程期刊, 2012(2).
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
-
2023年血糖新标准公布,不是3.9-6.1,快来看看你的血糖正常吗? 2023-02-07
-
2023年各省最新电价一览!8省中午执行谷段电价! 2023-01-03
-
GB 55009-2021《燃气工程项目规范》(含条文说明),2022年1月1日起实施 2021-11-07
-
PPT导出高分辨率图片的四种方法 2022-09-22
-
2023年最新!国家电网27家省级电力公司负责人大盘点 2023-03-14
-
全国消防救援总队主官及简历(2023.2) 2023-02-10
-
盘点 l 中国石油大庆油田现任领导班子 2023-02-28
-
我们的前辈!历届全国工程勘察设计大师完整名单! 2022-11-18
-
关于某送变电公司“4·22”人身死亡事故的快报 2022-04-26
