# What is the algorithm applied by ImageAdjust[image,{c,b,gamma}]

I want to know how ImageAdjust work to change the pixel values by specifying all parameters b,c and gamma. In openCV, the transformation is linear g(x)=alpha*f(x)+beta where alhpa controls the contrast and beta controls the brightness with alpha>0. When I apply this function with an exemple, it does not fit .

imageoriginal={{0.492279, 0.413776}, {0.17979, 0.510059}}

ImageAdjust[imageoriginal,{1.,.5}]={{0.976837, 0.741327}, {0.0393686, 1.}}

## 2 Answers

This is stated in the documentation (third example in Properties & Relations)

ImageAdjust[image,{c,b,γ}] is equivalent to ImageApply[Clip[(b+1)(c+1)#^γ - c/2, {0, 1}]&, image]

Consider these examples:

ref = N @ Subdivide @ 255;
img = ref~Partition~10 // Image;

ImageAdjust[img, {1, 0, 1}];
ListLinePlot[{Flatten @ ImageData @ %, ref}]

ImageAdjust[img, {0, 1, 1}];
ListLinePlot[{Flatten @ ImageData @ %, ref}]

ImageAdjust[img, {0, 0, 2}];
ListLinePlot[{Flatten @ ImageData @ %, ref}]