本文介绍了RAW图像文件 - 我的数据是什么格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理.raw图像文件,但我不确定图像是如何存储的。每个像素是无符号的16位值,典型值范围从0到大约1000(整数形式)。这对于十六进制值来说是不够的,而不是RGB(0-255),所以我不太确定它是什么。

I'm working on processing .raw image files, but I'm not sure how the image is being stored. Each pixel is a unsigned 16-bit value, with typical values ranging from 0 to about 1000 (in integer form). This isnt enough bits for hex values, and its not RGB (0-255) so I'm not quite sure what it is.

奖励:如果你有任何想法关于如何在OpenCV(或数学上)将其转换为灰度,这将是一个巨大的帮助。

Bonus: if you have any idea on how to convert this to grayscale in OpenCV (or just mathematically) that would be a huge help too.

推荐答案

名称RAW来自这样的事实:存储在文件中的值不是像素RGB值,而是从相机本身测量的原始值。只有当您知道相机如何工作时,这些值才有意义。有一些标准,但实际上,您应该只考虑RAW是一个定义不明确,未记录的专有格式的集合,可能不会直观地匹配您对图像存储方式的任何想法。

The name RAW comes from the fact that the values stored in the file are not pixel RGB values, but the raw values that were measured from the camera itself. The values have meaning only if you know how the camera works. There are some standards, but really, you should just consider RAW to be a collection of poorly defined, undocumented, proprietary formats that probably won't intuitively match any idea you have about how images are stored.

查看DCRaw - 几乎所有支持RAW的程序使用的代码

Check out DCRaw -- it's the code that nearly every program that supports RAW uses

作者反向设计并实施了几乎所有专有的RAW格式 - 并使其保持最新。

The author reverse-engineered and implemented nearly every proprietary RAW format -- and keeps it up to date.

这篇关于RAW图像文件 - 我的数据是什么格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 05:08