Function:BlackGammaLUT

From CUVI Wiki
Revision as of 16:31, 31 October 2022 by Jawad (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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);