Here is the code:

import sys, math
import numpy as np

import matplotlib.pyplot as plt
from skimage import io, color, filters, data
from skimage.filters import threshold_otsu
import matplotlib.image as mpimg
from skimage.restoration import denoise_tv_chambolle, denoise_bilateral
import skimage

rawimg = open('1_A.png')
img = mpimg.imread(rawimg)

denoised_img = denoise_bilateral(img, sigma_range=0.1, sigma_spatial=15)
#denoised_img2 = denoise_tv_chambolle(img, weight=0.1, multichannel=True)


On Thursday, July 30, 2015 at 4:23:34 PM UTC-7, Michael Alonge wrote:

I have an image that I would like to do some smoothing over on. 

Lets say there is a faint red spot on a white background. I would like to apply some algorithm that will smooth over the red with the white pixels surrounding the red pixels.

I thought this would be an application for the noise reduction tools ...

... but the picture output looked the same as before.

What is the best algorithm for smoothing over pixels by re assigning a pixel value with the average value of the pixels surrounding it?

Thank you