M-File Help: colorspace View code for colorspace

colorspace

Color space conversion of image

out = colorspace(s, im) converts the image im to a different color space according to the string s which specifies the source and destination color spaces, s = 'dest<-src', or alternatively, s = 'src->dest'. Input and output images have 3 planes.

[o1,o2,o3] = colorspace(s, im) as above but specifies separate output channels or planes.

colorspace(s, i1,i2,i3) as above but specifies separate input channels.

Supported color spaces are:

'RGB' R'G'B' Red Green Blue (ITU-R BT.709 gamma-corrected)
'YPbPr' Luma (ITU-R BT.601) + Chroma
'YCbCr'/'YCC' Luma + Chroma ("digitized" version of Y'PbPr)
'YUV' NTSC PAL Y'UV Luma + Chroma
'YIQ' NTSC Y'IQ Luma + Chroma
'YDbDr' SECAM Y'DbDr Luma + Chroma
'JPEGYCbCr' JPEG-Y'CbCr Luma + Chroma
'HSV'/'HSB' Hue Saturation Value/Brightness
'HSL'/'HLS'/'HSI' Hue Saturation Luminance/Intensity
'XYZ' CIE XYZ
'Lab' CIE L*a*b* (CIELAB)
'Luv' CIE L*u*v* (CIELUV)
'Lch' CIE L*ch (CIELCH)

Notes

Author

Pascal Getreuer 2005-2006


 

© 1990-2012 Peter Corke.