% calls mex file pchirp20.c for zeroth order interp Steve Mann % pchirp21.c for first order (bilinear) interp % pchirp2ia.c user-specified Interp-order and Antialias method % % this is just a front end to the mexfile so you can have variable number of % input parameters % % resamples images according to 8 parameter p-chirp group % % Use: Y = pchirp2(p,X); % p-chirp parameter vector ``p'' acts on image ``X'' % % to produce a new image ``Y'' % % Example: p = corners2r([72/203,0, 0,319/320, 146/203,1/320, 202/203,307/320]); % tvs(pchirp2(p,red)); % tvs properly displays images that have NaN % pchirp2(p,red,3); % bi-cubic interpolation % pchirp2(p,red,3,1); % bi-cubic interp with method #1 (avg squares) % pchirp2(p,red,3,8); % bi-cubic interp with Becker octagon antialias function y=just_front_end_to_mex_file(p,x,interp_order,antialias_method,myNaN) if nargin < 2 disp('pchirp2: you must specify both the p-chirp vector and the input image') disp(' : ------------------------------------------------------------') return end%if if nargin < 3 disp('pchirp2: interp_order defaulting to 1') interp_order=1; end%if if nargin < 4 disp('pchirp2: antialias method defaulting to -1 (none)') antialias_method = -1; end%if if nargin < 5 disp('pchirp2: myNaN defaulting to NaN') myNaN = NaN; end%if % used to have separate programs %if interp_order==0 & antialias_method ==-1 %use pchirp20.c (0 order) %if interp_order==1 %use pchirp21.c (bilinear) % now we just use pchirp2ia for all of them y = pchirp2ia(p,x,interp_order,antialias_method,myNaN);