获得RGB值的每个像素由在C语言的原始图像 [英] Getting RGB values for each pixel from a raw image in C

查看:669
本文介绍了获得RGB值的每个像素由在C语言的原始图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从一个原始图像读取每个像素的RGB值。谁能告诉我如何实现这一目标?感谢您的帮助!

I want to read the RGB values for each pixel from a raw image. Can someone tell me how to achieve this? Thanks for help!

我的原始图像的格式是.CR2它们来自摄像头。

the format of my raw image is .CR2 which come from camera.

推荐答案

迄今公布的方法都不可能用相机原始档案工作。该文件格式的原始文件是专有的每个制造商,并且可以包含曝光数据,校准常数和白平衡信息中,除了像素的数据,这将可能是在其中每个puxel占用一个以上的字节打包格式,但小于2。

None of the methods posted so far are likely to work with a camera "raw" file. The file formats for raw files are proprietary to each manufacturer, and may contain exposure data, calibration constants, and white balance information, in addition to the pixel data, which will likely be in a packed format where each puxel takes up more than one byte, but less than two.

我敢肯定有开源的原始文件转换计划在那里,你可以请教,找出使用的算法,但我不知道任何关闭我的头顶。

I'm sure there are open-source raw file converter programs out there that you could consult to find out the algorithms to use, but I don't know of any off the top of my head.


只是想一个额外的并发症。原始文件不存储每个像素的RGB值。每个像素只记录一个颜色。其他两种颜色必须从heighboring像素内插。你一定会好起来找到一个程序或库您的相机的作品。

just thought of an additional complication. The raw file does not store RGB values for each pixel. Each pixel records only one color. The other two colors have to be interpolated from heighboring pixels. You'll definitely be better off finding a program or library that works with your camera.

这篇关于获得RGB值的每个像素由在C语言的原始图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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