|
|
| (2 intermediate revisions by the same user not shown) |
| Line 60: |
Line 60: |
| |} | | |} |
|
| |
|
| ===Image Type Support=== | | ====Image Type Support==== |
| | | {| |
| | |style="font-size:75%;"| |
| {| class="wikitable" | | {| class="wikitable" |
| |- | | |- |
| Line 78: |
Line 79: |
| | 16uC3 | | | 16uC3 |
| | 16uC3 | | | 16uC3 |
| | |} |
| |} | | |} |
|
| |
|
| ===Sample=== | | ===Sample=== |
| {|
| | [[File:Maskin.jpg|none|frame|Input Image]] |
| |-
| | <br/> |
| |[[File:Maskin.jpg|frame|Input Image]]
| | [[File:Maskout.jpg|none|frame|Masked Image]] |
| |[[File:Maskout.jpg|frame|Masked Image]]
| | <br/> |
| |}
| |
| | |
|
| |
|
| ===Example=== | | ====Example==== |
| {| | | {| |
| |style="font-size:150%;"| | | |style="font-size:100%;"| |
| <syntaxhighlight lang="cpp"> | | <syntaxhighlight lang="cpp"> |
|
| |
|
Latest revision as of 12:40, 18 October 2022
Adds borders on the input specified by the 4 arguments: top, bottom, left and right..
Function
CuviStatus borderMask(const CuviImage& src,
CuviImage& dst,
const Cuvi32s top,
const Cuvi32s bottom,
const Cuvi32s left,
const Cuvi32s right,
const Cuvi32f* mask,
const CuviStream& stream = CuviStream());
|
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
|
| mask
|
const Cuvi32f*
|
Values of masked pixel for each channel
|
| stream
|
const CuviStream&
|
GPU stream ID for execution
|
|
Image Type Support
| Input
|
Output
|
| 8uC1
|
8uC1
|
| 8uC3
|
8uC3
|
| 16uC1
|
16uC1
|
| 16uC3
|
16uC3
|
|
Sample
Input Image
Masked Image
Example
CuviImage gimg = cuvi::io::loadImage(path), gout;
Cuvi32f mask[3] = { 0 };
//Mask borders with pixel value of 0 for each channel
cuvi::colorOperations::borderMask(gimg,gout,10,10,5,3,mask);
|