StevanovicMilan

10.8

Sep 18th, 2021
1,002
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. '''
  2. Učitati sliku 2_PET.png i odrediti njen negativ.
  3. Prikazati dobijenu sliku u okviru jet i hsv mape boja.
  4. '''
  5.  
  6. import plotly.express as px
  7. from skimage import io
  8.  
  9. img = io.imread('2_PET.png')
  10. fig = px.imshow(img, color_continuous_scale='gray')
  11. fig.show()
  12.  
  13. img_neg = 255 - img
  14. fig = px.imshow(img_neg, color_continuous_scale='gray')
  15. fig.show()
  16.  
  17. fig = px.imshow(img_neg, color_continuous_scale='jet')
  18. fig.show()
  19.  
  20. from matplotlib.cm import get_cmap
  21.  
  22. cmap = get_cmap('hsv', lut = 256)
  23. img_color = cmap(img_neg)
  24.  
  25. fig = px.imshow(img_color)
  26. fig.show()
RAW Paste Data