Difference between revisions of "Function:Multiply"
From CUVI Wiki
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Multiplies | Multiplies image with another image or constant value(s). | ||
===Function=== | ====Function==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus multiply(const CuviImage& src1, | CuviStatus multiply(const CuviImage& src1, | ||
const CuviImage& src2, | const CuviImage& src2, | ||
CuviImage& dst, | CuviImage& dst, | ||
const CuviStream& stream = CuviImage()); | const CuviStream& stream = CuviStream()); | ||
CuviStatus multiply(const CuviImage& src, | |||
const CuviScalar& values, | |||
CuviImage& dst, | |||
const CuviStream& stream = CuviStream()); | |||
CuviStatus multiply(const CuviImage& src, | |||
const Cuvi64f value, | |||
CuviImage& dst, | |||
const CuviStream& stream = CuviStream()); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
====Parameters==== | |||
{| | |||
|style="font-size:75%;"| | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
Line 34: | Line 46: | ||
| const CuviStream& | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
|} | |||
|} | |} | ||
===Image Type Support=== | ====Image Type Support==== | ||
{| | |||
|style="font-size:75%;"| | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 48: | Line 61: | ||
| 8u | | 8u | ||
| 8u | | 8u | ||
|- | |||
| 16u | |||
| 16u | |||
| 16u | |||
|- | |||
| 32f | |||
| 32f | |||
| 32f | |||
|- | |- | ||
| 8u | | 8u | ||
Line 53: | Line 74: | ||
| 16u | | 16u | ||
|- | |- | ||
| 8u | |||
| 8u | |||
| 32f | |||
|- | |||
| 16u | |||
| 16u | |||
| 32f | |||
|- | |||
| 8u | |||
| 16u | |||
| 16u | | 16u | ||
|- | |||
| 16u | | 16u | ||
| 8u | |||
| 16u | | 16u | ||
|- | |- | ||
| 8u | |||
| 32f | |||
| 32f | |||
|- | |||
| 32f | |||
| 8u | |||
| 32f | | 32f | ||
|- | |||
| 8u | |||
| 16u | |||
| 32f | | 32f | ||
|- | |||
| 16u | |||
| 8u | |||
| 32f | | 32f | ||
|- | |- | ||
| | | 16u | ||
| | | 32f | ||
| 32f | |||
|- | |- | ||
| | | 32f | ||
| 16u | |||
| 32f | |||
|} | |||
|} | |} | ||
===Example=== | ====Sample==== | ||
[[File:MultiplyIn1.png|none|frame|First Input Image (8-bit)]] | |||
<br/> | |||
[[File:MultiplyIn2.png|none|frame|Second Input Image (8-bit)]] | |||
<br/> | |||
[[File:MultiplyOut.png|none|frame| Resultant Image (16-bit)]] | |||
<br/> | |||
====Example==== | |||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
Line 84: | Line 138: | ||
cuvi::arithmeticLogical::multiply(gimg1,gimg2,gout); | cuvi::arithmeticLogical::multiply(gimg1,gimg2,gout); | ||
//Multiply with a constant value | |||
gout *= 4; | |||
//Multiply each channel with a different value | |||
gout *= CuviScalar(3,5,6); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Latest revision as of 20:19, 18 October 2022
Multiplies image with another image or constant value(s).
Function
|
Parameters
|
Image Type Support
|
Sample
Error creating thumbnail: Unable to save thumbnail to destination
Error creating thumbnail: Unable to save thumbnail to destination
Error creating thumbnail: Unable to save thumbnail to destination
Example
|