Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image processing 任意量程到luma的转换_Image Processing_Data Visualization_Rgb - Fatal编程技术网

Image processing 任意量程到luma的转换

Image processing 任意量程到luma的转换,image-processing,data-visualization,rgb,Image Processing,Data Visualization,Rgb,我有范围中的二维值矩阵。我想通过灰度图像来可视化这个图像。我应该如何处理数据以正确地可视化它 据我所知,人眼具有对数刻度,因此我的转换也应该是对数的。将您的值转换为感知均匀的颜色空间中的亮度,例如CIE Lab或Luv。然后将其转换为RGB显示 例如,这些在colormath模块中可用 如果您的输入值是x L = 100*(x - xmin) / (xmax - xmin) # L is 0-100 a, b = 0, 0 # neutral values from colormath.col

我有范围
中的二维值矩阵。我想通过灰度图像来可视化这个图像。我应该如何处理数据以正确地可视化它


据我所知,人眼具有对数刻度,因此我的转换也应该是对数的。

将您的值转换为感知均匀的颜色空间中的亮度,例如CIE Lab或Luv。然后将其转换为RGB显示

例如,这些在colormath模块中可用

如果您的输入值是x

L = 100*(x - xmin) / (xmax - xmin) # L is 0-100
a, b = 0, 0 # neutral values

from colormath.color_objects import LabColor, RGBColor
from colormath.color_conversions import convert_color

lab = LabColor(L, a, b)
rgb = convert_color(lab, RGBColor)
# display rgb
Matplotlib在“颜色贴图”一节中提供了很多关于此的信息: