In [10]:
import otbApplication
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
In [16]:
file='obrazek.tiff'
Rescale = otbApplication.Registry.CreateApplication("Rescale")
Rescale.SetParameterString("in", file)
Rescale.SetParameterString("out", "rescaledImage.png")
Rescale.SetParameterOutputImagePixelType("out", 1)
Rescale.SetParameterFloat("outmin", 1)
Rescale.SetParameterFloat("outmax", 255)
Rescale.ExecuteAndWriteOutput()
Out[16]:
In [17]:
image = mpimg.imread("rescaledImage.png")
plt.imshow(image)
plt.show()
In [ ]: