SHARE
TWEET

Untitled

a guest Oct 10th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear all;
  2. close all;
  3.  
  4. p = imread("Tygrys.bmp");
  5. I = cv.cvtColor(p,'RGB2XYZ');
  6. IZ = I(:,:,2);
  7. th = graythresh(IZ) * 255;
  8. B = IZ < th;
  9. imshow(B);
  10. IG = cv.cvtColor(p,'RGB2GRAY');
  11. th = graythresh(IG) * 255;
  12. C = IG < th;
  13.  
  14. figure;
  15. imshow(C);
  16.  
  17. D = bitxor(B,C);
  18. figure;
  19. imshow(D);
  20.  
  21. sum(D(:));
  22. IMGmean = cv.adaptiveThreshold(IG);
  23. IMGgaussian = cv.adaptiveThreshold(IG, 'Method', 'Gaussian');
  24.  
  25. figure;
  26. imshow(IMGmean);
  27. figure;
  28. imshow(IMGgaussian);
  29.  
  30. IMGNgaussian = imnoise(IG, 'gaussian');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top