Difference between revisions of "Function:NOT"
From CUVI Wiki
(Created page with "__NOTOC__ Performs a bitwise NOT operation on each pixel ===Function=== {| |style="font-size:150%;"| <syntaxhighlight lang="cpp"> CuviStatus NOT(CuviImage* srcImage, ...") |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Inverts the bits of each image pixel. | |||
===Function=== | ====Function==== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus NOT(CuviImage | CuviStatus NOT(const CuviImage& src, | ||
CuviImage | CuviImage& dst, | ||
CuviStream | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
====Parameters==== | |||
{| | |||
|style="font-size:75%;"| | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
Line 18: | Line 20: | ||
! Description | ! Description | ||
|- | |- | ||
| | | src | ||
| CuviImage | | const CuviImage& | ||
| Input Image | | Input Image | ||
|- | |- | ||
| | | dst | ||
| CuviImage | | CuviImage& | ||
| Destination Image | | Destination 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 50: | Line 54: | ||
| 16uC3 | | 16uC3 | ||
| 16uC3 | | 16uC3 | ||
|} | |||
|} | |} | ||
===Sample=== | ===Sample=== | ||
[[File:NotIn.jpg|none|frame|Input Image]] | |||
<br/> | |||
[[File:NotOut.jpg|none|frame|Negative Image]] | |||
<br/> | |||
====Example==== | |||
===Example=== | |||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
//Creating GPU images | //Creating GPU images | ||
CuviImage | CuviImage gimg = cuvi:io::loadImage(path), gout; | ||
//Computing Negative of the image | //Computing Negative of the image | ||
cuvi::arithmeticLogical::NOT( | cuvi::arithmeticLogical::NOT(gimg,gout); | ||
//The same can be achieved using the ~ operator | |||
gout = ~gimg; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Latest revision as of 20:20, 18 October 2022
Inverts the bits of each image pixel.
Function
|
Parameters
|
Image Type Support
|
Sample
Example
|