使用python读取和显示原始图像 [英] read and display raw image using python

查看:57
本文介绍了使用python读取和显示原始图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想尝试使用spyder python查看图像,如下所示:

I want to try view the image using spyder python as in:

skydrive共享图像是:

  • uint16(10位)
  • 宽度:1376像素,高度:960像素
  • 没有标题
  • 拜耳图案蓝绿色,绿红色

哪种python脚本合适?

What python script is suitable?

谢谢.

推荐答案

这是一种方法.

从导入开始

from matplotlib import pyplot as plt
import numpy as np

现在分配空间

image = np.empty((1376,960), np.uint16)

将图像读入数组:

image.data[:] = open('20_1-20ms.raw').read()

显示它:

plt.imshow(image)

这篇关于使用python读取和显示原始图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