---
title: "Comment by Mansi Borle on \"Image Enhancement Using Zero-Memory Point Processing Operations\" | Hashnode"
description: "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-int"
url: "https://hashnode.com/posts/image-enhancement-using-zero-memory-point-processing-operations/682453f70a5c4428e57b3b6a/comment/682456e8285ee3a1976eaed0"
---

[Discussion](https://hashnode.com/posts/image-enhancement-using-zero-memory-point-processing-operations/682453f70a5c4428e57b3b6a)

Comment [Image Enhancement Using Zero-Memory Point Processing Operations](https://hashnode.com/posts/image-enhancement-using-zero-memory-point-processing-operations/682453f70a5c4428e57b3b6a)

[Mansi Borle](https://hashnode.com/@mansi2511)

[May 14, 2025](https://hashnode.com/posts/image-enhancement-using-zero-memory-point-processing-operations/682453f70a5c4428e57b3b6a/comment/682456e8285ee3a1976eaed0)

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?

[Manjiri C](https://hashnode.com/@itsmanjiric)

[May 14, 2025](https://hashnode.com/posts/image-enhancement-using-zero-memory-point-processing-operations/682453f70a5c4428e57b3b6a/comment/682456e8285ee3a1976eaed0#reply-682457da372911d44bb6a4be)

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.
