Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. % read images
  2. image_1=readNPY('image_1.npy');
  3. image_2=readNPY('image_2.npy');
  4. ...
  5. image_12=readNPY('image_12.npy');
  6.  
  7. % change from type uint16 to double and calculate the maximum
  8. image1=double(image_1);
  9. image1MAX=max(max(image1));
  10. ...
  11. image12=double(image_12);
  12. image12MAX=max(max(image12));
  13.  
  14. % normalizes to the maximum
  15. reference = exp(-1)
  16. IMAGE1=fix(image1./image1MAX/reference);
  17. ...
  18. IMAGE12=fix(image12./image12MAX/reference);
  19.  
  20. % calculate the spot size
  21. spot_image1 = 2*sqrt(size(nonzeros(IMAGE1),1)/pi)/1000;
  22. ...
  23. spot_image12 = 2*sqrt(size(nonzeros(IMAGE12),1)/pi)/1000;
  24.  
  25. % plot the spot size
  26. spot = [spot_image1 spot_image2 ... spot_image12]
  27. xvalue = [1 2 3 4 5 6 7 8 9 10 11 12]
  28. plot(xvalue, spot)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement