Difference between revisions of "Function:WarpPerspective"
From CUVI Wiki
(Created page with "__NOTOC__ Applies perspective warp to an image. ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus warpPerspective(const CuviImage& src,...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 78: | Line 78: | ||
CuviImage input = cuvi::io::loadImage(path), output; | CuviImage input = cuvi::io::loadImage(path), output; | ||
//Set | //Set perspective warp matrix | ||
Cuvi64f wp_coeffs[3][3] = | Cuvi64f wp_coeffs[3][3] = | ||
{ | { | ||
Line 86: | Line 86: | ||
}; | }; | ||
//Apply | //Apply warp perspective transformation | ||
cuvi::geometryTransforms::warpPerspective(input,output, wp_coeffs); | cuvi::geometryTransforms::warpPerspective(input,output, wp_coeffs); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Latest revision as of 16:38, 30 June 2019
Applies perspective warp to an image.
Function
|
Parameters
Name | Type | Description |
---|---|---|
src | const CuviImage& | Input Image |
dst | CuviImage& | Output Image |
coeffs | Cuvi64f [3][3] | 3 x 3 perspective warp 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
|