Difference between revisions of "Function:ChannelMix"

From CUVI Wiki
Line 4: Line 4:
|style="font-size:150%;"|
|style="font-size:150%;"|
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
CuviStatus colorTwist(const CuviImage* src,
CuviStatus colorTwist(const CuviImage& src,
                       CuviImage* dst,
                       CuviImage& dst,
                       Cuvi32f coeffs[12],
                       Cuvi32f coeffs[12],
                       CuviStream& stream = CuviStream());
                       CuviStream& stream = CuviStream());

Revision as of 19:07, 18 April 2013

Function

CuviStatus colorTwist(const CuviImage& src,
                      CuviImage& dst,
                      Cuvi32f coeffs[12],
                      CuviStream& stream = CuviStream());


Parameters

Name Type Description
src const CuviImage& Input Image
dst CuviImage& Output Image
coeffs[12] Cuvi32f Augmented coefficient matrix for channel mixing
stream const CuviStream& GPU stream ID for execution


Image Type Support

Input Output
8uC3 8uC3
16uC3 16uC3

Sample

Error creating thumbnail: Unable to save thumbnail to destination
Input Image
Error creating thumbnail: Unable to save thumbnail to destination
Output Image


Example

CuviImage gimg = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_COLOR);

//Color-Mix matrix
float coeffs[12] = { 
                     1.05, -0.025f, -0.025f, 0.0f,
                     -0.45f, 1.975f, -0.525f, 0.0f, 
                     0.225f, -1.05f, 1.825f, 0.0f
                   };


//function call
cuvi::colorOperations::colorTwist(gimg,gout,coeffs);