Facebook
From Baby Moth, 4 Years ago, written in Matlab M-file.
Embed
Download Paste or View Raw
Hits: 223
  1. o = imread('obrazy testowe/01_h.jpg');
  2. subplot(2, 2, 1);
  3. imshow(o);
  4. subplot(2, 2, 2);
  5. imshow(o(:,:,1));
  6. subplot(2, 2, 3);
  7. imshow(o(:,:,2));
  8. subplot(2, 2, 4);
  9. imshow(o(:,:,3));
  10.  
  11. im = o(:,:,2);
  12. subplot(2, 2, 1);
  13. imshow(im);  
  14.  
  15. %bothat
  16. im = imbothat(im, ones(9,9));
  17. subplot(2, 2, 2);
  18. imshow(im);
  19.  
  20. %gamma correcion
  21. im = imadjust(im);
  22. subplot(2, 2, 3);
  23. imshow(im);  
  24.  
  25. %thresholding
  26. im = im2bw(im, graythresh(im));
  27. subplot(2, 2, 4);
  28. imshow(im);
  29.  
  30.  
  31.  
  32.