PARALLEL IMPLEMENTATION OF MORPHOLOGICAL PROFILE BASED SPECTRAL-SPATIAL CLASSIFICATION SCHEME FOR HYPERSPECTRAL IMAGERY

: Extended morphological proﬁle (EMP) is a good technique for extracting spectral-spatial information from the images but large size of hyperspectral images is an important concern for creating EMPs. However, with the availability of modern multi-core processors and commodity parallel processing systems like graphics processing units (GPUs) at desktop level, parallel computing provides a viable option to signiﬁcantly accelerate execution of such computations. In this paper, parallel implementation of an EMP based spectral-spatial classiﬁcation method for hyperspectral imagery is presented. The parallel implementation is done both on multi-core CPU and GPU. The impact of parallelization on speed up and classiﬁcation accuracy is analyzed. For GPU, the implementation is done in compute uniﬁed device architecture (CUDA) C. The experiments are carried out on two well-known hyperspectral images. It is observed from the experimental results that GPU implementation provides a speed up of about 7 times, while parallel implementation on multi-core CPU resulted in speed up of about 3 times. It is also observed that parallel implementation has no adverse impact on the classiﬁcation accuracy.


INTRODUCTION
Hyperspectral imaging (Goetz, 2009) sensors capture an image scene in hundreds of fine contiguous spectral bands in ultraviolet to infrared region providing rich spectral and spatial information.Classification is an important tool for hyperspectral image analysis having applications in many areas including urban development, environmental studies, agricultural monitoring, and defense etc.However, the high dimensionality poses certain challenges to the supervised pixelwise classification due to curse of dimensionality and limited availability of training samples.Often dimensionality reduction is performed as a pre-classification step to mitigate such problems.PCA (Joliffe, 2002), discrete boundary feature extraction (DBFE) (Lee and Landgrebe, 1993), discrete wavelet transform (DWT) (Bruce et al., 2002), and maximum noise fraction (MNF) (Chang and Du, 1999), etc. are among the most important feature extraction techniques used for dimensionality reduction.
Unlike conventional spectral approach, better classification accuracies can be achieved by integrating spectral and spatial contents.Although, spatial information is not directly inherent with the pixels and usually determined using pixel neighborhood relationships.Some classes in an image may have similar spectral characteristics and therefore, complementary spatial information can help better discriminating the classes.
Mathematical morphology as been successfully used for spatial feature extraction in the form of structural information.Morphological operations require a priori definition of structuring element (SE) with a specified size and shape.However using a fixed size SE is not appropriate as one particular size may well detect the objects from a specific class but may not be suitable to detect objects from some another class.Benediktsson et al. (2003) used morphological operators with a multiscale approach to collect structural information.In multiscale approach, successive opening and closing operations are performed using a series of SEs of increasing sizes to build morphological profiles (MPs).For hyperspectral images the MPs are build on each of the individual band images.These MPs all together are called extended MP (EMP).Considering high dimensionality of hyperspectral images, usually EMPs are built on the components obtained from some feature extraction technique.Benediktsson et al. (2005) built EMPs on principal components (PCs) and reported better results over spectral methods by experimenting on urban data.Fauvel, et al. (2008) computed EMPs from PCs and stacked with spectral features to perform classification with SVM.A different approach is used by Lv et al. (2014) to build MPs from PCs using multi-shaped SEs.
Considering volume of data, processing hyperspectral images results in higher computational cost.
Although, feature extraction alleviates computational burden to some extent, multicore processors and graphics processing units (GPUs) can be used to further speed up such operations in parallel processing environment at desktop level.Tan et al. (2015) presented parallel version of SVMs on GPUs using compute unified device architecture (CUDA) (Sanders and Kandrot, 2011) to accelerate classification.Wu et al. (2015) proposed parallel implementation of composite kernels on SVMs for hyperspectral image classification.The small calculations are executed at CPU and intensive computations are ported on GPUs.The GPU based sparse representation classification of hyperspectral images is addressed in references (Wu et al., 2015a, Wu et al., 2015b).Extreme learning machine algorithm is developed on GPU for spectral-spatial classification for hyperspectral imagery by Lopez-Fandino et al. (2015) to significantly reduce execution time.This paper presents an EMP based spectral-spatial classification method for hyperspectral images in parallel processing architecture.The rest of the paper is organized as follows.The process of creating EMPs is described in Section 2 and Section 3 presents parallel implementation of EMP based method.The experimental results with analysis are provided in Section 4. Finally Section 5 concludes the work.

