ImageTools - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Image Processing : ImageTools Package : ImageTools/ColorTransform

ImageTools

  

ColorTransform

  

apply a linear transform to the colors of an image

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

ColorTransform( img, mat, opts )

Parameters

img

-

ColorImage or ColorAImage; input image

mat

-

Matrix; 3 x 3 transformation matrix

opts

-

(optional) equation(s) of the form option = value; specify options for the ColorTransform command

Options

• 

inplace = truefalse

  

Specifies whether the operation is performed in-place. This can be used to avoid allocating memory. The default is false.

• 

output = Image

  

Specifies a data structure into which the output is written. This can be used to avoid allocating memory. The size and number of layers must match that of the input. The dimensions of the output image are adjusted so that the row and column indices match the input. The default is NULL.

Description

• 

The ColorTransform command transforms the color of each pixel of an image using the linear transformation c2=m*c1, where m is a 3 x 3 matrix, c1 is the input color vector of a pixel and c2 is the output color vector of a pixel.

• 

The img parameter is the input image and must be of type ColorImage or ColorAImage.

• 

The mat parameter specifies the transformation matrix. It must be a 3 x 3 Matrix.

Examples

withImageTools:

img_yCreate100,200,r,c→evalfsin0.0025r2+c2:

img_y0.2+0.4FitIntensityimg_y:

img_uCreate100,200,r,c→c:

img_u0.436+20.436FitIntensityimg_u:

img_vCreate100,200,r,c→r:

img_v0.615+20.615FitIntensityimg_v:

img_yuvCombineLayersimg_y,img_u,img_v:

img_rgb1YUVtoRGBimg_yuv:

M0.299|0.587|0.114,0.147|0.289|0.436,0.615|0.515|0.100:

img_rgb2ColorTransformimg_yuv,M1:

Embedimg_rgb1,img_rgb2

See Also

ImageTools

ImageTools[RGBtoYUV]

ImageTools[YUVtoRGB]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam