Difference between revisions of "Function:UnderwaterFilter"
From CUVI Wiki
(→Sample) |
|||
(One intermediate revision by the same user not shown) | |||
Line 60: | Line 60: | ||
|style="font-size:150%;"| | |style="font-size:150%;"| | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
CuviImage input("D:/ | |||
CuviImage input("D:/undersea.jpg", CUVI_LOAD_IMAGE_COLOR_KEEP_DEPTH); | |||
CuviImage output; | |||
//Save | |||
cuvi::io::saveImage( | CuviEnhancementParams p; | ||
p.autoColor = false; | |||
p.filterStrength = 2; | |||
p.deGalreAmount = 0.657; | |||
//Filter | |||
CuviStatus s; | |||
s = cuvi::imageFiltering::underwaterFilter(input, output, p); | |||
//Print error status | |||
cout << "Status: " << s <<endl; | |||
//Save output to file | |||
cuvi::io::saveImage(out, "D:/output_image.jpg"); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} |
Latest revision as of 19:05, 27 March 2018
Removes haze and brings out the real colors in underwater photography. Apart from removing haze, it also enhances the colors of haze-less images and is so additive that you start using it on every underwater photo by default.
Function
|
Parameters
Name | Type | Description |
---|---|---|
src | const CuviImage& | Input Image |
dst | CuviImage& | Output Image |
params | CuviEnhacementParams | bool autoColor, Cuvi32i filterStrength, Cuvi64f deGalreAmount. |
stream | const CuviStream& | GPU stream ID for execution |
Image Type Support
Input | Output |
---|---|
8uC3 | 8uC3 |
Sample
Error creating thumbnail: Unable to save thumbnail to destination |
Error creating thumbnail: Unable to save thumbnail to destination |
Example
|