EMP
Mathematical morphology is a useful technique for extracting structural information from an image.Erosion and dilation are the two fundamental operators in mathematical morphology (Soille, 2004), which are applied with a structuring element.Using erosion and dilation, other morphological operators can be defined among which, opening and closing are two widely used operators.Application of opening isolates the bright structures in the image while closing operation isolates the structures in darker areas.The concept behind the opening is to dilate an eroded image to recover eroded image structures bigger than structuring element.In contrast the closing operation is achieved by eroding the dilated image in order to recover initial shape of the dilated image structures.The determination of size of the structuring element is an important issue as most often the size of the structures in consideration is not exactly known.For this reason a range of different growing structuring element sizes are explored to record the proper response of the structures in the image.This concept is called granulometry (Soille, 2004).Pesaresi and Benediktsson (2003) defined the concept of morphological profile Φ using granulometry to analyze the image structures.The opening profile Φ n (x) at pixel x of image I, which is a collection of n opening outcomes, is defined as where φ i (x) is opening by reconstruction with structuring element of size i.The closing profile Ψ n (x) at pixel x is given by where ψ i (x) is closing by reconstruction with structuring element of size i.The morphological profile at pixel x is defined by stacking Φ n (x) and Ψ n (x) as follows where Φ (1) (x) = Ψ (1) (x) = I(x).Eq. ( 3) defines morphological profile for one band image.For high dimensional images the profiles are created from m-band transformed data to form EMP.
The EMP for a pixel x is formed as follows where M P k is the morphological profile built on kth band image.The serial implementation approach for creating EMPs are described in Figure 1, where pixels are operated one by one with the help of a loop.
A method for spectral-spatial hyperspectral image classification is presented in Figure 2. Although, EMPs consist of both spectral and spatial components but in this methodology explicit spectral features are combined with EMPs to fully exploit spectral information.

PARALLEL IMPLEMENTATION
In traditional approach, the operations are carried out pixel by pixel.However, since same operations are performed on all the pixels, this methodology is well suitable for single instruction  The methodology given in Figure 1 can be implemented on such processor by distributing computational load among the multiple cores to speed up the execution.The different cores can simultaneously and independently execute operations.Languages like MATLAB have in-built features like parfor to write parallel programs.
In order to create morphological profiles in parallel, the inner loop in Figure 1 can be replaced by parfor loop as described in Figure 3.The parfor loop uses processor cores to perform identical operations on different elements.MATLAB creates multiple copies known as workers, which are invoked and released as and when required.If workers are less than the simultaneous identical tasks needed, the job scheduler switches and coordinates cores among the tasks.
GPUs are massively parallel processors based on SIMD programming model.GPU can execute same instruction on multiple data elements with the help of thousands of concurrent threads.Individual threads handle different data elements.In GPU programming model, the parallel threads are arranged in a 2-D grid of blocks.Each block has multiple threads that are organized in a 3-D array.The grid and blocks are logically managed by the programmer, however upper limit on the sizes vary from device to device.In CUDA based implementations a special function known as kernel is created to specify instructions for parallel threads.GPUs are optimized for intensive computations (Wu et al., 2015a).Therefore, a hybrid CPU-GPU model is proposed for executing small operations on CPU while transferring memory intensive calculations on GPU as shown in Figure 4.As shown in the figure, after feature extraction, image data elements are transfered to the GPU.GPU creates EMPs and classifies with the help of SVM.For K-class problem, an ensemble of K(K − 1)/2 binary SVMs is created (Tan et al., 2015).Different binary SVMs can be handled by different processing threads.The classification map is then written back to the main memory.

