SHARE
TWEET

Untitled

a guest Sep 18th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. clear all;
  2.  
  3. tire = imread('tire.tif');
  4. tire_negative = 255 - tire;
  5.  
  6. imshow(tire);
  7. title('Tire');
  8. figure
  9. imhist(tire);
  10. title('Tire hist');
  11. figure
  12. imshow(tire_negative);
  13. title('Tire negative');
  14. figure
  15. imhist(tire_negative);
  16. title('Tire negative hist');
  17.  
  18. % power law transformation
  19. gamma_05 = 0.5;
  20. gamma_13 = 1.3;
  21.  
  22. figure
  23. im_gamma_05 = im2double(tire).^gamma_05;
  24. imshow(im_gamma_05);
  25. title('Tire with Power-Law Transformation of 0.5');
  26. figure
  27. imhist(im_gamma_05);
  28. title('Tire with Power-Law Transformation of 0.5 - Histogram');
  29.  
  30. figure
  31. im_gamma_13 = im2double(tire).^gamma_13;
  32. imshow(im2double(tire).^gamma_13);
  33. title('Tire with Power-Law Transformation of 1.3');
  34. figure
  35. imhist(im_gamma_13);
  36. title('Tire with Power-Law Transformation of 1.3 - Histogram');
  37.  
  38. % histogram equalization
  39. equalized_im = histeq(tire);
  40. figure
  41. imshow(equalized_im);
  42. title('Equalized Tire Image');
  43. figure
  44. imhist(equalized_im);
  45. title('Equalzied Tire Image - Histogram');
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top