Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. #Zad1
  2. img = imread('rzeczka2.png');
  3.  
  4. img_double = double(img);
  5.  
  6. imgtemp(:,:,3) = img_double(:, :, 1);
  7. imgtemp(:,:,1) = img_double(:, :, 3);
  8. imgtemp(:,:,2) = img_double(:, :, 2);
  9.  
  10.  
  11. #Zad2
  12.  
  13. img = imread('rzeczka2.png');
  14.  
  15. img_double = double(img);
  16.  
  17.  
  18. subplot(2,2,1);
  19. imhist(img);
  20. ylim([0 15000]);
  21.  
  22.  
  23. subplot(2,2,2) ;
  24. imhist(img(:,:,1));
  25. ylim([0 7000]);
  26.  
  27. subplot(2,2,3) ;
  28. imhist(img(:,:,2));
  29. ylim([0 7000]);
  30.  
  31. subplot(2,2,4) ;
  32. imhist(img(:,:,3));
  33. ylim([0 9000]);
  34.  
  35. #Zad3
  36. img = imread('rzeczka2.png');
  37.  
  38. img_double = double(img);
  39.  
  40.  
  41. subplot(2,2,1);
  42. imhist(img*255);
  43. ylim([0 15000]);
  44.  
  45.  
  46. subplot(2,2,2) ;
  47. imhist(img(:,:,1)*1.2);
  48. ylim([0 7000]);
  49. xlim([0 300]);
  50.  
  51.  
  52. subplot(2,2,3) ;
  53. imhist(img(:,:,2));
  54. ylim([0 7000]);
  55.  
  56. subplot(2,2,4) ;
  57. imhist(img(:,:,3));
  58. ylim([0 9000]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement