I want to read single-channel 32-bit integer image saved as ssv file. I have tried so far(see the following code) but without much success.
Please let me know if you have any idea of what is missing?
You as user should have the necessary information about this image-data which is needed. I can only assume things and work on that.
Opening the file it seems it's:
Follwing above and ImageJ's docs:
Opens a tab-delimited text file as a 32-bit real image
i would do:
import numpy as np
import matplotlib.pyplot as plt # just for demo
img_raw = np.loadtxt('test.ssv', dtype=float) # casting-early to float
img_float_01 = img_raw / 4294967295. # max uint32 # normalize to float in [0, 1]
plt.imshow(img_raw, cmap='gray')
plt.show()
which outputs:
So it seems we successfully read that image into a numpy-array.
You need now to:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.