Difference between revisions of "Function:GammaCorrect"

From CUVI Wiki
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
Increases or decreases gamma value of input image.
Increases or decreases gamma value of input image.
===Function===
====Function====
{|
{|
|style="font-size:150%;"|
|style="font-size:100%;"|
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
CuviStatus gammaCorrect(const CuviImage& src,
CuviStatus gammaCorrect(const CuviImage& src,
Line 11: Line 11:
</syntaxhighlight>
</syntaxhighlight>
|}
|}
===Parameters===


====Parameters====
{|
|style="font-size:75%;"|
{|class="wikitable"
{|class="wikitable"
|-
|-
Line 34: Line 36:
| 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 44: Line 47:
! Output
! Output
|-
|-
| 8u
| 8UC1
| 8u
| 8UC1
|-
| 8UC3
| 8UC3
|}
|}
|}


 
====Example====
===Example===
{|
{|
|style="font-size:150%;"|
|style="font-size:100%;"|
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">



Latest revision as of 12:59, 18 October 2022

Increases or decreases gamma value of input image.

Function

CuviStatus gammaCorrect(const CuviImage& src,
                        CuviImage& dst,
                        const Cuvi32f gamma = 1.0f,
                        const CuviStream& stream = CuviStream());

Parameters

Name Type Description
src const CuviImage& Input Image
dst CuviImage& Destination Image
gamma const Cuvi32f Gamma value
stream const CuviStream& GPU stream ID for execution

Image Type Support

Input Output
8UC1 8UC1
8UC3 8UC3

Example

//Creating input images
CuviImage input = cuvi:io::loadImage(path), output;

const Cuvi32f gamma = 1.5f;

cuvi::colorOperations::gammaCorrect(input,output,gamma);