简体   繁体   English

我应该使用哪种浮点图像格式?

[英]Which floating-point image format should I use?

In the past I've saved RGB images (generated from physical simulations) as 8-bits/channel PPM or PNG or JPEG.过去,我将 RGB 图像(从物理模拟生成)保存为 8 位/通道 PPM 或 PNG 或 JPEG。

Now I want to preserve the dynamic range of the simulation output, which means saving a floating point image and then treating conversion to 8-bits/channel as a post-processing step (so I can tweak the conversion to 8-bit without running the lengthy simulation again).现在我想保留模拟 output 的动态范围,这意味着保存浮点图像,然后将转换为 8 位/通道作为后处理步骤(因此我可以在不运行再次进行冗长的模拟)。

Has a "standard" floating point image format emerged?是否出现了“标准”浮点图像格式?

Good free supporting libraries/viewers/manipulation tools, preferably available in Debian, would be a bonus.好的免费支持库/查看器/操作工具,最好在 Debian 中提供,将是一个奖励。

Have you looked into Radiance RGBE (.hdr) and OpenEXR (.exr).您是否研究过 Radiance RGBE (.hdr) 和OpenEXR (.exr)。 RGBE has some source code here . RGBE这里有一些源代码 NVIDIA and ATI both support EXR data in their graphics cards. NVIDIA 和 ATI 都在其显卡中支持 EXR 数据。 There are source code and binaries from the OpenEXR download page . OpenEXR 下载页面上有源代码和二进制文件。 ILM created OpenEXR and it has wide support. ILM 创建了 OpenEXR,并获得了广泛的支持。 OpenEXR has support for 16 and 32 bit floating point per channel, and is what most people use these days, unless they've written their own format. OpenEXR 支持每个通道的 16 位和 32 位浮点数,这是当今大多数人使用的,除非他们编写了自己的格式。

  • The Pixel Image Editor for linux has EXR support for editing, too. linux 的像素图像编辑器也支持 EXR 编辑。

  • pfstools is also necessary if you're going to work with HDR on linux.如果您要在 linux 上使用 HDR, pfstools也是必需的。 Its a set of command line programs for reading, writing and manipulating HDR and has Qt and OpenGL viewers.它是一组用于读取、写入和操作 HDR 的命令行程序,并具有 Qt 和 OpenGL 查看器。

  • Theres also jpeg2exr for linux还有用于 linux 的 jpeg2exr

  • Heres some other debian packages for OpenEXR viewers.下面是一些其他debian 包,适用于 OpenEXR 查看器。

  • Based on this, it looks like theres also a Gimp plugin somewhere.基于此,看起来某处还有一个Gimp 插件

It looks like the modern incarnation of FITS would fit your stated needs, but I would also suggest you consider using a 2D histogram structure from one of the good analysis packages in wide use by the physics community: ROOT or AIDA are the modern ones that I am familiar with.看起来FITS的现代化身可以满足您的既定需求,但我也建议您考虑使用物理学界广泛使用的优秀分析包之一中的 2D 直方图结构: ROOTAIDA是我的现代版本我很熟悉。


NB: It's been more than a decade since I used FITS for anything, but I recall it begin a nice and flexible way to store fairly raw data.注意:自从我FITS 用于任何事情已经十多年了,但我记得它开始了一种很好且灵活的方式来存储相当原始的数据。

For future reference, also rather widespread is the TIFF format.为了将来参考, TIFF格式也相当普遍。 You can use the free and open-source LibTIFF for I/O.您可以使用免费的开源LibTIFF进行 I/O。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM