An Automatic Segmentation Algorithm for Solar Filaments in H-Alpha Images using a Context-based Sliding Window

— There are many features which appear on the surface of the sun. One of these features that appear clearly are the dark threads in the Hydrogen alpha (Hα) spectrum solar images. These ‘filaments’ are found to have a definite correlation with Coronal Mass Ejections (CMEs). A CME is a large release of plasma into space. It can be hazardous to astronauts and the spacecraft if it is being ejected towards the Earth. Knowing the exact attributes of solar filaments may open the way towards predicting the occurrence of CMEs. In this paper, an efficient and fully automated algorithm for solar filament segmentation without compromising accuracy is proposed. The algorithm uses some statistical measures to design the thresholding equations and it is written in the C++ programming language. The square root of the range as a measure of variability of image intensity values is used to determine the size of the sliding window at run time. There are many previous studies in this area, but no single segmentation method that could precisely claim to be fully automatic exists. Samples were taken from several representative regions in low-contrast and high-contrast solar images to verify the viability and efficacy of the method.


I. INTRODUCTION
Solar filaments are huge regions of very thick relatively cool plasma compared to the surface of the sun.These solar features appear as elongated and dark filaments in Hα solar images.CMEs are enormous bubbles of hot plasma (billions of tonnes of magnetized plasma) that is propagating away from the solar corona to the interplanetary medium at a very high velocity [1].The importance of studying solar filaments comes from considering its disappearances as a significant indicator for the possible occurrence of CMEs, which is considered as the major cause of geomagnetic storms.It is now almost certain that there is a close association between CME and filament disappearances ([1]- [12]).Most of the filament detection techniques depend on sliding windows over the image region of interest.This sliding window is the number of pixels that are shifted while scanning the image.The scanning speed of images greatly depends on the size of the sliding window and the computational power of the image processing system.A context-based sliding window is proposed in this study to fully automate the process of solar filament segmentation in Hα Images.The use of often user selectable, non-adaptable and non-automatic different sizes of structuring elements in filament detection techniques led to them being defined as non-automated.According to this hypothesis, no single filament segmentation method thus could accurately claim to be fully automatic.Additionally, most of the previous studies ([1], [5], [7], [8], [13]- [20]) follow an image scanning process using a fixed size sliding window according to a fixed step size.Also the sliding window size affects the results of the different filtering techniques like the median filter [21].The paper is organized as follows.The concept of the context-sensitive sliding window is presented in the next section.Section III overviews the algorithm of the context-based sliding window.Section Four is the conclusion.

II. CONTEXT-BASED SLIDING WINDOW
The common purpose of a sliding window is to give the possibility of checking the presence of the object in a rectangular box at different positions in the image.Subsequently, it is possible to use any of the many proposed methods to check the presence of an object in the sliding window or not.All previous methods of segmenting solar filaments rely entirely on customizing the statistical measures using a fixed sized sliding window.In general, the values of the statistical parameters in a local window are affected by the size of it.This research strongly proffers to adapt the size of the sliding window according to the window contents by using the Range (R) as a measure of variability, that is, the www.ijacsa.thesai.orgdifference between the lowest and highest image intensity values contained in the sliding window.To ascertain the effectiveness of using R and to optimize the image segmentation method, two samples; the first window ( ) and the second window ( ) were taken from two solar images as shown in the figures.

III. HOMOGENEITY AND HETEROGENEITY OF IMAGE REGIONS
To give an adequate opportunity for segmenting solar images and hence judge between the homogeneous and heterogeneous regions, four values were calculated from different representative image samples, these being the value of R, the window side length; the window size ( as the integer square root of R; the mean value ( ) and the standard deviation ( .These values are shown in Fig. 2 and 3. Samples were taken to represent from non-filament regions (in order to represent them) as shown in Fig. 2(a) and Fig. 3(a).Other samples were taken from filament regions.Finally, the last samples were taken to represent the filament edges as shown in Fig. 2(c) and Fig. 3(c).Fig. 4 displays the same parameters for the low contrast image filaments.

IV. ADAPTIVE FILAMENT SEGMENTATION
The process of image segmentation is the first and most important phase in analyzing and interpreting these images.The success or failure of the segmentation process may be considered as the success or failure of the subsequent image classes.There are many features that appear on Hα images but our goal through this algorithm is to separate the image into white foreground filaments and the black background.Fig. 5 shows the results after applying the segmentation code as shown in Fig. 7 on the solar image observed by Big Bear Solar Observatory (BBSO) on 2 nd January 2001.Fig. 6 shows the results after applying the segmentation code on the solar image observed by Meudon Observatory (MO) on 1 st April 2002.

V. EVALUATION AND RESULTS
The size of the sliding window will change automatically after calculating the range in the first iteration based on the sliding window intensity values.The highest value that may exist in any sliding window is 255 (white) and the lowest one is 0 (black), which means that the maximum possible can only be, 255 -0 = 255.A low window size indicates a homogeneous region (such as no-filament or filament region) and a high value indicates a non-homogenous region (such as the regions of filament edges).In Hα solar images; the filaments appear as dark features.This means if the sliding window is around the edges points of the filament pixels then the range value will be high otherwise, it will be low.The values calculated for each sample in all the regions are summarized in Table I. www.ijacsa.thesai.org, where Pi is the set of pixels and n being the number of pixels inside the solar image.
: The standard deviation for the whole image which is computed as where n the number pf pixels inside the whole image and the pixel value.
Tables II and III contain the values of the different operators of ( 1) and ( 2) for all the regions.Tables I, II and III verify that (1) is correct for harmonic (relatively uniform) regions (with filaments or without filaments).
However, it was observed that (1) does not work well with the areas that have low contrast filaments; so another condition is adapted to segment these filaments, as shown in ( 2) and as it is clearly seen in Table III.

VI. CONCLUSION
An accurate, robust and novel algorithm for solar filament segmentation has been introduced in this paper.The algorithm adopted an adaptive, automated sliding window size according to the extent of the heterogeneity of the window pixels instead of using a fixed value.The algorithm uses extracted windows from two different solar images, one high contrast image and one low contrast image.Some statistical calculations were used to judge the presence of the solar filament or not.The range as a statistical measure played an important role in automating the segmentation process.The mean value and standard deviation of the image intensity values in addition to the range, mean value and standard deviation of the adaptive sliding window pixels have been used to make up the filament segmentation equations.This technique can be better evaluated in the subsequent solar image classes which include merging broken structures; filaments characterizations and detecting filament disappearances; additionally it can be the basis for all these subsequent automatic operations.

Fig. 1 Fig. 1 .
Fig.1shows the unevenly illuminated solar images.These images were enhanced using an image enhancement technique introduced by[16].

Fig. 2 .
Fig. 2. Samples taken from solar image observed at Meudon Observatory on 1 st April 2002: (a) Two samples from no filament pixels.(b) Two samples from filament pixels.(c) Two samples from Filament Edges.

Fig. 3 .
Fig. 3. Samples taken from solar image observed at Big Bear Solar Observatory 2 nd January 2001: (a) Two samples from no-filament pixels.(b) Two samples from filament pixels.(c) Two samples from Filament Edges.

Fig. 5 .
Fig. 5.The output after applying the algorithm on the BBSO image.

Fig. 6 .Fig. 7 .
Fig. 6.The output after applying the algorithm on the MO image.Setting the window size to any initial value For i=1 to m do // m is the number of image rows For j=1 to n do // n is the number of image columns Calculate I µ and For n=1 to W do // W: window rows For m=1 to W do Calculate W µ , W R and If (((I µ > (W µ + )) OR (W µ < )) then Filaments Else No Filaments End if End for m End for n End for j End for i Fig. 7.The segmentation pseudo code.

TABLE I .
STATISTICAL DETAILS OF THE SOLAR IMAGE AND THE SLIDING WINDOW