用法:
skimage.color.xyz2lab(xyz, illuminant='D65', observer='2', *, channel_axis=- 1)
XYZ 到CIE-LAB 顏色空間轉換。
- xyz:(..., 3, ...) 數組
XYZ 格式的圖像。默認情況下,最終維度表示通道。
- illuminant:{“A”、“B”、“C”、“D50”、“D55”、“D65”、“D75”、“E”},可選
光源的名稱(函數不區分大小寫)。
- observer:{“2”、“10”、“R”},可選
以下之一:2 度觀察者、10 度觀察者或 R 函數 grDevices::convertColor 中的“R”觀察者。
- channel_axis:int 可選
該參數指示數組的哪個軸對應於通道。
- out:(..., 3, ...)
CIE-LAB 格式的圖像。與輸入相同的尺寸。
- ValueError
如果 xyz 不是至少具有形狀 (..., 3, ...) 的二維。
- ValueError
如果光源或觀察者角度不受支持或未知。
參數:
返回:
拋出:
注意:
默認觀察者=”2”,光源=”D65”。 CIE XYZ 三色值 x_ref=95.047, y_ref=100., z_ref=108.883。有關支持的光源列表,請參見函數 get_xyz_coords。
參考:
例子:
>>> from skimage import data >>> from skimage.color import rgb2xyz, xyz2lab >>> img = data.astronaut() >>> img_xyz = rgb2xyz(img) >>> img_lab = xyz2lab(img_xyz)
相關用法
- Python skimage.color.xyz2rgb用法及代碼示例
- Python skimage.color.lab2lch用法及代碼示例
- Python skimage.color.convert_colorspace用法及代碼示例
- Python skimage.color.rgb2rgbcie用法及代碼示例
- Python skimage.color.rgb2xyz用法及代碼示例
- Python skimage.color.combine_stains用法及代碼示例
- Python skimage.color.rgba2rgb用法及代碼示例
- Python skimage.color.separate_stains用法及代碼示例
- Python skimage.color.rgb2gray用法及代碼示例
- Python skimage.color.rgb2hsv用法及代碼示例
- Python skimage.color.rgbcie2rgb用法及代碼示例
- Python skimage.color.hsv2rgb用法及代碼示例
- Python skimage.color.rgb2hed用法及代碼示例
- Python skimage.color.lch2lab用法及代碼示例
- Python skimage.color.hed2rgb用法及代碼示例
- Python skimage.feature.graycomatrix用法及代碼示例
- Python skimage.draw.random_shapes用法及代碼示例
- Python skimage.feature.blob_doh用法及代碼示例
- Python skimage.feature.blob_dog用法及代碼示例
- Python skimage.filters.unsharp_mask用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.color.xyz2lab。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。