Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Učitati sliku chalk.tif i korigovati osvetljenje koristeći gama korekciju sa faktorom 1.5.
- '''
- import plotly.express as px
- from skimage import io
- img = io.imread('chalk.tif')
- fig = px.imshow(img)
- fig.show()
- import numpy as np
- def gammaCorrection(input, gamma):
- c = 255 ** (1 - gamma)
- LUT = c * np.arange(0, 256) ** gamma
- LUT = LUT.astype('uint8')
- return LUT[input]
- img_gamma = gammaCorrection(img, 1.5)
- fig = px.imshow(img_gamma)
- fig.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement