Colorspace Transformations
편집자 메모: This file was selected as MATLAB Central Pick of the Week
This package converts colors between sRGB, Y'PbPr, Y'CbCr, JPEG-Y'CbCr, Y'UV, Y'IQ, Y'DbDr, HSV, HSL, HSI, CIE XYZ, CIE L*a*b* (CIELAB), CIE L*u*v* (CIELUV), and CIE L*ch (CIELCH), and CIE CAT02 LMS. It can be used either as part of a C/C++ program or compiled as a MATLAB MEX function.
For use in Matlab, colorspace is compiled as a MEX function by entering
mex colorspace.c
on the Matlab command console. As an alternative to MEX, a pure M-code version colorspace.m is also included.
For use in C programs, an example command line program colorcalc is included.
B = colorspace(S,A) converts the color representation of image A where S is a string specifying the conversion. S tells the source and destination color spaces, S = 'dest<-src', or alternatively, S = 'src->dest'. Supported color spaces are
'RGB' = sRGB IEC 61966-2-1
'YPbPr' = Luma (ITU-R BT.601) + Chroma
'YCbCr' = Luma + Chroma
'JPEG-YCbCr' = space used in JPEG
'YUV' = NTSC PAL Y'UV Luma + Chroma
'YIQ' = NTSC Y'IQ Luma + Chroma
'YDbDr' = SECAM Luma + Chroma
'HSV' or 'HSB' = Hue Saturation Value/Brightness
'HSL' or 'HLS' = Hue Saturation Luminance
'HSI' = Hue Saturation Intensity
'XYZ' = CIE XYZ
'Lab' = CIE L*a*b* (CIELAB)
'Luv' = CIE L*u*v* (CIELUV)
'LCH' = CIE L*C*H* (CIELCH)
'CAT02 LMS' = CIE CAT02 LMS
All transforms assume 2 degree observer and D65 illuminant. Color space names are case insensitive. When sRGB is the source or destination, it can be omitted. For example 'yuv<-' is short for 'yuv<-rgb'.
인용 양식
Pascal Getreuer (2024). Colorspace Transformations (https://www.mathworks.com/matlabcentral/fileexchange/28790-colorspace-transformations), MATLAB Central File Exchange. 검색 날짜: .
MATLAB 릴리스 호환 정보
플랫폼 호환성
Windows macOS Linux카테고리
- Image Processing and Computer Vision > Image Processing Toolbox > Import, Export, and Conversion >
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Image Segmentation > L*a*b* Color Space >
태그
도움
도움 준 파일: hslcolormap, colormapgen, cbrewer2, Perceptually improved colormaps, Generate maximally perceptually-distinct colors, Explore Experimental Data
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!colorspace/
버전 | 게시됨 | 릴리스 정보 | |
---|---|---|---|
1.4.0.0 | added tags, minor update in documentation |
||
1.3.0.0 | * Added missing colorspace.h file---thanks to William Cook
|