调整白平衡
我正在研究一些用于白平衡操作的图像处理算法。看起来之前的 Stackoverflow 问题很好地回答了自动白平衡算法的问题。
但是我想知道如何从一种温度转换为另一种温度,即假设(这是一个很大的假设)白平衡算法可以拍摄处理后的图像(例如 JPEG 等)并将场景中的整体温度设置为 6500 ,您如何通过算法将场景“冷却”或“加热”到特定温度?这将是图像编辑程序中的常见操作,尽管这些通常对未应用处理(色彩空间操作或其他)的 RAW 图像进行操作 - 对于 RAW 文件 - 也许各个 RAW 文件包含足够的信息(在文件头)关于相机传感器的颜色校准以使特定的温度转换更具确定性?
任何意见表示赞赏 - 谢谢!
I'm looking at some image processing algorithms for white balance manipulations. Seems like a previous Stackoverflow question answers the question of automatic white balance algorithms rather well.
However I'm wondering how to convert from one temperature to another, i.e. Making the assumption (and its a big assumption) that a white balance algorithm could take a processed image (e.g. JPEG etc) and place the overall temperature in a scene at 6500, how would you algorithmically "cool" or "warm" the scene to a specific temperature? This would be a common operation in an image editing program, albeit these typically operate on RAW images which have no processing applied (colour space manipulation or otherwise)- In the case of RAW files - perhaps the individual RAW files contain sufficient information (in the file header) regarding the colour calibration of the camera sensor to make the specific temperature transformation more deterministic?
Any input appreciated - thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您处理 RAW 图像,则可以使用 Von Kries 的命题 - 并乘以 3x3 对角线增益矩阵。
为了找到这 3 个数字,您可以在一定的照明下拍摄一个“白色”的物体 - 例如 MacBeth颜色检查器
如果您无法做到这一点,请尝试使用一些自动白平衡算法。
在 JPEG 中处理 WB 是有问题的,因为它通常是在非线性函数 - Gamma 之后。
需要应用反Gamma功能,才可以进行白平衡。
If you work on RAW image, you can use Von Kries's proposition - and multiply by 3x3 diagonal gain matrix.
In order to find these 3 numbers, you can photograph under some illumination an object which is "white" - like MacBeth ColorChecker
If you can't do this, try to use some Automatic White Balance Algorithms.
Processing WB in JPEG is problematic since it is usually after non-linear function - Gamma.
You need to apply inverse Gamma function, and only then you will be able to do white balance.
此类问题的标准参考是 Charles Poynton 颜色常见问题解答,此问题的答案如下:http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFoC20。希望通过阅读常见问题解答的其他部分,您将了解如何填充矩阵。
The standard reference for this kind of question is the Charles Poynton Color FAQ, and this question is answered here: http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html#RTFToC20. Hopefully by reading other parts of the FAQ you will get an understanding of how to populate the matrix.
白平衡只是 RAW 图像的 EXIF 文件头中的一项设置。它是一个短整数,意味着您可以在其中写入所需的色温设置。
The White Balance is just a setting in the EXIF file header of a RAW image. It is a short integer meaning that you can write your desired colour temperature setting in there.