Summary: This module provides a MATLAB program for processing Synthetic Aperture Radar (SAR) data as well as the references for our project.
function img = sar_lin(f,az_lin,iq_lin)
% INITIALIZATION
R=4*pi*f/3e8;% Transformation of Time Freqeuncy to Spatial Frequency
A=pi/180*az_lin;% Transformation of Angle in degree to radians
for j=1:147
A(j)=A(j)-2*pi;% Adjustment so that all angular values are between 0 and pi
end
% Initialization of Cartesian Grid
X=zeros(1,175);
Y=zeros(175,1);
for j=1:175
X(j)=208+(j-1);
Y(j)=208+(j-1);
end
val=zeros(175);% Initialize the matrix of values in the cartesian grid.
% INTERPOLATOR
for j=1:175
j % Update on how far we are.
for k=1:175
r=sqrt(X(j)^2+Y(k)^2);
a=atan(Y(k)/X(k));
if (r>R(1) & r<R(512))
% Data index of cartesian point
J=ceil((r-R(1))*511/(R(512)-R(1)));
K=ceil((a-A(1))*1540/(A(1541)-A(1)));
% Linearly interpolate the cartesian point with its 4 nearest neighbor polar data points.
% Interpolate in R
v0 = 1/(R(J+1)-R(J)) * ( iq_lin(J,K)*(R(J+1)-r) + iq_lin(J+1,K)*(r-R(J)) );
v1 = 1/(R(J+1)-R(J)) * ( iq_lin(J,K+1)*(R(J+1)-r) + iq_lin(J+1,K+1)*(r-R(J)) );
% Interpolate in THETA
val(j,k) = 1/(A(K+1)-A(K)) * ( v0*(A(K+1)-a) + v1*(a-A(K)) );
end
end
end
% Plot the interpolated values
figure(1)
imagesc(abs(val));
% Take the 2d inverse DFT to get the image
img = ifft2(val);
% Plot the image
figure(2)
imagesc(abs(img));