问题
I want to try view the image using spyder python as in:
skydrive share the image is:
- uint16 (10-bit)
- width:1376 pixel, height: 960 pixel
- no header
- bayer pattern blue-green, green-red
What python script is suitable?
Thanks.
回答1:
Here is one way.
Start with imports
from matplotlib import pyplot as plt
import numpy as np
Now allocate the space
image = np.empty((1376,960), np.uint16)
Read the image into your array:
image.data[:] = open('20_1-20ms.raw').read()
Display it:
plt.imshow(image)
来源:https://stackoverflow.com/questions/15069028/read-and-display-raw-image-using-python