Difference between revisions of "Function:BorderMask"
From CUVI Wiki
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
Adds borders on the input specified | Adds borders on the input specified by the 4 arguments: top, bottom, left and right. By default the masking value is 0 (black). | ||
===Function=== | ===Function=== | ||
Line 6: | Line 6: | ||
|style="font-size:150%;"| | |style="font-size:150%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviStatus borderMask(CuviImage | CuviStatus borderMask(const CuviImage& src, | ||
CuviImage | CuviImage& dst, | ||
const Cuvi32s top, | |||
const Cuvi32s bottom, | |||
const Cuvi32s left, | |||
const Cuvi32s right, | |||
const Cuvi32f mask, | |||
CuviStream | const CuviStream& stream = CuviStream()); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
Line 24: | Line 24: | ||
! Description | ! Description | ||
|- | |- | ||
| | | src | ||
| CuviImage | | const CuviImage& | ||
| Input Image | | Input Image | ||
|- | |- | ||
| | | dst | ||
| CuviImage | | CuviImage& | ||
| Output Image | | Output Image | ||
|- | |- | ||
| top | | top | ||
| | | const Cuvi32s | ||
| Number of pixels to mask from top | | Number of pixels to mask from top | ||
|- | |- | ||
| bottom | | bottom | ||
| | | const Cuvi32s | ||
| Number of pixels to mask from bottom | | Number of pixels to mask from bottom | ||
|- | |- | ||
| left | | left | ||
| | | const Cuvi32s | ||
| Number of pixels to mask from left | | Number of pixels to mask from left | ||
|- | |- | ||
| right | | right | ||
| | | const Cuvi32s | ||
| Number of pixels to mask from right | | Number of pixels to mask from right | ||
|- | |- | ||
| stream | | stream | ||
| CuviStream | | const CuviStream& | ||
| GPU stream ID for execution | | GPU stream ID for execution | ||
Line 88: | Line 88: | ||
CuviImage | CuviImage gimg = cuvi::io::loadImage(path), gout; | ||
//Mask borders with pixel value of 0 | //Mask borders with pixel value of 0 |
Revision as of 18:45, 18 April 2013
Adds borders on the input specified by the 4 arguments: top, bottom, left and right. By default the masking value is 0 (black).
Function
|
Parameters
Name | Type | Description |
---|---|---|
src | const CuviImage& | Input Image |
dst | CuviImage& | Output Image |
top | const Cuvi32s | Number of pixels to mask from top |
bottom | const Cuvi32s | Number of pixels to mask from bottom |
left | const Cuvi32s | Number of pixels to mask from left |
right | const Cuvi32s | Number of pixels to mask from right |
stream | const CuviStream& | GPU stream ID for execution |
Image Type Support
Input | Output |
---|---|
8uC1 | 8uC1 |
8uC3 | 8uC3 |
16uC1 | 16uC1 |
16uC3 | 16uC3 |
Sample
Error creating thumbnail: Unable to save thumbnail to destination |
Error creating thumbnail: Unable to save thumbnail to destination |
Example
|