ee 610 project 2 report
Post on 04-Apr-2018
220 Views
Preview:
TRANSCRIPT
-
7/29/2019 EE 610 Project 2 Report
1/11
EE 610 Project 2 Report
Using Phantom Image for the Project of size 128x128
1) Applying the Shading FunctionsI_phantom_shaded(:,:,i) = I_phantom.*abs(b1(:,:,i));
2) Getting the Undersampled Data for 15,20 and 30 Spokes% Radially Undersampled Datafor i=1:8a = radon(I_phantom_shaded(:,:,i),0:spoke_gap:179);I_US_data(:,:,i) = a;I_US(:,:,i) = iradon(a,0:spoke_gap:179,Im_size);
End
3) Plot for the Shaded Phantom
-
7/29/2019 EE 610 Project 2 Report
2/11
4) Defining A Matrix for the Radial Data and accordingly defining the Objective Functions
% Objective Function
function res =objective(x,dx,t,data,lambdaTV,lambdaFOV,lambdaPOS,lambdaL1,spoke_gap,Im_size) x=x+t*dx;obj = (radon(x,0:spoke_gap:179)-data) ;tv = lambdaTV*totVar(x);fov = lambdaFOV*calc_fov(x);pos = lambdaPOS*calc_POS(x);L1 = lambdaL1*calc_L1(x);
res=0.5*obj(:)'*obj(:) + tv +fov + pos + L1 ;end
% Gradient of the Objective Functionfunction grad =
wGradient(x,data,lambdaTV,lambdaFOV,lambdaPOS,lambdaL1,spoke_gap,Im_size) % and Gradient of the Total% Variation Operator
gradObj=grdObj(x,data,spoke_gap,Im_size); grdTV = lambdaTV*gTV(x);
-
7/29/2019 EE 610 Project 2 Report
3/11
grdFOV = lambdaFOV*calc_grad_fov(x);grdPOS = lambdaPOS*calc_grad_POS(x);grdL1 = lambdaL1*calc__grd_L1(x);grad =gradObj + grdTV +grdFOV + grdPOS + grdL1 ;
end
% Computes the Gradient of the Objective Functionfunction grObj = grdObj(x,data,spoke_gap,Im_size)
grObj = iradon(radon(x,0:spoke_gap:179)-data,0:spoke_gap:179,Im_size);end
Total Variation Function and Gradient Definition :
function tot_var = totVar(x)% Defining the Total Variation Operator using 1st Order DerivativesD_x = filter2([1 -1 0],x,'same');D_y = filter2([1;-1;0],x,'same');
tot_var = sum(sum(sqrt(D_x.*conj(D_x)+D_y.*conj(D_y))));end
function grad = gTV(x)% Compute gradient of TV operator
D_x = filter2([1 -1 0],x,'same');D_y = filter2([1;-1;0],x,'same');D_xx = filter2([0 -1 1],D_x,'same');D_yy = filter2([0;-1;1],D_y,'same');
grad = D_xx+D_yy;end
For FOV Function Field of View used :
% Computes FOV Operatorfunction fov = calc_fov(x)
y = I_seg.*x;fov = sum(sum(y.*conj(y)));
end
% Computes grad FOV Operatorfunction grd_fov = calc_grad_fov(x)
y = I_seg.*x;grd_fov = sum(sum(2*abs(y)));end
-
7/29/2019 EE 610 Project 2 Report
4/11
For FOV Function Field of View use
% Computes POS Operator
function fov = calc_POS(x)for i=1:Im_size
for j=1:Im_sizeif (x(i,j)
-
7/29/2019 EE 610 Project 2 Report
5/11
-
7/29/2019 EE 610 Project 2 Report
6/11
Restored Images for the Same :
-
7/29/2019 EE 610 Project 2 Report
7/11
Images for 30 Spokes ->
-
7/29/2019 EE 610 Project 2 Report
8/11
-
7/29/2019 EE 610 Project 2 Report
9/11
Reconstructed Images for 30 Spokes:
-
7/29/2019 EE 610 Project 2 Report
10/11
Images for 40 Spokes->
-
7/29/2019 EE 610 Project 2 Report
11/11
Restored Images for 40 Spokes->
top related