MCPcopy Create free account
hub / github.com/BBuf/Image-processing-algorithm / gammaTransform

Function gammaTransform

Correction algorithm/GammaCorrection.cpp:16–40  ·  view source on GitHub ↗

来自:https://blog.csdn.net/linqianbi/article/details/78617615 gamma校正原理: 假设图像中有一个像素,值是 200 ,那么对这个像素进行校正必须执行如下步骤: 1. 归一化 :将像素值转换为 0 ~ 1 之间的实数。 算法如下 : ( i + 0. 5)/256 这里包含 1 个除法和 1 个加法操作。对于像素 A 而言 , 其对应的归一化值为 0. 783203 。 2. 预补偿 :根据公式 , 求出像素归一化后的 数据以 1 /gamma 为指数的对应值。这一步包含一个 求指数运算。若 gamma 值为 2. 2 , 则 1 /gamma 为 0. 454545 , 对归一化后的 A 值进行预补偿的结果就 是 0. 783203 ^0. 454545 = 0. 894

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected