| Objective: To remove the noise from the color-normalized image |
| Input: Histopathology Image (D) |
| Output: Pre-processed Image (P) |
| 1: for each pixel (m,n) in D do |
| 2: Compute normalization constant I’ using Eq. (6) |
| 3: Initialize EANLM(m) as the filtered value for pixel (m,n) |
| 4: for each patch (Gm ) in the template window around (m,n) do |
| 5: Calculate weight w(m,n) based on Eq. (5) |
| 6: Accumulate weighted intensity from patches (Gn ) in the search window around (m,n) using Eq. (7) |
| 7: Assign EANLM(m) to P(m,n) using Eq. (8) |
| 8: end for |
| 9: Return P as the pre-processed image after noise reduction |