Difference between revisions of "Function:Subtract"
From CUVI Wiki
(Created page with "__NOTOC__ Subtracts pixel values of second image from the first image ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus subtract(CuviImage* s...") |
(→Sample) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Subtracts pixel values of second image from the first image | Subtracts pixel values of second image from the first image | ||
===Function=== | ====Function==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus subtract(CuviImage | CuviStatus subtract(const CuviImage& src1, | ||
CuviImage | const CuviImage& src2, | ||
CuviImage | CuviImage& dst, | ||
CuviStream | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
====Parameters==== | |||
{| | |||
|style="font-size:75%;"| | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
Line 19: | Line 21: | ||
! Description | ! Description | ||
|- | |- | ||
| | | src1 | ||
| CuviImage | | const CuviImage& | ||
| First Image | | First Image | ||
|- | |- | ||
| | | src2 | ||
| CuviImage | | const CuviImage& | ||
| Second Image | | Second Image | ||
|- | |- | ||
| | | dst | ||
| CuviImage | | CuviImage& | ||
| Resultant Image | | Resultant Image | ||
|- | |- | ||
| stream | | stream | ||
| 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 68: | Line 71: | ||
| 32fC3 | | 32fC3 | ||
| 32fC3 | | 32fC3 | ||
|} | |||
|} | |} | ||
====Sample==== | |||
[[File:Addin1.jpg|none|frame|First Image]] | |||
<br/> | |||
[[File:Addin2.jpg|none|frame|Second Image]] | |||
<br/> | |||
[[File:SubOut.jpg|none|frame|Result]] | |||
<br/> | |||
====Example==== | |||
===Example=== | |||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviImage | CuviImage gimg1 = cuvi::io::loadImage(path); | ||
CuviImage | CuviImage gimg2 = cuvi::io::loadImage(path); | ||
CuviImage | CuviImage gout; | ||
// | //Subtract two images | ||
cuvi::arithmeticLogical::subtract(gimg1,gimg2,gout); | cuvi::arithmeticLogical::subtract(gimg1,gimg2,gout); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Latest revision as of 20:30, 18 October 2022
Subtracts pixel values of second image from the first image
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
|