Page 1 of 1

Issue with ChangeContrast and ChangeBrightness

Posted: Thu Apr 06, 2017 1:06 pm
by isoler
Hello,

we are currently evaluating your product to use it in out image acquisition application. As part of the evaluation we were trying to use the AcquiredImage ChangeContrast and ChangeBrightness methods and the results are not the expected ones.

If we do a loop calling any of the two methods with positive and negative values (+20 , -20 for example) we end up with a black or white image, we expected to have always the same image as -20 should leave the original image after doing a +20. Looks like the process is somehow 'destructive'.

Is this normal or are we missunderstanding something?

Regards.

Re: Issue with ChangeContrast and ChangeBrightness

Posted: Thu Apr 06, 2017 4:49 pm
by Alex
Hello,

The ChangeContrast and ChangeBrightness methods get the pixel value from image, process the pixel value and save the processed pixel value back to the image. Minimum pixel value is 0, maximum pixel value is 255. When you increasing (+20) the contrast for pixels with colors (235, 234, ..., 254, 255), all pixels values will be set to 255. When you decreasing (-20) the contrast for pixels with colors (0, 1, ..., 19, 20), all pixels values will be set to 0. In other words the ChangeContrast and ChangeBrightness methods can lose the image information. I hope I answered to your question.

Best regards, Alexander

Re: Issue with ChangeContrast and ChangeBrightness

Posted: Fri Apr 07, 2017 9:55 am
by isoler
Makes sense.

Thanks!