Code covered by the BSD License
B-spline toolbox
bspline0( x ) B-spline function of 0th order
bspline1( x ) B-spline function of 1st order
bspline2( x ) B-spline function of 2nd order
bspline3( x ) B-spline function of 3rd order
bspline3dtrans( x ) Direct transform specialised for 3rd order bspline
bspline4( x ) B-spline function of 4th order
bsplineNdtrans( x, N, bou... bsplineNdtrans - polynomial B-spline direct transform
bsplineNidtrans( x, N, bo... bsplineNdtrans - polynomial B-spline direct transform
bsplineNkernel(k,n,m) centered B-spline kernel of order n, expansion factor m
calcBsplineRoot( N ) Calculate the roots for the direct filter coefs (z polynomial) of an Nth
calcBsplineRootTable( )
evalBsplineN1dim( c, n, x... Evaluate B-spline across 1st non-singleton dimension
evalBsplineNpoint( c, n, ... Evaluate centered spline at single point
evalBsplineNpoints( c, n,... Evaluate polynomial B-spline at an array of points
filterAPfwd1ord( x, zi ) filterAPfwd1ord - forward direction 1st order allpole filter
filterAPrev1ord( x, zi ) filterAPrev1ord - reverse direction 1st order allpole filter
filterAPsym2ord( x, zi, b... filterAPsym2ord - symmetrical 2. order allpole filter
filterFIR( b, x, boundary... filterFIR - FIR filter with functional boundary conditions
filterFIRmirror(b,x)
forward1ordAp_simple( x, ... forward direction 1st order allpole filter
idtrans_FIR_coefs(N) Use a precalculated table for low-order splines
mirrorbound_1(x, bidx, bdms) Calculate mirrored data off boundary of x, in dimension bdm
mirrorbound_2(x, bidx, bdms)
mirroridx(idx,M)
mirroridx_hs(idx,M)
mirrorpad(x, m)
resample_spline3() Spline 3 resampler which supports the image processing toolbox interface
reverse1ordAp_simple( cp,... reverse direction 1st order allpole filter
symm2ordAp_simple( x, zi ) symmetrical 2. order allpole filter
testBsplineN
testBsplineObject
testFilters
testMscale
testPadding
u2N_FIR_coefs(N) u2n_FIR_coefs - filter coefficients for B-spline scale relation
y=bsplineGeneralN(x,n) B-spline function of order n
y=bsplineN(x,n) B-spline function of order n
Bspline
MscaleBspline
pyramid_example.m
View all files
B-spline tools
by
Jan Tore Korneliussen
22 Mar 2010
(Updated
08 May 2011 )
Basic toolbox for polynomial B-splines on a uniform grid. OO overloading of common operators.
u2N_FIR_coefs(N)
function [u2N, c] = u2N_FIR_coefs(N)
% u2n_FIR_coefs - filter coefficients for B-spline scale relation
%
% [u2N, c] = u2N_FIR_coefs(N) generates the FIR filter u2N which relates two
% scalings of the b-spline basis:
%
% b_N_2 = c*conv(u2N, b_N)
%
% where b_N and b_N_2 are two discretized versions of the basic B-spline
% of order N, b_N_2 is dilated with a factor of two:
%
% b_N_2 = beta_N(k/2) for k = -Inf, Inf
% b_N = beta_N(k) for k = -Inf, Inf
%
% c is an additional scale factor.
u2N = zeros(1,N+2);
c = 2^(-N);
for k = (-(N+1)/2):((N+1)/2);
u2N(k+(N+1)/2+1) = nchoosek((N+1),k+(N+1)/2);
end
Contact us