InsightSoftwareConsortium / ITKColorNormalization

Structure preserving color normalization on H&E images using a reference image
Apache License 2.0
18 stars 5 forks source link

BUG: Fix subtle error for dark pixels #33

Closed Leengit closed 2 years ago

Leengit commented 2 years ago

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.