EXPERIMENTS AND DISCUSSION
The experiments are carried out to evaluate the impact of parallel implementations on the execution time and classification accuracy.The details of experimental setup and results obtained are discussed in this section.

Hyperspectral images
The

Experimental setup
The SVM is implemented with LIBSVM (Chang et al., 2011) tool using radial basis function (RBF) kernel.The SVM parameters cost C and spread of kernel γ are optimally determined using 5-fold cross validation.The functions of LIBSVM are also used for parallel SVM implementation.The training samples are randomly taken from the ground reference image and rest of the reference pixels are used to test the accuracy of the results.The EMPs are created using SE of disk shape and size is varied as 3 × 3, 5 × 5, 7 × 7, and 9 × 9.The classification accuracies are determined in terms of kappa coefficient (Congalton and Green, 1999) defined as follows: where N is the total number of pixels, K is the number of classes in the image, xi represents the number of correctly classified pixels in ith class, yi is the number of pixels in class i, and zi represents the number of pixels classified in class i.

Results and analysis
The results are obtained for two parameters: execution time and classification accuracy (κ).The reported results for each experiment are average of ten trials.First, experiments are carried out for execution time.The execution times for serial, multi-core, and CPU-GPU implementations for both images are reported in Table 1.It can be observed that by exploiting multiple cores of CPU, the execution can be accelerated by a factor of ≈ 3. Since CPU used has only six cores, different elements are frequently scheduled to have run time leading to significant overhead.However, GPU being a massive parallel system is able to achieve speed up of ≈ 7 times.Larger the size of the image, more would be the speed up on GPU as also evident from the Table 1.La Mancha Alta image has more number of pixels than Pavia University image to be processed.Therefore, speed up is better for La Manch Alta image.
The classification accuracies are given in Table 2.Both classwise and global κ values are reported.It can be observed from the table that there is no adverse effect on the classification accuracy by parallel execution of the operations.Although, the accuracies in different implementations are different but differences are not significant.The observed differences in accuracies are due to random selection of training samples from the ground reference.

CONCLUSION
In this work parallel implementations of EMP based spectral-spatial classification of hyperspectral imagery are presented.
The implementations are done on multi-core processor and CPU-GPU hybrid systems.The experiments on two different kind of hyperspectral images demonstrated that execution was accelerated significantly without compromising classification accuracies.The mulit-core CPU implementation accelerated the execution by ≈ 3 times, while CPU-GPU hybrid implementation resulted in speed up by ≈ 7 times.Sensing Letters, vol. 12, no. 9, pp. 1973-1977.
Principal components PC of hyperspectral image, size vector s Output: Extended morphological profile EMP of the image for i=1 to npc //npc: number of PCs for j=1 to np //np: number of pixels Input: Principal components PC of hyperspectral image, size vector s Output: Extended morphological profile EMP of the image Input: The implementation is done on Intel Xeon E5-1650 operating at 3.50 GHz that features 6 cores and 16 GB RAM.The GPU is

Table 2 :
Global and classwise classification accuracies (κ) Tan, K. et al., 2015.GPU parallel implementation of support vector machines for hyperspectral image classification.IEEE Journal of Selected Topics on Applied Earth Observations and Remote Sensing, vol 8, no.10, pp.4647-4656.Wu, Z. et al., 2015.Parallel spatialspectral hyperspectral image classification with sparse representation and Markov random fields on GPUs.IEEE Journal of Selected Topics on Applied Earth Observations and Remote Sensing, vol.8, no.6, pp.2926-2938.Wu, Z. et al., 2015.GPU implementation of composite kernels for hyperspectral image classification.IEEE Geoscience and Remote