No BSD License
-
DisplayPoints(Model, Scene, d...
-
DisplayPoints2D(Model, Scene,...
-
DisplayPoints3D(Model, Scene,...
-
[ret]=ml_GetPrivateProfileStr...
Usage: [ret]=ml_GetPrivateProfileString(AppName, KeyName, filename)
-
determine_border(Model, Scene...
-
gmmreg_cpd(config)
Example:
-
gmmreg_load_config(f_config)
-
tps_compute_kernel(x,z)
compute the kernel and basis matrix for thin-plate splines
-
gmmreg_cpd_demo.m
-
View all files
from
robust nonrigid point set registration
by Bing Jian
MATLAB implementation of two nonrigid point set registration algorithms
|
| tps_compute_kernel(x,z)
|
%% compute the kernel and basis matrix for thin-plate splines
%% reference: Landmark-based Image Analysis, Karl Rohr, p195
function [K] = tps_compute_kernel(x,z)
%%=====================================================================
%% $RCSfile: tps_compute_kernel.m,v $
%% $Author: bjian $
%% $Date: 2008/12/05 00:09:32 $
%% $Revision: 1.1 $
%%=====================================================================
[n, d] = size (x);
[m, d] = size (z);
% calc. the K matrix.
% 2D: K = r^2 * log r
% 3D: K = -r
K = zeros (n,m);
for i=1:d
tmp = x(:,i) * ones(1,m) - ones(n,1) * z(:,i)';
tmp = tmp .* tmp;
K = K + tmp;
end;
if d == 2
mask = K < 1e-10; % to avoid singularity.
K = 0.5 * K .* log(K + mask) .* (K>1e-10);
else
K = - sqrt(K);
end;
|
|
Contact us at files@mathworks.com