【发布时间】:2017-07-31 20:40:47
【问题描述】:
使用以下python读取并显示(灰度)RAW图像:
import numpy as np
import matplotlib.pyplot as plt
path = 'path\\to\\where\\image\\is\\downloaded'
f = open(path,'rb')
height = 2500
width = 1000
bin_image = np.fromstring(f.read(), dtype=np.uint16)
bin_image.shape = (height, width)
plt.imshow(bin_image)
plt.show(block=True)
我可以找到bayer (RAW) 数据的链接 here bin_image.txt
我不确定是什么原因造成的?
【问题讨论】:
-
您要显示的图像是什么?!可以发一下原图吗?
-
你需要展示一个最小的、完整的、可验证的例子。这意味着有足够的代码可以实际运行以及任何必要的支持材料,例如图像。
-
当您说“RAW”图像时,您是指来自传感器的原始(未调整、未补偿)图像,就像某些相机可以做到的那样?如果是这样,您可能需要调整/补偿。你尝试过非 RAW 图片捕捉,看起来还可以吗?
-
这看起来像一个拜耳图像,被视为只是灰度并以假彩色显示。
-
我没有投反对票。我提出了先改进问题的建议,如果没有得到改进,以后可能会考虑否决。
标签: python image opencv image-processing