Advertisement
lamiastella

graythresh

Feb 7th, 2017
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. >> D=cat(3, M, T, S);
  2. >> size(D)
  3.  
  4. ans =
  5.  
  6. 1080 1920 9
  7.  
  8. >> [m,n,q]=size(M)
  9.  
  10. m =
  11.  
  12. 1080
  13.  
  14.  
  15. n =
  16.  
  17. 1920
  18.  
  19.  
  20. q =
  21.  
  22. 3
  23.  
  24. >> E = reshape(D,[],size(D,3));
  25. >> size(E)
  26.  
  27. ans =
  28.  
  29. 2073600 9
  30.  
  31. >> [~,~,F] = unique(E,'rows');
  32. >> result=reshape(F, [m,n]);
  33. >> image(result)
  34.  
  35. >> size(result)
  36.  
  37. ans =
  38.  
  39. 1080 1920
  40.  
  41. >> level=graythresh(result)
  42.  
  43. level =
  44.  
  45. 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement