Difference between revisions of "Function:BlackGammaLUT"

From CUVI Wiki
(Created page with "__NOTOC__ Remaps image values according to look up tables but instead of a single table like in Function:LUT, the blackGammaLUT takes separate tables for each channel. ====Function==== {| |style="font-size:100%;"| <syntaxhighlight lang="cpp"> CuviStatus blackGammaLUT(const CuviImage& src, CuviImage& dst, Cuvi16u* redLUT, Cuvi16u* greenLUT, Cuvi16u* blueLUT,...")
 
 
Line 1: Line 1:
__NOTOC__
__NOTOC__
Remaps image values according to look up tables but instead of a single table like in [[LUT|Function:LUT]], the blackGammaLUT takes separate tables for each channel.
Remaps image values according to look up tables but instead of a single table like in [[Function:LUT|LUT]], the blackGammaLUT takes separate tables for each channel.
====Function====
====Function====
{|
{|

Latest revision as of 16:31, 31 October 2022

Remaps image values according to look up tables but instead of a single table like in LUT, the blackGammaLUT takes separate tables for each channel.

Function

CuviStatus blackGammaLUT(const CuviImage& src,
                         CuviImage& dst,
                         Cuvi16u* redLUT,
                         Cuvi16u* greenLUT,
                         Cuvi16u* blueLUT, 
                         const CuviStream& stream = CuviStream());

Parameters

Name Type Description
src CuviImage& Input Image
dst CuviImage& Resultant Image
redLUT Cuvi16u* The look-up table for red channel
greenLUT Cuvi16u* The look-up table for green channel
blueLUT Cuvi16u* The look-up table for blue channel
stream CuviStream& GPU stream ID for execution

Image Type Support

Type
8uC3
16uC3

Example

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

//blackGammaLUT Parameters
	const int mappingSize = 256;
	Cuvi16u redLUT[mappingSize], greenLUT[mappingSize], blueLUT[mappingSize];
	for (int i = 0; i < mappingSize; i++) {
		redLUT[i] = 255 - i;
		greenLUT[i] =  i;
		blueLUT[i] =  i;
	}
//blackGammaLUT
CuviStatus status = cuvi::colorOperations::blackGammaLUT(input,
                                                         output,
                                                         redLUT,
                                                         greenLUT,
                                                         blueLUT);