Author: Not specified Language: matlab
Description: Not specified Timestamp: 2017-10-11 04:54:49 +0000
View raw paste Reply
  1. %Edge phantom with resolution (-10:0.1:10)
  2. %Change resolution accordingly
  3. x=-10:0.1:10;
  4. y=-10:0.1:10;
  5. [x1, y1] = meshgrid(x,y);
  6.  
  7. %Change to h2 accordingly
  8. h1 = (1/4).*exp(-(x1.^2+y1.^2))+abs((x1.*sinc(x1.^2)).*(sinc(y1/16)/16));
  9. mesh(x1, y1, h1);
  10.  
  11. length_x=size(x1, 2)
  12. length_y=size(y1,1);
  13. phan_size_x=16;
  14. phan_size_y=10;
  15. phan_x1=repmat(mod((1:length_x), phan_size_x+1)>(phan_size_x/2), [1. length_y 1]);
  16.  
  17. edge_x=repmat([ones(1,100) ,zeros(1,100)],[200,1]);
  18. surf(edge_x)
  19. result_edge_x=conv2(edge_x,h1);
  20. esf_x=mean(edge_x,1);
  21. figure(1);
  22. title('Edge Phantom with Resolution of (-20:0.1:20)');
  23.  
  24.  
  25.  
View raw paste Reply