Code covered by the BSD License  

Highlights from
B-spline tools

B-spline tools

by

 

22 Mar 2010 (Updated )

Basic toolbox for polynomial B-splines on a uniform grid. OO overloading of common operators.

pyramid_example.m
A = imread('lena512.bmp');
A_sz = size(A);
A_max = double(max(A(:)));
A_min = double(min(A(:)));

A = A(1:(floor(A_sz(1)/2)*2),1:(floor(A_sz(2)/2)*2));

Ab = Bspline(double(A), 3);

Abr = reduce(Ab);
Abe = expand(Abr);

Abr_double = double(Abr);
Ab_double = double(Ab);
Abe_double = double(Abe);
10*log10(numel(A)*(A_max-A_min).^2 ./ sum(sum((Abe_double-Ab_double).^2)))

imshow(Abe_double/256);

Contact us