Home > ISET > metrics > scielab > changeColorSpace.m

changeColorSpace

PURPOSE ^

Change an image color space by matrix multiplication.

SYNOPSIS ^

function outImage = changeColorSpace(inImage,colorMatrix)

DESCRIPTION ^

Change an image color space by matrix multiplication.

 outImage = changeColorSpace(inImage,colorMatrix)

 The input image is either an RGB image (m x n x 3) or an XW image but with 3 columns.
 For backwards compatibility the routine also works on an inImage that is
 a single matrix built from R,G,B, images as 

        inImage = [ R G B];

 The output image is returned in the same format as the input.

 The calculation converts the data into an Nx3 matrix and right multiplies
 the data with a 3 x 3 color matrix.  That is, the matrix converts column
 vectors in the input image representation into column vectors in the
 output representation.

    outImage =   [ inImage ] * colorMatrix 

 where inImage is converted to XW format.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Thu 20-Nov-2008 22:09:04 by m2html © 2003