Advertisement
Guest User

lab2

a guest
Mar 29th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. clear all
  2.  
  3. IMG = imread('kierowca.png');
  4.  
  5.  
  6. %Y1=0.299*IMG(:,:,1)+0.587*IMG(:,:,2)+0.114*IMG(:,:,3);
  7. IMG_GRAY = rgb2gray(IMG);
  8.  
  9. %jasnosc(image)
  10. %kontrast(image, jasnosc(image))
  11. subplot(2,3,1);
  12. imshow(IMG_GRAY, [0,255]);
  13. title('#1');
  14.  
  15. %stala
  16. imageConst=double(IMG_GRAY)+15;
  17. subplot(2,3,2);
  18. imshow(imageConst, [0,255]);
  19. title('Stala');
  20.  
  21. %mnozenie
  22. imageMu= min(double(IMG_GRAY)*2, 255);
  23. subplot(2,3,3);
  24. imshow(imageMu, [0,255]);
  25. title('Mnozenie');
  26.  
  27. %potegowanie
  28. pot=min(double(IMG_GRAY).^(0.9), 255);
  29.  
  30. %pot=double(image);
  31. %pot=pot.^0.1;
  32. %pot=pot-min(min(pot));
  33. %pot2=(pot/max(max(pot)))*255;
  34. subplot(2,3,4);
  35. imshow(pot, [0,255]);
  36. title('Potegowanie');
  37.  
  38. %pier
  39. P = double(IMG_GRAY);
  40. subplot(2,3,5);
  41. P=P*sqrt(1.92);
  42. imshow(P, [0, 255]);
  43. title('Pierwiastek');
  44.  
  45. %log
  46.  
  47.  
  48. gg = min(double(IMG_GRAY) / log(2), 255);
  49. ggT = gg - min(min(gg));
  50. gg = (ggT / max(max(ggT))) * 255;
  51. subplot(2,3,6);
  52. imshow(gg, [0, 255]);
  53. title('Logarytm');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement