Function:WarpAffine

From CUVI Wiki
Revision as of 17:59, 13 June 2014 by Ghazanfar (talk | contribs) (Created page with "__NOTOC__ Applies affine transformation to an image. ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus warpAffine(const CuviImage& src, ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Applies affine transformation to an image.

Function

CuviStatus warpAffine(const CuviImage& src,
                      CuviImage& dst,
                      Cuvi64f coeffs[2][3],
                      const CuviStream& stream = CuviStream());


Parameters

Name Type Description
src const CuviImage& Input Image
dst CuviImage& Output Image
coeffs Cuvi64f [2][3] 2 x 3 affine transformation matrix
stream const CuviStream& GPU stream ID for execution


Image Type Support

Input Output
8uC1 8uC1
8uC3 8uC3
16uC1 16uC1
16uC3 16uC3
32fC1 32fC1
32fC3 32fC3


Samples

Example

CuviImage input = cuvi::io::loadImage(path), output;

//Set affine transformation matrix
Cuvi64f coeffs[2][3] = { 
                         {0.5, 0.0, 0.0}, 
                         {0.0, 0.5, 0.0} 
                       };

//Apply affine transformation
cuvi::geometryTransforms::warpAffine(input,output, coeffs);