Parallel Selective Model for Digital Image Processing Algorithm

7 downloads 889 Views 1MB Size Report
Parallel Selective Model for Digital Image Processing. Algorithm. Henrique Y. Shishido. Informatics Coordination. UTFPR. Cornélio Procópio, Brazil.
Parallel Selective Model for Digital Image Processing Algorithm Henrique Y. Shishido

Anderson F. da Silva

Ronaldo A. L. Gonçalves

Informatics Coordination UTFPR Cornélio Procópio, Brazil [email protected]

Informatics Department UEM Maringá, Brazil [email protected]

Informatics Department UEM Maringá, Brazil [email protected]

Abstract— This work presents a parallel selective model for digital image processing based on message passing, which is used for calculating fragmentation index. Two selection and three estimation policies are proposed in conjunction with the algorithm. The basic idea is to select pixels to be processed, reducing the execution time even if there is an acceptable loss of quality. Two metrics are proposed to evaluate our model. The results confirm the advantages of the parallel selective model where the performance reaches 6.39 and the efficiency 80% in the cases evaluated in this work. Keywords — parallel fragmentation index

I.

processing;

image

processing;

INTRODUCTION

Many researches related to chemical phenomenons, biologic patterns recognition, weather forecasts, identification of earth surface transformations and so forth, use digital image processing to recognize patterns [1], being the convolution [3] a common technique used to filter the frequency of pixels. However, the sequential processing may not supply the necessary computation to process an expressive number of images with specific filters in a desired response time. This work proposes a parallel selective model to process digital images using and a convolution algorithm to generate the fragmentation index on a remote sensing image described in [2]. The parallel selective model was implemented on a MPI platform and executed on a cluster of computers.

III.

The selective model applies the convolution partially on an original pixel subset, according to the selection policy, estimating the values for the other pixels, according to the estimation policy, saving time due to the unrealized convolutions. The tradeoff between performance and visual quality is a fundamental question. Obviously, to improve performance the time spent to estimate a pixel must be less than the time spent to convolute the same pixel. We have proposed two selection policies: Positional and Gray Scale. The Positional Policy was used as follows. It scans the image, pixel by pixel, and subsequently applies convolution on one pixel and estimates the next n pixels, repeatedly. When a pixel is estimated during the convolution, it is changed by a right or wrong value, depending on the accuracy of the estimation policy. A right value is one that can be produced by the real convolution in the same conditions. A wrong value is one that differs of the right value. An error rate can fall within acceptable limits depending on the application requirements. We have proposed three estimation policies. In this work the LCA (Last Convolution Again) policy was used due to the fact to produce the lowest error rates. LCA uses the same value obtained in the last convolution to estimate the pixels inside the interval, which is associated to the pixel immediately before the interval. We set a 2-pixels gap because it is able to produce an error rate below 10%. IV.

II.

CONVOLUTION AND THE FRAGMENTATION INDEX

The filtering methods [4] based on spatial domain are related to the neighborhood of the target pixel. The convolution is a technique that acts on the spatial domain through a matrix known as a mask. Each mask element is associated with a value called coefficient. Applying a mask on a pixel (x,y) implies calculating a new value for it. Turner [2] describes a convolution to calculate the index of fragmentation IF to measure the influence of human activities on the nature [5]. If all pixels of the mask belong to different classes (intervals), the index will be 1 (100%), indicating maximum region variability. However, if all pixels belong to the same class, the index will be 0 (0%), indicating no variability. A sequential version of the IF algorithm [3] was used to create our parallel selective model.

SELECTIVE PARALLEL MODEL

PERFORMANCE EVALUATION

Our experiments were performed in a homogeneous cluster with 6 AMD Opteron Dual-Core running Linux CentOS, OpenMPI and OpenCV. We worked with two quality measures: Error Rate and Error Degree. The first one represents the percentage of wrong pixels in the whole image. The second one represents the medium error difference among the wrong and right pixels in terms of gray scale. However, they are not discussed in this paper because the space is restricted. It was used five different images of remote sensoring with 8039x6852 pixels. The speedup has been calculated dividing the time of sequential algorithm by time of parallel selective algorithm. Figure 1 shows the speedup obtained by the Selective Model. X-axis represents the number of MPI processes, the Yaxis the mask size, and the Z-axis the speedup. In general we

can observe that increasing the number of processes becomes more important when the mask size is also increased. In fact, 3-pixels masks do not exploit the computational power of the cluster, even with 11 processes, reaching a speedup only about 1.10. As expected, the parallel version has lower performance than the sequential version with only one process, due to the overhead imposed by the parallelization mechanism. On the other hand, the performance achieved by 15-pixels masks reaches a speedup of 6.39 with twelve processes. For 5-pixels masks the performance is twice the sequential performance.

Fig. 2. Efficiency of Parallel Selective Model.

Figure 3 shows the percentage spent on communication. If we observe the impact of communication when 3-pixels masks are used, the communication overhead with 12 processes reaches 28% of the overall runtime. For 15-pixels masks the communication overhead becomes smaller consuming approximately 2% of overall runtime. Indeed, if the processes number or the mask size increase, the computation amount increases too.

Fig. 3. Impact of communication on Parallel Selective Model Fig. 1. Speedup of Selective Parallel Model

The parallelization efficiency (Figure 2) is affected by the increase in the number of processes that increases the communication overhead. Note that small masks provide fewer instructions to be processed. Therefore, the worst efficiency is obtained by the experiment with 12 processes and 3-pixels masks which uses only 8% of the cluster capacity, and the best use is found in the execution of one process and 15pixels masks where the efficiency reaches around 80%.

V.

CONCLUSION AND FUTURE DEVELOPMENTS

The Selective Model proposed in this work is able to achieve good performance in several situations. The use of 3pixels masks causes a communication overhead around 28 % of the overall runtime. However, this percentage is reduced to 4% for 15-pixels masks. The performance reaches a speedup of 6.39 and the efficiency reaches 80%. Therefore, these results indicate that our approach is able to achieve performance. ACKNOWLEDGMENT We thank Araucaria Foundation and CAPES for the financial support. REFERENCES [1] [2] [3] [4] [5]

A. P. Crósta. Processamento digital de imagens de sensoriamento remoto. Campinas: IG/Unicamp, 170p., 1992. M. Turner. Landscape ecology: the effect of pattern on process. Annual review of ecology and systematics, 20(1):171–197, 1989. L. Batista. Space Geodesy Research Group, UNESP - P. Prudente, http://www.fct.unesp.br/pesquisa/grupos-de-estudo-e-pesquisa/gege. H. Pedrini and W. Schwartz. Análise de imagens digitais: princípios, algoritmos e aplicações. São Paulo: Thomson Learning, 2008. M. Galo and E. Novo. Indices de paisagem aplicados a analise do Parque Estadual Morro do Diabo e entorno. Anais do IX Simpósio Brasileiro de Sensoriamento Remoto. INPE/SELPER–Santos, 1999.