简体   繁体   中英

Unit measurement for brightness and contrast in opencv

在此处输入图片说明

contrast = 30, brightness = 350

what is the suitable unit measurement for contrast and brightness? (for documentation purposes)

Those values are not contrast and brightness, although they can be used to adjust contrast and brightness. The documentation calls then alpha and beta . What that statement says is "take the range of pixel values in my image, and remap then linearly so that the lowest value is now 30 and the highest value is 350". If your pixels spanned from 20 to 60 before, this would expand the contrast by using more pixel values. The conversion would be

new = (old-20) * (350-30) / (60-20) + 30

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM