Difference between revisions of "Function:ChannelMix"
From CUVI Wiki
(Created page with "__NOTOC__ ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus colorTwist(CuviImage* srcImage, CuviImage* dstImage, ...") |
|||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
====Function==== | |||
===Function=== | |||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus | CuviStatus cuvi::colorOperations::channelMix(const CuviImage& src, | ||
CuviImage& dst, | |||
Cuvi32f coeffs[12], | |||
CuviStream& stream = CuviStream()); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
====Parameters==== | |||
===Parameters=== | {| | ||
|style="font-size:75%;"| | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
Line 21: | Line 20: | ||
! Description | ! Description | ||
|- | |- | ||
| | | src | ||
| CuviImage | | const CuviImage& | ||
| Input Image | | Input Image | ||
|- | |- | ||
| | | dst | ||
| CuviImage | | CuviImage& | ||
| Output Image | | Output Image | ||
|- | |- | ||
| coeffs[ | | coeffs[12] | ||
| Cuvi32f | | Cuvi32f | ||
| | | Augmented coefficient matrix for channel mixing | ||
|- | |- | ||
| stream | | stream | ||
| CuviStream | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
|} | |||
|} | |||
===Image Type Support=== | |||
{| | |||
|style="font-size:75%;"| | |||
{| class="wikitable" | |||
|- | |||
! Input | |||
! Output | |||
|- | |||
| 8uC3 | |||
| 8uC3 | |||
|- | |||
| 16uC3 | |||
| 16uC3 | |||
|} | |||
|} | |||
====Sample==== | |||
[[File:Twistin.jpg|none|frame|Input Image]] | |||
<br/> | |||
[[File:Twistout.jpg|none|frame| Output Image]] | |||
<br/> | |||
====Example==== | |||
{| | |||
|style="font-size:100%;"| | |||
<syntaxhighlight lang="cpp"> | |||
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); | |||
</syntaxhighlight> | |||
|} | |} |
Latest revision as of 20:42, 18 October 2022
Function
|
Parameters
|
Image Type Support
|
Sample
Error creating thumbnail: Unable to save thumbnail to destination
Error creating thumbnail: Unable to save thumbnail to destination
Example
|