I want to convert a float32
image into uint8
image in Python.
I tried using the following code, but the output image only has values like 2 and 3 so the image is practically black.
gen_samples[0] * 255).round().astype(np.uint8)
When I try displaying the float32
image I get a blackish/greyish image where I can somewhat make out the required image.