% 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 % % Non-cropping version of pchirp2 % % Use: [F,Ml,Nl] = pchirp2nocrop(p,E,interp_order,antialias_method,myNaN,BB); % returns lower M and lower N % % calls pchirp2 function [F,Ml,Nl]=thiscallspchirp2(p,E,interp_order,antialias_method,myNaN,BB) if min(size(p)) ~=1 [Mp Np]=size(p); dis('pchirp2nocropw: input must be a vector, you put in a %d by %d matrix',Mp,Np) error(' pchirp2nocrop exiting...') end%if if length(p) ~= 8 dis('pchirp2nocrop: input vector must be 8 long, yours is %d long',length(p)) error(' pchirp2nocrop exiting...') end%if if nargin < 2 disp('pchirp2nocrop: you must specify both p-chirp vector and input image') disp(' : ----------------------------------------------------') return end%if if nargin < 3 disp('pchirp2nocrop: interp_order defaulting to 1') interp_order=1; end%if if nargin < 4 disp('pchirp2nocrop: antialias method defaulting to -1 (none)') antialias_method = -1; end%if if nargin < 5 disp('pchirp2nocrop: myNaN defaulting to NaN') myNaN = NaN; end%if if nargin < 6 disp('pchirp2nocrop: boundingbox defaulting to boundingbox(p)') [Ml,Nl,Mh,Nh] = boundingbox(p); else%if Ml=BB(1); Nl=BB(2); Mh=BB(3); Nh=BB(4); end%if % round offset to integer lattice, so smooth composite can be made. [M,N] = size(E); Ml=round(M*Ml)/M; Mh=round(M*Mh)/M; Nl=round(N*Nl)/N; Nh=round(N*Nh)/N; dis('pchirp2nocrop: rounding to integer translation: Ml=%g; Nl=%g; Mh=%g; Nh=%g',... Ml,Nl,Mh,Nh); % compute output boundingbox size M_out = M*(Mh-Ml); N_out = N*(Nh-Nl); % translate by Ml and Nl in the inverse space p_trans = [1 0 Ml 0 1 Nl 0 0]; F = pchirp2ia(pcompose(p,p_trans),E,interp_order,antialias_method,myNaN,M_out,N_out,0); % 0 for no output scaling