1
$\begingroup$

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.}}
$\endgroup$

2 Answers 2

3
$\begingroup$

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]

$\endgroup$
2
$\begingroup$

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}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.