How to read in python a image 32-bit real (no signed, or unsigned, but real)?

42 Views Asked by At

I'm having some problems opening a binary image in python. I can open it in imageJ going to FILE>IMPORT>RAW and using the option 32-bit real and little endian. After opening the image with ImageJ, I can see floating point numbers (floats) as pixel values, but I need to know how to open it in python. I would appreciate if someone can give me a clue.

Thanks a lot.

PS: If I use

with open(f0) as f:
  numpy_data = np.fromfile(f, np.dtype("<i2"))

I can see a similar picture, but with lots of noise!

0

There are 0 best solutions below