Back to Adaptive Vision Library website

You are here: Start » Function Reference » Image Point Transforms » CorrectGamma

CorrectGamma


Performs gamma correction.

Syntax

C++
C#
 
void avl::CorrectGamma
(
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inRoi,
	float inValue,
	avl::Image& outImage
)

Parameters

Name Type Range Default Description
inImage const Image& Input image
inRoi Optional<const Region&> NIL Range of pixels to be processed
inValue float 0.01 - 8.0 2.0f Gamma coefficient, where 1.0 is neutral
outImage Image& Output image

Description

The gamma correction is a standard nonlinear transformation of pixel brightness that was developed as a tool for the compensation of CRT display input-output characteristic. The operation scales brightness of each inImage pixel to the 0.0 - 1.0 range, exponentiates it to the power of inValue, and then scales the result back to the pixel values range.

Examples

The CorrectGamma performed on the sample image with inValue = 2.0 (left image) and inValue = 0.5 (right image).

In-place Processing

This function supports in-place data processing - you can pass the same reference to inImage and outImage

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

See Also