function [outimg]=xy2rt(inimg,cx,cy,Nr,Nt)

[Nx Ny]=size(inimg);
[xi yi]=meshgrid(1:Ny,1:Nx);

[th r]=meshgrid(Nt,Nr);

xo=cx+r.*cos(th);
yo=cy+r.*sin(th);

outimg=interp2(xi,yi,inimg,xo,yo,'*linear'); 


outimg(find(isnan(outimg)))=0;

