Consistently increment pixel intensity prior to computing its logarithm. Clarify comments describing the increment and later decrement.
The code takes logarithms of pixel intensity values, with the intent of first incrementing each intensity value to avoid log(0). However, the code failed to do the increment in one place, which gave small intensity errors in the output.
Consistently increment pixel intensity prior to computing its logarithm. Clarify comments describing the increment and later decrement.
The code takes logarithms of pixel intensity values, with the intent of first incrementing each intensity value to avoid log(0). However, the code failed to do the increment in one place, which gave small intensity errors in the output.