• 大小: 11KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-16
  • 语言: Matlab
  • 标签: image_stitch  

资源简介

图像拼接是一项应用广泛的图像处理技术。根据特征点的相互匹配,可以将多张小视角的图像拼接成为一张大视角的图像。附Matlab代码function [output_image] = image_stitching(input_A, input_B)

资源截图

代码片段和文件信息

function [newx newy newvalue] = ada_nonmax_suppression(xp yp value n)
% Adaptive non-maximun suppression 
% For each Harris Corner point the minimum suppression radius is the
% minimum distance from that point to a different point with a higher 
% corner strength. 
% Input:
% xpyp - coordinates of harris corner points
% value - strength of suppression
% n - number of interesting points
% Output:
% newx newy - new x and y coordinates after adaptive non-maximun suppression
% value - strength of suppression after adaptive non-maximun suppression
% %自适应非最大抑制
% %对于每个Harris Corner点,最小抑制半径为
% 从该点到具有更高点的不同点的最小距离%
% 角落强度%。
% %输入:
% %xp,yp - 哈里斯角点的坐标
% %value - 抑制强度
% %n - 有趣点数
% %输出:
% %newx,newy - 自适应非最大值抑制后的新x和y坐标
% %值 - 自适应非最大抑制后的抑制强度


% ALLOCATE MEMORY
% newx = zeros(n1);
% newy = zeros(n1);
% newvalue = zeros(n1);

if(length(xp) < n)
newx = xp;
newy = yp;
newvalue = value;
return;
end

radius = zeros(n1);
c = .9;
maxvalue = max(value)*c;
for i=1:length(xp)
if(value(i)>maxvalue)
radius(i) = 99999999;
continue;
else
dist = (xp-xp(i)).^2 + (yp-yp(i)).^2;
dist((value*c) < value(i)) = [];
radius(i) = sqrt(min(dist));
end
end

[~ index] = sort(radius‘descend‘);
index = index(1:n);

newx = xp(index);
newy = yp(index);
newvalue = value(index);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-11-03 20:29  pic_processing\
     文件        1433  2018-11-03 20:09  pic_processing\ada_nonmax_suppression.m
     文件        2445  2018-11-03 20:27  pic_processing\blend.m
     文件        1325  2018-11-03 20:12  pic_processing\dist2.m
     文件        1021  2018-11-03 20:10  pic_processing\getFeatureDescriptor.m
     文件         951  2018-10-19 16:44  pic_processing\getHomographyMatrix.m
     文件        1577  2018-11-03 20:28  pic_processing\getNewSize.m
     文件        1632  2018-11-03 20:06  pic_processing\harris.m
     文件        6604  2018-11-03 20:47  pic_processing\image_stitching.m
     文件         323  2018-10-21 17:00  pic_processing\image_stitching_3.m
     文件        1121  2018-10-19 16:44  pic_processing\ransacfithomography.m

评论

共有 条评论