In the logarithmic transformation section, why is s = c log(1 + r) used instead of just s = c log(r)? What role does the +1 play in avoiding issues with low-intensity values like 0?
In digital images, pixel intensity values (r) can be 0.
But log(0) is undefined, it actually goes to negative infinity, which causes errors in computations.
So, to avoid this problem, we add 1 before taking the log:
If r = 0, then log(1 + 0) = log(1) = 0 which is perfectly safe
For higher values of r, the transformation still works as intended.