色相到波长映射 [英] Hue to wavelength mapping

查看:323
本文介绍了色相到波长映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个算法来找出给定色调值(0度到360度之间)的颜色的波长。在MATLAB中有相同的内置函数吗?

Is there an algorithm to find out the wavelength of the color given the hue value (between 0 degree to 360 degree). Is there any built-in function in MATLABfor the same?

推荐答案

Mark Ransom和Franco Callari完全正确,感知色彩的光谱,也不能明确地将色调值映射到波长,如果你只想得到相应的单色波长,你肯定可以把东西整合在一起。

While Mark Ransom and Franco Callari are completely right that you cannot recover the spectrum of a perceptual color, nor unambiguously map hue values to wavelengths, you could definitely piece something together if you just want the corresponding monochromatic wavelength.

色调的一部分270和360之间的周期是另一个问题。在光谱中没有对应于品红色的,所以让我们假设我们只使用0和270之间的色调值。

The part of the hue cycle between 270 and 360 is another problem. There is nothing corresponding to magenta in the light spectrum, so let's assume that we only use hue values between 0 and 270.

估计可见光谱的可用部分450-620nm,波长 L (以nm为单位)和色相值 H

Estimating that the usable part of the visible spectrum is 450-620nm, with wavelength L (in nm) and hue value H (in degrees), you can improvise this:

 L = 620 - 170 / 270 * H

620是最大波长,170是波长范围,270是色相范围。

620 is the maximum wavelength, 170 is the wavelength range and 270 is the hue range.

在正确的方向,但我只检查了4或5种颜色。你可能可以得到更好的结果比较输入色调以及可见光谱图上的相应颜色,然后稍微调整这些值。

I think this should be in the right direction but I have only checked 4 or 5 colors. You might be able to get better results comparing between input hues and corresponding colors on a visible spectrum chart, and then adjusting the values somewhat.

这篇关于色相到波长映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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