Function:Gray2rgb

From CUVI Wiki
Revision as of 17:45, 13 June 2014 by Ghazanfar (talk | contribs) (Created page with "__NOTOC__ Converts a gray-scale image to 3 channel image by copying the same input image to all the channels of 3 channel output image. ===Function=== {| |style="font-size:150...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Converts a gray-scale image to 3 channel image by copying the same input image to all the channels of 3 channel output image.

Function

CuviStatus gray2rgb(const CuviImage& src,
                    CuviImage& dst,
                    const CuviStream& stream = CuviStream());

CuviStatus gray2rgb(CuviImage& srcDst,
                    const CuviStream& stream = CuviStream());


Parameters

Name Type Description
src CuviImage& Input single channel image
dst CuviImage& Output 3-channel image
stream CuviStream& GPU stream ID for execution


Image Type Support

Input Output
8uC1 8uC3 or 8uC4
16uC1 16uC3 or 16uC4
32fC1 32fC3 or 32fC4

Sample

Example

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

//Convert to 3 channel image
cuvi::colorOperations::gray2rgb(gimg,gout);