本文介绍了热成像调色板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自热成像的早期以来,红外热像仪通常使用从黑色到蓝色,品红色,橙色,黄色到亮白色的独特调色板.此调色板通常称为 Iron Ironbow .

Since the early days of thermal imaging, infrared cameras often use a distinctive palette that runs from black through blue, magenta, orange, yellow to bright white. This palette is often called Iron, or Ironbow.

这是使用前视红外摄像机拍摄的图像的典型虚假颜色可视化(来源:Wikipedia).

Here is a typical false color visualization of an image taken with a forward looking infrared camera (source: Wikipedia).

"Termografia kot" 由Lcamtuf提供-典型的伪彩色红外

"Termografia kot" by Lcamtuf - a typical false color infrared

在一个专业的红外图像论坛上,我发现了2005年的一则帖子,上面贴着一个离散的调色板,似乎与我所寻找的很接近.

On a specialized infrared imagery forum I've found a post from 2005 with a discrete palette that seems to be close to what I am looking for.

来源不明的离散FLIR调色板

但是,与使用彩虹调色板一样,最好有一个简洁的分析表达式来定义调色板.

However as with the rainbow palette it would be nice to have a concise analytical expression that defines the palette.

对于使用GNUPLOT的用户来说,此调色板可能看起来很熟悉,因为默认的PM3D调色板运行黑色,蓝色,洋红色,橙色,黄色.

To those who have used GNUPLOT this palette might look familiar as the default PM3D palette runs black-blue-magenta-orange-yellow.

GNUPLOT PM3D调色板

此调色板具有简洁的定义

This palette has a concise definition

r = Math.round(255*Math.sqrt(x));
g = Math.round(255*Math.pow(x,3));
b = Math.round(255*(Math.sin(2 * Math.PI * x)>=0?
                   Math.sin(2 * Math.PI * x) : 0 ));

但是,其他调色板看起来并不完全如此.我的口味有点太褐色了.有关FLIR摄像机使用的调色板的起源或解析表达式的任何其他信息都将有所帮助.

However it is not quite how the other palette looks. A bit too brownish to my taste. Any additional information on the origins or an analytical expression for the palette used in FLIR cameras would help.

我创建了一个 JSFiddle 来与不同的调色板一起玩.

I have created a JSFiddle to play with different palettes.

推荐答案

这些调色板是任意的,主要用于根据所拥有图像的类型来提高对比度.因此,这些值可以是纯自定义集.

These palettes are arbitrary and is mainly used to improve contrast depending of type of image you're having. The values can therefor be pure custom set.

由于IR不能捕获任何颜色(因为它不在颜色范围内),因此返回的亮度值将被简单地映射到产生最佳对比度的位置,特别是在边缘和形状方面.

As IR does not capture any colors (as it is outside the color range) the returned luminance value is simply mapped to what creates best contrast, in particular in regards to edges and shapes.

铁调色板具有5-7种基色,然后进行插值(可以对红色进行微调,以调整黄色和品红色之间的混合色).确切的值和位置可以按照您喜欢的任何方式进行设置,下面是一个示例:

The iron palette has 5-7 key colors which are then interpolated (red can be made fine-tuning the mixing between yellow and magenta). The exact values and positions can be set any way you like, here is an example:

var ctx = document.querySelector("canvas").getContext("2d");
var gr = ctx.createLinearGradient(0, 0, 600, 0);
var keys = ["white", "gold", "#c07", "#20008c", "black"];

// add color stops to gradient:
for(var i = 0, key; key = keys[i]; i++) {
  gr.addColorStop(i / (keys.length-1), key);
}

ctx.fillStyle = gr;
ctx.fillRect(0, 0, 600, 20);
<canvas width=600></canvas>

这篇关于热成像调色板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-13 20:15