Difference between revisions of "Function:WarpPerspectiveBack"

From CUVI Wiki
(Created page with "__NOTOC__ Applies warp perspective backwards to an image. ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus warpPerspectiveBack(const CuviIma...")
(No difference)

Revision as of 16:37, 30 June 2019

Applies warp perspective backwards to an image.

Function

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


Parameters

Name Type Description
src const CuviImage& Input Image
dst CuviImage& Output Image
coeffs Cuvi64f [3][3] 3 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 warp perspective backward matrix
Cuvi64f wp_coeffs[3][3] =
	{
		{ 1.1, 2.1, 5},
		{ 3.2, 1.2, 10},
		{0, 0, 1}
	};


//Apply warp perspective backwards
cuvi::geometryTransforms::warpPerspectiveBack(input,output, wp_coeffs);