Difference between revisions of "Function:AutoColor"

From CUVI Wiki
 
(6 intermediate revisions by the same user not shown)
Line 12: Line 12:
{|
{|
|style="font-size:75%;"|
|style="font-size:75%;"|
{|class="wikitable" style="background-color:#D4F4B4;"
{|class="wikitable"
|-
|-
! Name
! Name
Line 32: Line 32:
|}
|}


===Image Type Support===
====Image Type Support====
 
{|
{| class="wikitable" style="background-color:#C1E6F5;"
|style="font-size:75%;"|
{| class="wikitable"
|-
|-
! Input
! Input
Line 44: Line 45:
| 16uC3
| 16uC3
| 16uC3
| 16uC3
|}
|}
|}


===Sample===
===Sample===
[[File:Deer.jpg|none|frame|Input]]
<br/>
[[File:True.jpg|none|frame|Output]]
<br/>
====Example====
{|
{|
|-
|style="font-size:100%;"|
|[[File:Deer.jpg|frame|Input]]
<syntaxhighlight lang="C">
|-
|[[File:True.jpg|frame|Output]]
|}


===Example===
{|
<pre style="background-color:#f7f7f7; color:#2f3337;">
CuviImage input("D:/false.jpg", CUVI_LOAD_IMAGE_COLOR_KEEP_DEPTH), output;
CuviImage input("D:/false.jpg", CUVI_LOAD_IMAGE_COLOR_KEEP_DEPTH), output;
   
   
Line 64: Line 66:
//Save Output to file
//Save Output to file
cuvi::io::saveImage(output, "D:/true.jpg");
cuvi::io::saveImage(output, "D:/true.jpg");
 
</syntaxhighlight>
</pre>
|}
|}

Latest revision as of 20:39, 18 October 2022

Fixes false colors at pixel level of the image using CUVI's own propriety approach. For most clients, this function is always part of the pipeline to ensure best results.

Function

CuviStatus cuvi::colorOperations::autoColor(const CuviImage& src, CuviImage& dst, const CuviStream& stream = CuviStream());

Parameters

Name Type Description
src const CuviImage& Input Image
dst CuviImage& Output Image
stream const CuviStream& GPU stream ID for execution

Image Type Support

Input Output
8uC3 8uC3
16uC3 16uC3

Sample

Error creating thumbnail: Unable to save thumbnail to destination
Input


Error creating thumbnail: Unable to save thumbnail to destination
Output


Example

CuviImage input("D:/false.jpg", CUVI_LOAD_IMAGE_COLOR_KEEP_DEPTH), output;
 
//Perform low-light enhancement
cuvi::colorOperations::autoColor(input, output);

//Save Output to file
cuvi::io::saveImage(output, "D:/true.jpg");