Difference between revisions of "Function:BorderMask"
From CUVI Wiki
(5 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
===Function=== | ===Function=== | ||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus borderMask(const CuviImage& src, | CuviStatus borderMask(const CuviImage& src, | ||
Line 12: | Line 12: | ||
const Cuvi32s left, | const Cuvi32s left, | ||
const Cuvi32s right, | const Cuvi32s right, | ||
const Cuvi32f mask, | const Cuvi32f* mask, | ||
const CuviStream& stream = CuviStream()); | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
====Parameters==== | |||
{| | |||
|style="font-size:75%;"| | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
Line 47: | Line 49: | ||
| const Cuvi32s | | const Cuvi32s | ||
| Number of pixels to mask from right | | Number of pixels to mask from right | ||
|- | |||
| mask | |||
| const Cuvi32f* | |||
| Values of masked pixel for each channel | |||
|- | |- | ||
| stream | | stream | ||
| 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 72: | Line 79: | ||
| 16uC3 | | 16uC3 | ||
| 16uC3 | | 16uC3 | ||
|} | |||
|} | |} | ||
===Sample=== | ===Sample=== | ||
[[File:Maskin.jpg|none|frame|Input Image]] | |||
<br/> | |||
[[File:Maskout.jpg|none|frame|Masked Image]] | |||
<br/> | |||
====Example==== | |||
===Example=== | |||
{| | {| | ||
|style="font-size: | |style="font-size:100%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
Line 90: | Line 96: | ||
CuviImage gimg = cuvi::io::loadImage(path), gout; | CuviImage gimg = cuvi::io::loadImage(path), gout; | ||
//Mask borders with pixel value of 0 | Cuvi32f mask[3] = { 0 }; | ||
cuvi::colorOperations::borderMask(gimg,gout,10,10,5,3, | |||
//Mask borders with pixel value of 0 for each channel | |||
cuvi::colorOperations::borderMask(gimg,gout,10,10,5,3,mask); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Latest revision as of 20:40, 18 October 2022
Adds borders on the input specified by the 4 arguments: top, bottom, left and right..
Function
|
Parameters
|
Image Type Support
|
Sample
Example
|