资源简介
基于薄板样条的图像配准MATLAB代码,已测试可以正常运行

代码片段和文件信息
function out = idwMvInterp(imgw map maxhw p )
% Description:
% Fill holes using Inverse Distance Weighting interpolation
%
% Inputs:
% imgw - input image
% map - Map of the canvas with 0 indicating holes and 1 indicating pixel
% maxhw - Radius of inverse weighted interpolation
% p - power for inverse weighted interpolation
%
% Output:
% out - interpolated image
%
% Author: Fitzgerald J Archibald
% Date: 23-Apr-09
outH = size(imgw1);
outW = size(imgw2);
out = imgw;
[yi_arr xi_arr] = find(map==0); % Find locations needing fill
if isempty(yi_arr) == false
color = size(imgw3);
for ix = 1:length(yi_arr)
xi = xi_arr(ix);
yi = yi_arr(ix);
% Find min window which has non-hole neighbors
yixL=max(yi-maxhw1);
yixU=min(yi+maxhwoutH);
xixL=max(xi-maxhw1);
xixU=min(xi+maxhwoutW);
% use inverse distance weighting filter for filling
mapw = map(yixL:yixUxixL:xixU);
if isempty(find(mapw 1)) == false
wk = compWk(mapw xi-xixL+1 yi-yixL+1 p); % compute weights for interpolation
for colIx = 1:color
out(yixicolIx) = idw(imgw(yixL:yixU xixL:xixU colIx) mapw wk); % interpolation
end
end
end
end
return;
% compute wk
function wk = compWk(map cx cy p)
[hw] = size(map);
[xy] = meshgrid(1:h1:w);
y=(y-cx).^2;
x=(x-cy).^2;
d2=x+y; % square of distance
wk = 1./(d2‘.^(p/2));
return;
% Inverse distance weighting
function out = idw(in map wk)
num=sum(double(in(find(map))).*wk(find(map))); % weight the available pixel values among the neighbors
den=sum(wk(find(map))); % sum of contributing weights within radius r
out = num / den;
return
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-06-27 11:22 tpsWarp\
目录 0 2015-06-27 10:54 tpsWarp\data\
文件 110614 2014-02-12 12:48 tpsWarp\data\0505_02.jpg
文件 2083861 2014-02-12 12:48 tpsWarp\data\MOV03798.MPG
目录 0 2015-06-27 10:54 tpsWarp\doc\
文件 316851 2014-02-12 12:48 tpsWarp\doc\readme.pdf
文件 1800 2014-02-12 12:48 tpsWarp\idwMvInterp.m
文件 2199 2014-02-12 12:48 tpsWarp\interp2d.m
文件 2185 2014-02-12 12:48 tpsWarp\map.mat
文件 1400 2014-02-12 12:48 tpsWarp\nearestInterp.m
文件 399 2014-02-12 12:48 tpsWarp\tpsDemoLandmark.mat
文件 3893 2015-06-29 09:03 tpsWarp\tpswarp.m
文件 2245 2015-06-27 11:02 tpsWarp\tpsWarpDemo.m
- 上一篇:64QAM系统性能的分析
- 下一篇:双边滤波 图像增强
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论