ConvertColorSpace — converts a color image from a color space to another one or to a gray level image
Result = ConvertColorSpace(PixelList, Dimensions, Conversion);
linear list of the pixels of a color image, must be a vector of type uint8 or double
vector of type double containing the numbers of rows, columns and channels
constant of type uint8, can be RGB2GRAY, RGB2LAB or LAB2RGB
vector of the same length and type as PixelList
This function transforms the pixels of a color image from one color space to another one. If the list of pixels is of type double, it is transformed to a list of floats internally. This function is called by RGB2Gray, RGB2LAB and LAB2RGB so you do not need to call it yourself.