VintaSoft Twain .NET SDK Discussions

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Issue with ChangeContrast and ChangeBrightness



Issue with ChangeContrast and ChangeBrightness

Post 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

Post 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

Post by isoler »

Makes sense.

Thanks!


Page 1 from 1: 1