Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. I = imread('Lena.tif');
  2. R=I(:,:,1);
  3. G=I(:,:,2);
  4. B=I(:,:,3);
  5. figure
  6. subplot(411)
  7. imshow(I)
  8. title('Original image')
  9. subplot(412)
  10. T=imhist(R)
  11. bar(T,'r')
  12. subplot(413)
  13. Y=imhist(G)
  14. bar(Y,'g')
  15. subplot(414)
  16. U=imhist(B)
  17. bar(U,'b')
  18.  
  19.  
  20. P=histeq(R,64);
  21. O=histeq(B,64);
  22. L=histeq(G,64);
  23. figure
  24. subplot(411)
  25. imshow(cat(3,P,O,L))
  26. title('Final')
  27. subplot(412)
  28. M=imhist(P)
  29. bar(M,'r')
  30. subplot(413)
  31. N=imhist(O)
  32. bar(N,'g')
  33. subplot(414)
  34. Z=imhist(L)
  35. bar(Z,'b')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement