Mais conteúdo relacionado Semelhante a Region wise processing of an image using multithreading in multi core environ (20) Mais de IAEME Publication (20) Region wise processing of an image using multithreading in multi core environ1. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
20
REGION WISE PROCESSING OF AN IMAGE USING
MULTITHREADING IN MULTI CORE ENVIRONMENT & ITS
APPLICATION IN MEDICAL IMAGING
Sanjay Saxena1
, Neeraj Sharma2
, Shiru Sharma3
Research Scholar, School of Biomedical Engineering, IIT (BHU), Varanasi, UP, India1
Associate Professor, School of Biomedical Engineering, IIT (BHU), Varanasi, UP, India2
Assistant Professor, School of Biomedical Engineering, IIT (BHU), Varanasi, UP, India3
ABSTRACT
Fast processing of an image is a major requirement in many of image processing
applications especially in the case of medical imaging. In today’s scenario we can see that
real time image processing applications need an enormous amount of processing power,
computing proficiency and vast resources to perform the image processing applications. The
limitations appear on image processing systems due to the dimension and nature of the image
to be processed. It seems that parallel image processing would be the best solution to obtain
higher speed of operation at real time resources constraints & fully deployment of available
resources. This paper represents region wise parallel processing of the image instead of
implementing mainly existing parallel algorithms such as grid wise or blocks wise processing
to achieve excellent and speedy result. Although the existing parallel computing algorithm
provide to some extent parallelism for image processing but fails to provide image processing
operations varying at a huge rate. Parallel processing by image’s region of interest allows a
larger image to be sub-divided into a set of different regions & each region is handled by a
particular core present in the processor, where each core performing their individual task.
This type of processing gives significantly efficient result rather than the existing parallel
implementation of image processing application. Our experiments illustrate that the parallel
implementation of the algorithm using results in a speed-up a propos 200% compared with
sequential implementation on a core i3 processor, while a speed-up a propos 600% on Intel
Xeon Processor. This paper also explains its application in medical imaging.
Keywords: Core, Image Processing, Medical Imaging, Multithreading, Parallel Computing,
Region.
INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING
& TECHNOLOGY (IJCET)
ISSN 0976 – 6367(Print)
ISSN 0976 – 6375(Online)
Volume 4, Issue 4, July-August (2013), pp. 20-30
© IAEME: www.iaeme.com/ijcet.asp
Journal Impact Factor (2013): 6.1302 (Calculated by GISI)
www.jifactor.com
IJCET
© I A E M E
2. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
21
I. INTRODUCTION
Digital image processing is an ever expanding and dynamic area with applications
reaching out into our everyday life such as medicine, space exploration, surveillance,
authentication, automated industry inspection and many more areas [1]. As we know that it is
the process to evaluate and manipulate the image in order to improve the superiority and
finding several meaningful information from the image. Parallel processing by image region
allows a larger imaging task to be assigned to a set of parallel pipelines, each performing
some task but on individual regions [2]. Basically there are three types of image processing
operations low level operations like smoothing, convolution, histogram, generation etc
middle level image processing operations like region labeling, motion analysis etc and high
level image processing operations object recognition [3]. Main problem arises in the image
processing applications when we work on large images like medical images (CT, PET, and
MRI) and image data set. Due to size of the image and large data set it takes more time to
compute. To compute the entire image processing algorithm in reasonable time it is necessary
to compute parallel instead of implementing sequential.
The main goal of this research is to improve efficiency of parallel processing in multi core
architecture which is easily available and extracting the statistical features of particular region
of interests (ROIs) as per requirement.
II. THEORY
Statistical features of the image plays a very vital role in image understanding. The
various statistical measures [4, 10] are mean, mode, median, variance, standard deviations,
covariance, skewness and kurtosis. All of these measures are used in a wide range of
scientific and social research, including: biostatistics, computational biology, computational
sociology, network biology, social science, sociology and social research etc. In this research
we are able to find features like standard deviation, variance, co variance, mean, median,
mode, auto correlation coefficient, kurtosis, skewness etc of individual distinct region. Some
of them are described as below
Mean: The arithmetic mean filter [5], also known as averaging filter, operates on an sliding
‘m×n’ window by calculating the average of all pixel values within the window and replacing
the center pixel value in the destination image with the result. Its mathematical formulation is
given as follows
݂ሺ,ݔ ݕሻ ൌ
ଵ
∑ ݃ሺ,ݎ ܿሻሺ,ሻאௐ (1)
Where ‘g’ is the noisy image, f(x,y) is the restored image, and ‘r’ and ‘c’ are the row
and column coordinates respectively, within a window ‘W’ of size ‘m×n’ where the operation
takes place[11].
Standard Deviation: In terms of image processing it shows how much variation or
"dispersion" exists from the average (mean, or expected value). Mathematically standard
deviation is given by
݂ሺ,ݔ ݕሻ ൌ ට
ଵ
ିଵ
∑ ቂ݃ሺ,ݎ ܿሻ െ
ଵ
ିଵ
∑ ݃ሺ,ݎ ܿሻሺ,ሻאௐ ቃ ²ሺ,ሻאௐ (2)
3. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
22
Variance: The variance [8] is a measure of how far a set of numbers is spread out.
݂ሺ,ݔ ݕሻ ൌ
ଵ
ିଵ
∑ ቂ݃ሺ,ݎ ܿሻ െ
ଵ
ିଵ
∑ ݃ሺ,ݎ ܿሻሺ,ሻאௐ ቃ ²ሺ,ሻאௐ (3)
Mode: In statistics [4], the mode is the value that occurs most frequently. In image
processing filter will each pixel value by its most common neighbor.
Mathematically,
Mean – Mode = 3(Mean - Median) (4)
These above & many more statistical features are explained in [11].
If we are able to find these features by individual region present in the image than it
could be very beneficial for the images having more than one regions with different
characteristics. In this paper we are able to find statistical features individually for particular
region. It also deals with developing a tool which efficiently parallelizes our sequential
process to find ROI present in Medical Images in very minimum of time as per requirement
by the medical practitioner. It is necessary to check when the parallel approach is precious or
when it is not. Another objective of this paper is to produce efficient ideas of paralleling.
Steven J Simske [2] explained the aspect of region wise parallel image processing. Parallel
processing by image region allows a larger imaging task to be assigned to a set of parallel
pipelines, each performing the same task but on a different data set. Image analysis of this
type is readily amenable to a familiar cloud computing approach, map-reduce, when for
example a large set of images is being analyzed to find a single item. Examples of parallel
processing by image region include (multi-page) document skew detection and multiple face
detection and tracking. Following there is a figure which is explained by Steven J Simske the
region wise processing
Fig. 1: Example of a parallel processing by image region implementation. In this
example, the slides captured from 13 different slide adapter-equipped scanners are
shown. 13 parallel processors can be used for analysis of the slides (and parallel
processing by image)[2]
4. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
23
To measure the speed up of parallel execution we are using the following relation
which is defined in [12] and Image processing with multi core architecture is explained in
[14].
Observed Speedup :
Observed speedup of a code which has been parallelized, defined as:
wall-clock time of serial execution
---------------------------------------------
wall-clock time of parallel execution
And many more speed up measurement techniques are explained by Enrique Alba [13].
Parallel computing can also be applied by MATLAB. As we know that MATLAB is a
high-level language and interactive environment for numerical computation, visualization,
and programming. It also provide efficient parallel computing tool box for multithreading.
Parallel MATLAB:
MATLAB is widely used for developing/prototyping algorithms. The High Level
Language and Integrated Development/Visualization environment leads to productive code
development by parallelizing MATLAB code
1. Algorithm can be run with different/larger data sets.
2. Algorithm can be run with larger parameter sweeps.
3. Compute times may be reduced.
So in this paper we are using MATLAB to do multithreading.
III. IMPLEMENTATION
Our implementation mainly consist of three phases:
1) Preprocessing & Segmentation of the image on client core or processor
2) Activation of threads in the cores and assignment of ROIs to different threads
3) Calculation of distinctive features of Regions as per requirements, Produces the
result on client processor & De allocation of threads.
Main steps of our implementation are given in the following Flow Chart:
5. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
24
Flow Chart:
IV. RESULT AND DISCUSSION
This section describes the results obtained with the region wise parallel implementation.
This also deals with the environment used in the experiments, the test images, and results,
along with the evaluation of the performance obtained with the parallelization.
Start
Upload an Image on client Core
Activation of Required no of threads
to Different cores
Image Enhancement on client
Basic Morphological operations
Image Segmentation and
Identification of Required ROIs
Region Wise
Processing?
End
Send Pixels Values of Distinct
Region to Different Threads
Calculation of Distinctive Features
of Different ROIs as Per
Requirements & Send to Client
De allocation of Threads present in
cores & Displays the result in client
No
Yes
6. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
25
Evaluation
Two experiments are given to show the speed difference between the sequential
computing and the parallel computing. We have tested above algorithm on 12 different sized
cell images. And the efficiencies of the parallel computing implemented by these algorithms
analyzed and compared respectively. In this paper of we are showing two cell image on
different cores.
Experiment 1:
Hardware Configuration:
CPU: Inter (R) Pentium (R) Core i3 CPU 2.30 GHz.
RAM: 2GB.
Hard Disk Drive: 320 GB
Software Environment:
Operating System: Windows 7 Home Basic 64 bit.
Development Tools: MATLAB R2011a, Intel Compiler 9.1.
Table 1: Calculation of speed up in Core i3 Processor
Experiment 2:
Hardware Configuration:
CPU: Intel(R) Xeon(R) E5640 @ 2.67 GHz
RAM: 12 GB
Software Environment:
Operating System: Windows 7 Home Basic 64 bit.
Development Tools: MATLAB R2012a
Images Size Active Threads in Cores Speed Up
Cell1.tiff 256 X 256 1 0.87
Cell1.tiff 256 X 256 2 1.5
Cell1.tiff 256 X 256 4 3.8
Cell1.tiff 256 X 256 8 5.65
Cell2.tiff 3172 X 1024 1 0.95
Cell2.tiff 3172 X 1024 2 1.2
Cell2.tiff 3172 X 1024 4 3.42
Cell2.tiff 3172 X 1024 8 5.91
Table 2: Comparative Study of Sequential and Parallel Version
Images Size Active Threads in Cores Speed Up
Cell1.tiff 256 X 256 1 0.786
Cell1.tiff 256 X 256 2 2.15
Cell2.tiff 3172 X 1024 1 0.98
Cell2.tiff 3172 X 1024 2 1.68
7. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
26
Result of segmentation and some statistical features calculation of different cell’s
regions present in the image on client processor
Figure 2: Original Image Figure 3: Segmented Image
Figure 4: Segmented Binary Image of a Figure 5: Centroids of different segmented
single cell image regions
Figure 6: Histogram of region1 in Thread Figure 7: Histogram of region2 Thread
of a activated core of a activated core
segmented image original image
Weighted (red) and Unweighted (blue) Centroid Locations
0 100 200 300 400 500 600
0
10
20
30
40
50
60
Histogram of region 1
0 100 200 300 400 500 600
0
10
20
30
40
50
60
Histogram of region 2
8. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
27
Fig. 8: Histogram of Region 3 Fig. 9: Histogram of Region 4
Fig. 10: Histogram of Region 5 Fig. 11: Histogram of Region 6
Fig. 12: Standard Deviations of Regions Fig. 13: Mean of Regions
0 100 200 300 400 500 600
0
5
10
15
20
25
30
35
40
45
Histogram of region 3
0 100 200 300 400 500 600
0
20
40
60
80
100
120
140
Histogram of region 4
0 100 200 300 400 500 600
0
5
10
15
20
25
30
35
40
Histogram of region 5
0 100 200 300 400 500 600
0
10
20
30
40
50
60
70
80
90
100
Histogram of region 6
1 2 3 4 5 6
0
10
20
30
40
50
60
Region Label Number
StandardDeviation
1 2 3 4 5 6
0
20
40
60
80
100
120
Region Label Number
Mean
9. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
28
Fig. 14: Mode Fig. 15: Median
Fig.16: Variance
V. CONCLUSION & ITS APPLICATION IN MEDICAL IMAGING
We can see from the above experiment that processor having more cores produces
good speed up if the algorithm is efficiently organized. This work presents region wise
parallel processing of the image. By implementing these above we can see that all of the
activated cores are able to handle their individual region. Histogram of different cell’s region
is calculated by different threads activated in different cores in the same way we calculated
different statistical features of different cell’s region. We can observe that this is a very
promising result since it allows the exploitation of the enormous processing power of existing
processors with multiple cores. The main focus of this implementation to improve
performance of parallel image processing. In the future, the purpose is to use the same
principle of division of regions present in the image to Medical Dicom images like CT, PET
image of abdomen and assignments of different regions like liver, kidney, spleen etc to
different activated kernels so that information gain is efficient and execution time is fast.
This version would allow the segmentation of large dicom images that do not fit in main
memory. Thus, it is expected that the image segmentation can handle extremely large data
efficiently and without requiring special hardware. It is also expected to propose others
parallel versions for different hardware like clusters and GPUs (Graphics Processing Units).
Normal a CT scan, PET scan, etc take much time to produce the result so by parallelizing our
code we can find good result in very reasonable time.
1 2 3 4 5 6
0
10
20
30
40
50
60
70
80
90
Region Label Number
Mode
1 2 3 4 5 6
0
20
40
60
80
100
120
Region Label Number
Median
1 2 3 4 5 6
0
500
1000
1500
2000
2500
3000
Region Label Number
Variance
10. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
29
REFERENCES
[1] Daggu Venkateshwar Rao, Shruti Patil, Naveen Anne Babu and V Muthukumar,
“Implementation and Evaluation of Image Processing Algorithms on Reconfigurable
Architecture using C-based Hardware Descriptive Languages” for International Journal of
Theoretical and Applied Computer Sciences, Vol. 1, No. 1, 2006.
[2] Steven J Simske, “Parallel Processing Considerations for Image Recognition Tasks”,
Parallel Processing for Imaging Applications, SPIE Vol. 7872, 2011.
[3] A.K.Manjunathachari, K.SatyaPrasad, “Implementation of Image Processing Operations
Using Simultaneous Multithreading and Buffer Processing” for ICGST, GVIP Journal,
Volume 6, Issue 3, December, 2006.
[4] E. Kreyszig Advanced Engineering Mathematics, J. Willey & Sons Inc. 2011.
[5] R. Gonzalez, R.E. Woods, Digital Image Processing, Upper Saddle River, NJ, Prentice
Hall, 2002.
[6] Chunsheng Ma, Spatiotemporal stationary covariance models, Journal of Multivariate
Analysis, Volume 86, Issue 1, July 2003, Pages 97-107.
[7] S. Zhnang, H. Yao, S. Liu, X. Chen, W. Gao, A Covariance-based Method for Dynamic
Background Subtraction, in proceeding of 19th International Conference on Pattern
Recognition, (ICPR 2008), Tampa, FL, 8-11 Dec. 2008, pp. 1-4.
[8] Aja-Fernandez, S.; Estepar, R.S.J.; Alberola-Lopez, C.; Westin, C.-F., Image Quality
Assessment based on Local Variance, in proceeding of 28th Annual International
Conference of the IEEE Engineering in Medicine and Biology Society,(EMBS '06), Aug.
30 2006-Sept. 3 2006, vol., no., pp.4815-4818.
[9] J. Robinson, Covariance matrix estimation for appearance-based face image processing.
In Proc. BMVC05, pages 389-398, 2005.
[10] J. Mayer, On testing image processing applications with statistical methods, in Proceedings
of Software Engineering 200 ( E 200 ), ecture otes in Informatics, Gesellschaft f r
Informatik e. ., llen Druck erlag GmbH, onn, 200 vol. -64, pp.69-78.
[11] Vijay Kumar, Priyanka Gupta, “Importance of Statistical Measures in Digital Image
Processing”, International Journal of Emerging Technology and Advanced Engineering,
Volume 2, Issue 8, August 2012.
[12] Blaise Barney, Lawrence Livermore National Laboratory, “Introduction to Parallel
Computing”.
[13] Enrique Alba, “Parallel evolutionary algorithms can achieve super-linear performance”,
Information Processing Letters 82 7-13, 2002.
[14] Greg Slabaugh, Richard Boyes, Xiaoyun Yang, “Multicore Image Processing with
OpenMP”.
[15] R. Edbert Rajan and Dr.K.Prasadh, “Spatial and Hierarchical Feature Extraction Based on
Sift for Medical Images”, International Journal of Computer Engineering & Technology
(IJCET), Volume 3, Issue 2, 2012, pp. 308 - 322, ISSN Print: 0976 – 6367,
ISSN Online: 0976 – 6375.
[16] Mane Sameer S. and Dr. Gawade S.S., “Review on Vibration Analysis with Digital Image
Processing”, International Journal of Advanced Research in Engineering & Technology
(IJARET), Volume 4, Issue 3, 2013, pp. 62 - 67, ISSN Print: 0976-6480, ISSN Online:
0976-6499.
[17] J.Rajarajan and Dr.G.Kalivarathan, “Influence of Local Segmentation in the Context of
Digital Image Processing – A Feasibility Study”, International Journal of Computer
Engineering & Technology (IJCET), Volume 3, Issue 3, 2012, pp. 340 - 347, ISSN Print:
0976 – 6367, ISSN Online: 0976 – 6375.
11. International Journal of Computer Engineering and Technology (IJCET), ISSN 0976-
6367(Print), ISSN 0976 – 6375(Online) Volume 4, Issue 4, July-August (2013), © IAEME
30
AUTHOR’S PROFILE
1. Sanjay Saxena, currently Pursuing PhD in School of Biomedical Engineering,
IIT(BHU), Varanasi, UP, India. His research interests are Medical Image Processing, Parallel
Computing, Computer Vision.
2. Dr. Neeraj Sharma is an Associate Professor at the School of Biomedical
Engineering, IIT(BHU), Varanasi, UP, India. His research interests are Biomedical Image &
Signal Processing, Bio Instrumentation.
3. Dr. Shiru Sharma is an Assistant Professor at the School of Biomedical Engineering,
IIT(BHU), Varanasi, UP, India. Her research interest is Biological Control system,