Difference between revisions of "Function:Lowlight"

From CUVI Wiki
 
(3 intermediate revisions by the same user not shown)
Line 34: Line 34:
|}
|}


===Image Type Support===
====Image Type Support====
 
{|
|style="font-size:75%;"|
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 46: Line 47:
| 16uC3
| 16uC3
| 16uC3
| 16uC3
|}
|}
|}


===Sample===
====Sample====
{|
[[File:Dark.jpg|none|frame|Input]]
|-
<br/>
|[[File:Dark.jpg|frame|Input]]
[[File:Light.jpg|none|frame|Output]]
|[[File:Light.jpg|frame|Output]]
<br/>
|}


===Example===
====Example====
{|
{|
|style="font-size:150%;"|
|style="font-size:100%;"|
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
CuviImage input("D:/lowlight.jpg", CUVI_LOAD_IMAGE_COLOR_KEEP_DEPTH), output;
CuviImage input("D:/lowlight.jpg", CUVI_LOAD_IMAGE_COLOR_KEEP_DEPTH), output;

Latest revision as of 21:07, 18 October 2022

Enhances the low intensity colors in a dark photo taken from a general purpose mobile, CCTV or DSLR camera. Our technique restores most of the hidden features in a low light image making it suitable for enhancing security footage in real-time at dawn, dusk and other low light conditions.

Function

CuviStatus cuvi::colorOperations::lowlight(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:/lowlight.jpg", CUVI_LOAD_IMAGE_COLOR_KEEP_DEPTH), output;
 
//Perform low-light enhancement
cuvi::colorOperations::lowlight(input, output);

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