Difference between revisions of "Function:Multiply"
From CUVI Wiki
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Multiplies | Multiplies image with another image or constant value(s). | ||
===Function=== | ===Function=== | ||
{| | {| | ||
Line 8: | Line 8: | ||
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> | ||
|} | |} | ||
Line 48: | Line 58: | ||
| 8u | | 8u | ||
| 8u | | 8u | ||
|- | |||
| 16u | |||
| 16u | |||
| 16u | |||
|- | |||
| 32f | |||
| 32f | |||
| 32f | |||
|- | |- | ||
| 8u | | 8u | ||
| 8u | | 8u | ||
| 16u | | 16u | ||
|- | |||
| 8u | |||
| 8u | |||
| 32f | |||
|- | |- | ||
| 16u | | 16u | ||
| 16u | |||
| 32f | |||
|- | |||
| 8u | |||
| 16u | | 16u | ||
| 16u | | 16u | ||
|- | |- | ||
| 16u | |||
| 8u | |||
| 16u | |||
|- | |||
| 8u | |||
| 32f | |||
| 32f | |||
|- | |||
| 32f | |||
| 8u | |||
| 32f | |||
|- | |||
| 8u | |||
| 16u | |||
| 32f | |||
|- | |||
| 16u | |||
| 8u | |||
| 32f | | 32f | ||
|- | |||
| 16u | |||
| 32f | | 32f | ||
| 32f | |||
|- | |||
| 32f | |||
| 16u | |||
| 32f | | 32f | ||
|} | |} | ||
Line 84: | Line 134: | ||
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> | ||
|} | |} |
Revision as of 14:43, 13 June 2014
Multiplies image with another image or constant value(s).
Function
|
Parameters
Name | Type | Description |
---|---|---|
src1 | const CuviImage& | First Input Image |
src2 | const CuviImage& | Second Input Image |
dst | CuviImage& | Resultant Image |
stream | const CuviStream& | GPU stream ID for execution |
Image Type Support
Input 1 | Input 2 | Output |
---|---|---|
8u | 8u | 8u |
16u | 16u | 16u |
32f | 32f | 32f |
8u | 8u | 16u |
8u | 8u | 32f |
16u | 16u | 32f |
8u | 16u | 16u |
16u | 8u | 16u |
8u | 32f | 32f |
32f | 8u | 32f |
8u | 16u | 32f |
16u | 8u | 32f |
16u | 32f | 32f |
32f | 16u | 32f |
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
|