Masters defense for Parallel Processing for Digital Image Enhancement
By Nora Youssef
Defense: 1 Oct 2015
Judges:
Prof. Dr. El-Sayed M. El-Horbaty - ASU
Prof. Dr. Hani Mohamed Kamal Mahdi - ASU
Prof. Dr. Mohamed Waheed Meselhey - Suez Channel University
1. PARALLEL PROCESSING
FOR DIGITAL IMAGE
ENHANCEMENT
Nora Youssef Fahmy
B.Sc. in Computer and Information Sciences,
Teaching assistant at Computer Science Department
Faculty of Computer and Information Sciences
Ain Shams University
Supervised By
Prof. Dr. El-Sayed M. El-Horbaty
Dr. Abeer M. Mahmoud
Cairo 2015
2. AGENDA
Introduction
Problem Definition
Objectives
Related Work
Methodologies
Conclusions & Future Work
Publications
References
3. AGENDA
Introduction
Problem Definition
Objectives
Related Work
Methodologies
Conclusions & Future Work
Publications
References
5. GRAYSCALE IMAGE
Monochrome / One color image
No color info
Represent the brightness of the image
8 bits/pixel data 256 different brightness
level
6. MEDICAL IMAGE
Used to create images of the human body
Seeks to
Reveal internal structures hidden by the skin and bones
Diagnose and treat disease
PET CT MRI
7. DEGRADATION MODEL
Noises
Domains
Filters
𝒈(𝒙, 𝒚)
𝒇^
(𝒙, 𝒚)
Noise
𝜼(𝒙, 𝒚)
+
DEGRADATION RESTORATION
𝒇(𝒙,𝒚)
Degradation
function
H
Restoration
Filter(s)
9. SALT & PEPPER NOISE
Additive
𝑝 𝑧 =
𝑃𝑎 𝑓𝑜𝑟 𝑧 = 𝑎
𝑃𝑏 𝑓𝑜𝑟 𝑧 = 𝑏
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Due To:
Quick transients
Data transmission errors
10. IMAGE ENHANCEMENT &
RESTORATION
Attempts to recover an image that has been distorted
by using a priori knowledge of the degradation
process.
𝒈(𝒙, 𝒚)
𝒇^
(𝒙, 𝒚)
Noise
𝜼(𝒙, 𝒚)
+
DEGRADATION RESTORATION
𝒇(𝒙,𝒚)
Degradation
function
H
Restoration
Filter(s)
12. SPATIAL DOMAIN
𝑔(𝑥, 𝑦) = 𝑇[𝑓(𝑥, 𝑦)]
Direct manipulation of pixels in an
image
Covers the neighborhood operations
(Convolution)
Filters in this domain are time
consuming
14. TRANSFORM DOMAIN
(FREQUENCY DOMAIN)
𝐹(𝑢, 𝑣) = 𝑅[𝑓(𝑥, 𝑦)]
𝑔(𝑥, 𝑦) = 𝑅−1 𝑇[𝐹(𝑢, 𝑣)]
A representation of an image as a sum of complex
exponentials of varying magnitudes, frequencies, and
phases
15. FREQUENCY FILTERING
Filters in spatial domain have their corresponding form in
frequency domain
Convolution in the spatial domain corresponds to multiplication in
the frequency domain, and vice versa
Wiener filter
Gaussian removal
De-blurring
23. AGENDA
Introduction
Problem Definition
Objectives
Related Work
Methodologies
Conclusions & Future Work
Publications
References
24. PROBLEM DEFINITION
Images are corrupted by multi-noise type (i.e. Gaussian, salt &
pepper) at the same time.
There is an open demand for multi-noise removal filters.
25. PROBLEM DEFINITION
Medical images have very large size
Processing these forms take so much time to process
sequentially
We have to parallelize the traditional sequential
algorithms for the sake of time performance
improvement.
26. AGENDA
Introduction
Problem Definition
Objectives
Related Work
Methodologies
Conclusions & Future Work
Publications
References
27. OBJECTIVES
1. Study the literature work and implement Gaussian de-noising
experiment as a case study.
28. OBJECTIVES
2. Design & Develop sequential hybrid de- noising filter for multi-
noise removal and compare between it and the simple filters in terms
of peak signal to noise ratio (PSNR).
29. OBJECTIVES
3. Design & Develop a parallel hybrid de-noising filter then
compare it relative to the sequential hybrid above in terms of
time.
30. AGENDA
Introduction
Problem Definition
Objectives
Related Work
Methodologies
Conclusions & Future Work
Publications
References
31. RELATED WORK
Single Noise Removal
Multi-Noise Removal
Parallel Image Processing
35. Year Authors Distortion Hybrid Input
Quality
Criteria
2014 Seema and
Meenakshi
G.
Speckle + Gaussian Median Filter based on DWT
via soft thresholding +
Mean absolute difference
Standard gray scale
images
PSNR
2013 Ankita D.
and et.al
Camera & object
motion blurs +
Gaussian +
Salt & pepper
Wiener + Median Gradient images PSNR
MSE
2013 Versha R.
and
Priyanka K.
Gaussian +
impulsive +
Speckle +
Possion
Curvelet transform +
Unsharp Mask filter +
Median filter
One gray & One
colored images
PSNR
2012 J U. and G
R.
Gaussian + Impulsive Haar wavelet filter +
soft thresholding technique +
center weighted median
10 DICOM images PSNR
MAE
UQI
ET
49. PSEUDO-CODE
original = read image from file
original = convert to double
values
noisyBuf = degradImage(original)
procedure hybridFilter (noisyBuf)
adapOnly = apply adaptive
median filter
adapMedian(noisyBuf, 7 pix)
hybrid = apply wiener filter
wiener(adapOnly, original)
hybrid = apply
contrast(hybrid)
end procedure
procedure degradeImage(original)
I1 = Add circular blur to original
I2 = Add Gaussian noise to I1
I3 = Add Salt & Pepper noise to I3
return I3 as Noisy buffer
end procedure
1
50. PSEUDO-CODE
original = read image from file
original = convert to double
values
noisyBuf = degradImage(original)
procedure hybridFilter (noisyBuf)
adapOnly = apply adaptive
median filter
adapMedian(noisyBuf, 7 pix)
hybrid = apply wiener filter
wiener(adapOnly, original)
hybrid = apply
contrast(hybrid)
end procedure
procedure adapMedian(g, Smax)
f = g; %initial setup
alreadyProcessed = false(size(g));
for all window size k = start from 3 to Smax do:
get Min, max and median Values of window and
store it in zmin, zmax and zmed;
determine if we will use level b processing in
processByLvlB;
zB = (g > zmin) & (zmax > g);
outputZxy = processByLvlB & zB;
outputZmed = processByLvlB & ~zB;
f(outputZxy) = g(outputZxy);
f(outputZmed) = zmed(outputZmed);
alreadyProcessed = alreadyProcessed or
processUsingLevelB;
if all alreadyProcessed array has been done
break the loop
end if
end for
fill the remaining values in alreadyProcessed if
exist by the zmed
end procedure
1
2
51. PSEUDO-CODE
original = read image from file
original = convert to double
values
noisyBuf = degradImage(original)
procedure hybridFilter (noisyBuf)
adapOnly = apply adaptive
median filter
adapMedian(noisyBuf, 7 pix)
hybrid = apply wiener filter
wiener(adapOnly, original)
hybrid = apply
contrast(hybrid)
end procedure
procedure wiener(adapOnly, original)
F = create power spectrum of the adapOnly
sigma_u = calculate noise sigma in F
output = wiener deconvolution for F given the
original image and sigma_u
end procedure
1
2
3
52. PSEUDO-CODE
original = read image from file
original = convert to double
values
noisyBuf = degradImage(original)
procedure hybridFilter (noisyBuf)
adapOnly = apply adaptive
median filter
adapMedian(noisyBuf, 7 pix)
hybrid = apply wiener filter
wiener(adapOnly, original)
hybrid = apply
contrast(hybrid)
end procedure
procedure contrast(image)
stretch image’s pixels values to fit in range 0 -
255
end procedure
1
2
3
4
53. ENVIRONMENT SETTINGS
Input:
Mode: Gray scale – no color info
Dimensions:
512 X 512 (0.5 MB)
128 X 128 (17 KB)
Resolution: 300px
Distortion
Gaussian
Salt & Pepper
Circular Blur
Machine Specs:
Processor: Intel core i5
RAM: 4 GB
OS: Windows 7 home edition, 64 bit
Tool:
54. RESULTS
Average PSNR for Adaptive, Wiener and Serial Hybrid
Image a b c d e f g h I J k l AVG
Adaptive 10.04 14.15 14.2 12.06 13.3 13.7 13.43 9.5 13.29 17.12 6.88 12.45 12.6
Wiener 11.63 23.37 18.63 14.37 16.46 8.79 12.39 11.6 15.06 22.53 11.92 16.73 15.3
Hybrid 13.36 29.7 26.7 22.75 19.32 18.34 17.66 18.84 18.97 26.04 24.69 20.64 19.8
55. 0
5
10
15
20
25
30
35
a b c d e f g h i j k l
PSNR
IMAGE
PSNR chart for full size images for proposed hybrid approach, adaptive
& wiener
Hybrid
Wiener
Adaptive
56. 0
5
10
15
20
25
30
35
a b c d e f g h i j k l
PSNR
IMAGE
Thumbnails VS. full Sizes of PSNR values
Thumbnails
Full Sizes
57. 0
10
20
30
40
50
60
a b c d e f g h i j k l
TIME(MINS)
IMAGE
Thumbnails VS. full Sizes time plot in minutes
Thumbnails
Full Size
58. PARALLEL HYBRID
ALGORITHM
Adaptive Median takes
too much time
Spatial domain
Window size increases
Fourier
Transform
Wiener
Inverse
Fourier
Transform
Adaptive
Median
Add Gaussian
Add Salt & Pepper
Circular Blur
Image
Noisy
Image
Power
Spectrum
Restored
Image
Spatial
Domain
Fourier
Transform
Domain
62. PSEUDO-CODE
original = read image from file
original = convert to double
values
noisyBuf = degradImage(original)
procedure parallelHybridFilter
(noisyBuf)
adapOnly = apply adaptive
median filter
parAdapMedian(noisyBuf, 11
pix, workersNo)
hybrid = apply wiener filter
wiener(adapOnly, original)
hybrid = apply
contrast(hybrid)
end procedure
procedure degradeImage(original)
I1 = Add circular blur to original
I2 = Add Gaussian noise to I1
I3 = Add Salt & Pepper noise to I3
return I3 as Noisy buffer
end procedure
1
63. PSEUDO-CODE
original = read image from file
original = convert to double
values
noisyBuf = degradImage(original)
procedure parallelHybridFilter
(noisyBuf)
adapOnly = apply adaptive
median filter
parAdapMedian(noisyBuf, 11
pix, workersNo)
hybrid = apply wiener filter
wiener(adapOnly, original)
hybrid = apply
contrast(hybrid)
end procedure
procedure parAdapMedian(g, Smax, workersNo)
for each worker in workersNo do in Parallel
apply adaptive median filter convolution
procedure on g
end for
end procedure
1
2
64. PSEUDO-CODE
original = read image from file
original = convert to double
values
noisyBuf = degradImage(original)
procedure parallelHybridFilter
(noisyBuf)
adapOnly = apply adaptive
median filter
parAdapMedian(noisyBuf, 11
pix, workersNo)
hybrid = apply wiener filter
wiener(adapOnly, original)
hybrid = apply
contrast(hybrid)
end procedure
procedure wiener(adapOnly, original)
F = create power spectrum of the adapOnly
sigma_u = calculate noise sigma in F
output = wiener deconvolution for F given the
original image and sigma_u
end procedure
1
2
3
65. PSEUDO-CODE
original = read image from file
original = convert to double
values
noisyBuf = degradImage(original)
procedure parallelHybridFilter
(noisyBuf)
adapOnly = apply adaptive
median filter
parAdapMedian(noisyBuf, 11
pix, workersNo)
hybrid = apply wiener filter
wiener(adapOnly, original)
hybrid = apply
contrast(hybrid)
end procedure
procedure contrast(image)
stretch image’s pixels values to fit in range 0 -
255
end procedure
1
2
3
4
66. ENVIRONMENT SETTINGS
Input:
Mode: Gray scale – no color info - 500px
Dimensions:
1900 x 2368 (277 KB)
3800 x 4736 (715 KB)
15200 x 18944 (2.5 MB)
Distortion:
Gaussian
Salt & Pepper
Circular Blur
Machine Specs:
Processor: Intel core i5
RAM: 6 GB
OS: Windows 7 enterprise edition, 64 bit
Tool
67. RESULTS
Time in seconds for the 3 image sizes each of which
divided into 2,4 an 8 partitions
Workers rang 2 - 12
Image Dimensions Serial Workers 2 4 6 8 10 12
1900 X 2368 79.5
2-Partitions 10.41 10.87 10.89 10.37 10.96 11.11
4- Partitions 12.1 11.99 12.22 12.29 12.49 12.23
8- Partitions 16.22 15.84 15.87 16.62 15.64 16.2
3800 X 4736 272.42
2- Partitions 44.67 41.59 36.14 35.12 42.86 49.28
4- Partitions 41.37 40.76 40.62 41.06 41.35 42.18
8- Partitions 54.88 54.65 56.63 56.85 54.69 55.21
7600 X 9472 1742.5
2- Partitions 640.34 863.87 856.24 652.75 914.24 690.8
4- Partitions 768 470.08 480.03 532.75 490.92 703.38
8- Partitions 847.9 538.55 769.91 505.67 656.4 611.59
68. 0
100
200
300
400
500
600
700
800
2 4 6 8 10 12
TIME(SECONDS)
WORKER
Average time consumed in seconds for serial and parallel 2,4 and 8
partition input
Serial
2-Partition
4-Partition
8-Partition
71. AGENDA
Introduction
Problem Definition
Objectives
Related Work
Methodologies
Conclusions & Future Work
Publications
References
72. CONCLUSIONS
Simple Gaussian filters comparison showed for the average run 3, 5,
7 and 9 pix that
Harmonic filter gave the max. PSNR
Geometric filter gave the min. Time
74. CONCLUSIONS
Parallel hybrid filter gave a speed up
3x for 2-partition
4x for 4-partition
3.5x for 8-partition
75. FUTURE WORK
Apply the proposed methods medical imaging modalities like PET
(Colored).
Try to corrupt the image with higher noise probabilities.
Change the noise type to but take care that it suits the selected
adaptive median and wiener filters.
IMAGE PROCESSING
76. FUTURE WORK
Try Different parallel model
GPU
CPU + GPU (Hybrid Parallel).
Compare time performance with the existing methods.
Integrate with cloud computing.
PARALLEL PROCESSING
77. AGENDA
Introduction
Problem Definition
Objectives
Related Work
Methodologies
Conclusions & Future Work
Publications
References
78. PUBLICATIONS
Nora Youssef, Abeer M.Mahmoud and EL-
Sayed M.EL-Horbaty “Gaussian De-
Noising Techniques in Spatial Domain for
Gray Scale Medical Images”, Int. J. of
Information Technologies and Knowledge
(ITK), Vol. 8, No.3, pp.90-100, Bulgaria,
Jun. 2014.
79. PUBLICATIONS
Nora Youssef, Abeer M.Mahmoud and
EL-Sayed M.EL-Horbaty “A Hybrid De-
Noising Technique for Multi-noise
Removal on Gray Scale Medical
Images”, Int. J. of Tomography and
Simulation (IJTS) IF 0.75, Vol. 28, No.2, pp
106-116, India, Mar. 2015.
81. PUBLICATIONS
Nora Youssef, Abeer M.Mahmoud and
EL-Sayed M.EL-Horbaty “A Parallel Hybrid
Technique for Multi-Noise Removal from
Grayscale Medical Images” Int. J Real
Time Image Processing, Springer, Berlin,
May 2015 (Submitted).
82. AGENDA
Introduction
Problem Definition
Objectives
Related Work
Methodologies
Conclusions & Future Work
Publications
References
83. REFERENCES
Ravi M. Rai and Urooz J. “Analysis Techniques For Eliminating Noise In Medical
Images Using Bivariate Shrinkage Method” Int. J. of Advanced Research in
Computer Engineering & Technology vol. 2, no. 10, pp. 2737 to 2740, 2013.
Ankita D. and Archana S. “An Advanced Filter for Image Enhancement and
Restoration” J. Open Journal of Advanced Engineering Techniques OJAET vol.1,
no. 1, pp. 7-10, 2013.
Salem Al-amri, N. V. Kalyankar and S. D. Khamitkar “A Comparative Study of
Removal Noise from Remote Sensing Image” Int. J. of Computer Science Issues,
vol. 7, no. 1, pp. 32 - 35, 2010.
Sanjay S., Neeraj S. and Shiru S. "Image Processing Tasks using Parallel
Computing in Multi core Architecture and its Applications in Medical Imaging"
Int. J. of Advanced Research in Computer and Communication Engineering
vol. 2, no. 4, pp. 1896 to 1899, 2013
84. REFERENCES
Rajeshwari S., Sharmila T. Sree “Efficient quality analysis of MRI image using
preprocessing techniques,” Proceedings of 2013 IEEE Conference on Information
and Communication Technologies (ICT), pp.: 391-396, 2013.
Rafael C. Gonzalez and Richard E. Woods “Digital Image Processing” Person
Education,3rd Edition, 2008.
Nikola R. and Milan T. “Improved Adaptive Median Filter for Denoising Ultrasound
Images” Conf. Advances in Computer Science pp. 196 - 174, 2012
P.Deepa and M.Suganthi “Performance Evaluation of Various Denoising Filters for
Medical Image”, IJCSIT, Vol. 5, No.3, pp. 4205-4209 , 2014
85. REFERENCES
B.Mohd. Jabarullah, Sandeep Saxena and Dr.C. Nelson Kennedy Badu“Survey
on Noise Removal in Digital Images” Vo. 6, No. 4, pp.45 -51 2012
Gajanand G.“Algorithm for Image Processing Using Improved Median Filter and
Comparison of Mean, Median and Improved Median Filter” IJSCE, vol. 1, no.5
pp. 304 – 311, 2011.
K.Selvanayaki, Dr. M. Karnan “CAD System for Automatic Detection of Brain
Tumor through Magnetic Resonance Image-A Review” Int. J. of Engineering
Science and Technology vol. 2, no.10, pp. 5890-5901, 2010.
Monika P. and Sukhdev S. “Comparative Analysis of Image Denoising
Techniques” Int. J. of Computer Science & Engineering Technology (IJCSET) vol.
5 no. 02 pp. 160 - 167, 2014
89. original = imread(imPath);
original = im2double(original);
noisyBuf = degradImage(original);
procedure hybrid (noisyBuf)
adapOnly = apply adaptive median filter (noisyBuf, 7);
hybrid = apply wiener filter (adapOnly, original);
hybrid = apply contrast(hybrid);
end procedure
procedure adapMedian(g, Smax)
f = g; %initial setup
alreadyProcessed = false(size(g));
for all window size k = start from 3 to Smax do:
zmin = get Min Value of window;
zmax = get Max Value of window;
zmed = get Median Value of window;
processByLvlB determine if we will use level b
processing;
zB = (g > zmin) & (zmax > g);
outputZxy = processByLvlB & zB;
outputZmed = processByLvlB & ~zB;
f(outputZxy) = g(outputZxy);
f(outputZmed) = zmed(outputZmed);
alreadyProcessed = alreadyProcessed or
processUsingLevelB;
if all alreadyProcessed array has been done
break the loop
end if
end for
fill the remaining values in alreadyProcessed if exist by
the zmed
end procedure
SERIAL CODE
90. PARALLEL CODE
original = imread(imPath);
original = im2double(original);
noisyBuf = degradImage(original);
procedure parallelHybrid (noisyBuf)
adapOnly = parallelAdapMedian(noisyBuf, 11, partition_i);
partition_i belongs to {2, 4, 8};
hybrid = apply Wiener function(adapOnly, original);
hybrid = apply contrast(hybrid);
end procedure
procedure parallelAdapMedian(g, Smax, parts)
[M, N] = size(g);
f = g; %initial setup
alreadyProcessed = false(size(g));
splittedImg = imgSpliter( f, M, N, parts );
for subimg = 1 into parts, numberOfWorkers_i do in parallel
numberOfWorkers_i belongs to {2, 4, 6 , 8, 10, 12}
myTemp = splittedImg(subimg);
t = alreadyProcessed;
for k = 3 to Smax do
zmin = get Min. value in subimg
zmax = get Max. value in subimg
zmed = get Median value in subimg
processByLvlB = determine if we will use level b
processing
zB = (g > zmin) & (zmax > g);
outputZxy = processByLvlB & zB;
outputZmed = processByLvlB & ~zB;
myTemp(outputZxy) = g(outputZxy);
myTemp(outputZmed) = zmed(outputZmed);
end for
splittedImg(subimg) = myTemp;
end parfor
end procedure
91. DATA SETS
idoimagaing
http://idoimaging.com/wiki/tiki-
index.php?page=Sample+Data
3DISC
http://www.3discimaging.com/our-products/medical-
solutions/firecr-medicalreaders/image-quality/
Computed Tomography Emphysema Database
http://image.diku.dk/emphysema_database/
Some of images are available on Google Images.
96. A PARALLEL HYBRID TECHNIQUE
FOR MULTI-NOISE REMOVAL
FROM GRAYSCALE MEDICAL
IMAGES
Submitted
Int. J. Real Time Image Processing
Springer
IF: 1.1
Germany
2015
Click Here ...
Editor's Notes
PET - Positron Emission Tomography
CT - Computerized Tomography
MRI - Magnetic Resonance Imaging
Ref: MNT Knowledge Center web link http://www.medicalnewstoday.com/articles/146309.php , Access date 9/1/2014
Green are commonly used for Gaussian removal
Red are commonly used for Sal & Pepper removal
Figure: Original image vs. Fourier magnitude representation
MSE Mean Square Error
SNR Signal to Noise Ratio
PSNR Peak Signal to Noise Ratio
Coarse-grained Few tasks but have large computations (Functional Decomposition)
Fine-grained Many tasks but have small computations (Data Decomposition)
MSE Mean Square Error
PSNR Peak Signal to Noise Ratio
CoC Correlation Coefficients
EPI Edge Preservation Index
MAE Mean Absolute Error
UQI Universal Quality Index
ET Execution Time (It was abbreviated by the paper’s Authors)
----
Ref to Book Chapter page 45 for full index
MSE Mean Square Error
PSNR Peak Signal to Noise Ratio
CoC Correlation Coefficients
EPI Edge Preservation Index
MAE Mean Absolute Error
UQI Universal Quality Index
ET Execution Time (It was abbreviated by the paper’s Authors)
----
Ref to Book Chapter page 45 for full index
Sample run of 3x3 pix filter size
A b
C d E from paper
Correctness
1. Initially we begin a 2D image matrix (I) with size NxN distorted by 3 types of noise, Blur (B), Gaussian (G) and Salt & Pepper (S&P).
2. The Selected adaptive median (am) filter will scan (I) pixel by pixel in a sequential manner for S&P removal.
3. (am) filter will terminate after a finite iterations based on (I) size NxN and subwindow size mxm.
4. The selected Wiener (w) filter will scan the image power spectrum (PS) for (B) and (G) removal and terminates on the end of the PS.
5. The whole filter will terminate after (w) filter termination as it is the last step in the hybrid filter.
Adaptive Median is the bottleneck
Because it runs on spatial domain and the filter on the worst case runs 3, 5, 7, 9, 11 px so that the filter size increases.
Adaptive Median is the bottleneck
Because it runs on spatial domain and the filter on the worst case runs 3, 5, 7, 9, 11 px so that the filter size increases.
Adaptive Median is the bottleneck
Because it runs on spatial domain and the filter on the worst case runs 3, 5, 7, 9, 11 px so that the filter size increases.
Adaptive Median is the bottleneck
Because it runs on spatial domain and the filter on the worst case runs 3, 5, 7, 9, 11 px so that the filter size increases.
Correctness
1. Initially we begin a 2D image matrix (I) with size NxN distorted by 3 types of noise, Blur (B), Gaussian (G) and Salt & Pepper (S&P).
2. Input image will be divided into k partitions.
3. The Selected adaptive median (am) filter remove the S&P noise from the k partitions in parallel.
4. (am) filter will terminate after a finite iterations based on I size NxN and subwindow size mxm.
5. The selected Wiener (w) filter will scan the image power spectrum (PS) for B and G removal and terminates on the end of the PS.
6. The whole filter will terminate scan the k partitions of the image and (w) filter termination.