Demo of implementing CICD pipeline for image noise reduction algos, conducting few sample test cases on CircleCI to test the resulting image reduction
Here I am trying to run few basic Spatial denoise algos over a with 4 differnt types of noises added.
Filters that are implemented:
- Mean Filter
- Median Filter
- Guassian Filter
- Conservative Filter
First we try to add 4 different type of noise to our image
- Guassian Noise
- Poission Noise
- Sath and Pepper
- Speckle
python addnoise.py
This will create 4 distorted images in the images/ directory Now we run our filters on top of these images
To verify the efficacy, we will convert the images to Grayscale and run a noise calculation function before and after applying the filter
python MeanFilter.py
##### Running MEAN filter on different noises ####
Estimating quality for guassian image before mean filter 0.6361
Estimating quality for guassian image after mean filter 0.1604
Estimating quality for poisson image before mean filter 0.6416
Estimating quality for poisson image after mean filter 0.1614
Estimating quality for S&P image before mean filter 11.9353
Estimating quality for S&P image after mean filter 0.2798
Estimating quality for speckle image before mean filter 61.4482
Estimating quality for speckle image after mean filter 0.5790
##### Running MEDIAN filter on different noises ####
Estimating quality for guassian image before median filter 0.6361
Estimating quality for guassian image after median filter 0.1981
Estimating quality for poisson image before median filter 0.6416
Estimating quality for poisson image after median filter 0.1995
Estimating quality for S&P image before median filter 11.9353
Estimating quality for S&P image after median filter 0.2358
Estimating quality for speckle image before median filter 61.4482
Estimating quality for speckle image after median filter 1.6339
python GuassianBlur.py
##### Running GAUSSIAN filter on different noises ####
Estimating quality for guassian image before Gaussian filter 0.6361
Estimating quality for guassian image after Gaussian filter 0.1825
Estimating quality for poisson image before Gaussian filter 0.6416
Estimating quality for poisson image after Gaussian filter 0.1836
Estimating quality for S&P image before Gaussian filter 11.9353
Estimating quality for S&P image after Gaussian filter 0.2732
Estimating quality for speckle image before Gaussian filter 61.4482
Estimating quality for speckle image after Gaussian filter 0.3154
We can also run UnitTest on these algos
python -m unittest
(DJ) ag841k@US-00010509:~/AG/TopazLabs$ python -m unittest test.py
....
----------------------------------------------------------------------
Ran 4 tests in 13.222s