High Quality - Low Computational Cost Technique for Automated Principal Object Segmentation Applied in Solar and Medical Imaging

The objective of this paper is to introduce a fully computerized, simple and low-computational cost technique that can be used in the preprocessing stages of digital images. This technique is specially designed to detect the principal (largest) closed shape object that embody the useful information in certain image types and neglect and avoid other noisy objects and artifacts. The detection process starts by calculating certain statistics of the image to estimate the amount of bit-plane slicing required to exclude the non-informative and noisy background. A simple closing morphological operation is then applied and followed by circular filter applied only on the outer coarse edge to finalize the detection process. The proposed technique takes its importance from the huge explosion of images that need accurate processing in real time speedy manner. The proposed technique is implemented using MATLAB and tested on many solar and medical images; it was shown by the quantitative evaluation that the proposed technique can handle real-life (e


Image Processing Stages
Digital image processing and analysis is among rapidly growing technologies.It encompasses a wide-ranging field of applications in our everyday life.Medical, solar, industrial, text recognition, biometrics and graphics, are just examples of hundreds of possible applications of image processing (Solomon and Breckon 2011).Although every single application needs a well-designed approach to parse and extract the required useful information and, most of these approaches can be categorized under a single or multi major aspects that include but are not limited to: image visualization, sharpening, enhancement, recognition, retrieval, segmentation and /or restoration, etc. (Gonzalez and Woods 2002).
The modified algorithms to handle the aspects and applications almost follow a semi-schematic route that includes the following phases (Gonzalez and Woods 2002), and the contribution of such modified method almost fall in one or more of these phases.
The proposed work in this paper is aimed to contribute on the first phase to make the preprocessing in certain applications faster (i.e. less computational) while improving the outcomes accuracy of the subsequent phases.This technique will be applied, tested and evaluated on digital images in two fields (namely, solar imaging and medical fundus images).A brief review about the processing of these images will be highlighted in the reminder of this section.While the motivation, methodology, results, evaluation and conclusions of the proposed technique will be pronounced and shown in the next sections.

Solar Images
Solar imaging techniques are usually implemented to extract numerical features that provide efficient representation of solar features, solar activities or general regions of interest in the different types of publicly available solar images.The integration of advanced image processing techniques with solar physics concepts can positively improve the ability of knowledge extraction and increase the ability to predict forthcoming solar activities that may have serious impacts on our daily life (Qahwaji, Green et al. 2011).MDI-magnetogram is an example of solar images that draw a lot of researchers' attention because they depicts information about the whole solar magnetic activity which is thought to be the main driver of almost all other solar activities (Stöhr and Siegmann 2007).The important information (knowledge) in these images are in the solar disk that shows different indications (e.g.sunspots, active regions, prominence, filaments) about the magnetic activity.
The processing of this and other types of solar images such as MDI-continuum, Calcium II K-line, H-alpha, etc. starts by the detection of the main solar disk and removing any possible surrounding noise and textual information (e.g.date, time, directions, instrument name, and wavelength).Figure 1 shows examples of these images.

Medical Fundus Images
Fundus images are acquired by special medical camera to create a photograph of the inner surface of the eye including the retina, optic disc, macula, vessels and fovea (Yannuzzi, Ober et al. 2004).Fundus images are used by ophthalmologists to detect many different medical signs such as hemorrhages, exudates, cotton wool spots, blood vessel abnormalities and pigmentation (Akram and Rubinstein 2005).Manual examination (Ophthalmoscopy) is a tedious and time consuming process; yet no conclusive decisions can be made on spot without resorting to further inspecting using Fundus photographs.With the current technological advancement in image processing, it is possible to carry out rigorous hands free diagnosis that lowers the cost and the work load done by ophthalmologists for manual examination.
There are many medical research centers that publicly provide datasets of fundus images at different sizes for different subjects.The most common datasets are DIARETDB0 (Kauppi, Kalesnykiene et al. 2006), DIARETDB1 (Kauppi, Kalesnykiene et al. 2007), DRIVE (Staal, Abràmoff et al. 2004), Figure 2. The processing of these images starts by the segmentation of the retinal disk and removing the noisy background that can affect the subsequent features (e.g.optic disk, vessels) extraction (Jaafar, Nandi et al. 2010, Akram 2012).
The following section states the problem under investigation and the motivation of the work.While in section 3, the proposed technique is presented.The proposed technique implementation, accuracy and time efficiency are discussed and evaluated in section 4. Finally, the presented work is concluded in section 5.

Problem Statement and Motivation
As the amount of available solar and medical images is growing, there is a growing need for new approaches (i.e.systems and tools) to ease the analysis and knowledge extraction from these images.Such approaches must provide a real-time fully automated solutions while providing high accuracy outcomes and diagnosis that converge with the specialists' ones.
In the processing of the previously described images, solar disk and retina disk segmentation (mask) is considered to be the first phase of any proposed approach.This phase is important to: 1. Exclude the non-informative noisy background.
3. Improve result, where values of the noisy background are not included in the subsequent analysis such as statistic-based and training techniques in the sake of feature detection.
4. Determine some other parameters such as area and radius of the disk for further analysis.
5. Reduce the amount of information to be transferred in the case of cloud-based computing services (i.e.SaaS).
6. Unify the processing of different image types.As an example, the available datasets use a variety of instruments (i.e.cameras) to acquire the images, hence the noise and artifacts levels are not unified neither define.A region of interest based approach is used in (Zharkova, Ipson et al. 2003) to detect the solar limb.This approach starts by estimating the solar disk intensity by computing the mean intensity of a small rectangle located at the image center.Then a histogram analysis is performed to estimate the thresholding value that separates the disk from the background.A region filling algorithm and an iterative Canny edge detector is then applied to mark pixels within the solar disk and to complete the disk detection process.
In (Qahwaji and Colak 2005), the filling algorithm in (Qahwaji and Green 2001) is used to detect the largest closed shape object (i.e.Solar disk).This algorithm is mainly implemented by the 1) morphological hit-miss transform (HMT) which is used for the edge detection and noise removal, and the 2) morphological watershed transform (WST) which is used to analyze the image.As mentioned above, this step is important because it removes textual and non-solar information that may be superimposed on the original acquired image.A series of gray-scale erosion, gradient transformation and thresholding is used to detect the solar limb (disk) in (Curto, Blanca et al. 2008).A 3×3 structuring element (SE) is used to implement the erosion step, followed by subtracting the original image form the eroded one to achieve the eroded gradient transformation which strengthen the edges intensities.As a consequent, applying a thresholding technique will be easier.
In (Akram 2012), retinal disk segmentation is achieved by implementing a local mean and variance based method applied on non-overlapping blocks of the HSI version of an equalized and filtered fundus image.In each block, the mean and the standard deviation is calculated to decide whether the block is a part of the background or the retina disk.In the subsequent phases, the refinement techniques results in the removal of some other parts that contain useful information about the retina health.This approach is also used in (Marrugo and Millan 2011) but reinforced by a principle component analysis (PCA) model to enhance the detection of the foreground objects and avoid any bias to the background region.
In (Garaibeh, Ma'mon et al. 2014), the extraction of retina disk is achieved by applying an edge detection filter followed by a contour-based detection algorithm where the detection starts by defining suitable locations followed by completing the contour to fit a circle arc in the regions of discontinuity.
A growing region based retina disk segmentation is performed in (Giancardo 2011) by scaling the image to an empirically chosen level to reduce the computational costs.Four seeds (chosen to be at corners with a certain offset from the borders) were used to implement the growing region algorithm based on three criteria.Then the image is rescaled back to its original size.This approach leads to less computational cost but in expense of quality loss.
To conclude, the above referenced works achieved the main disk (Sun or Retina) segmentation using different high computational cost approaches.Also, these approaches need to estimate some other important parameters to apply the proposed approaches, such details can be found on these references.
In this piece of work, we present a simpler but efficient disk segmentation approach.The proposed technique is aimed to separate the solar or retina foreground (disk) from the background using a simple, low-computational, non-adaptive and non-iterative approach without going through complex filters, while maintaining a very high accurate results.

Proposed Methodology
Bit planes based noise suppression techniques are often used for still images compression (Strutz 2001, Pandian and Sivanandam 2012), and in other applications such as retinal blood vessels localization (Fraz, Barman et al. 2012).Through our investigations, we found that bit planes elimination along with simple morphological operations can be utilized in foreground estimation for solar and retinal disks.The success of the proposed technique will contribute for any system in the field of the above two possible application.
A bit plane of a digital discrete signal (such as image) is a set of bits corresponding to a given bit position in each of the binary numbers representing the signal.As an example, from  The proposed technique starts by checking whether the original image is colored RGB (e.g.Fundus retinal images) or gray-scaled (e.g.MDI magnetogram) one.In the case of RGB images, a conversion from RGB to HSI color space is performed according to equations ( 1), ( 2), (3), then the rest of the proposed technique is applied on the I (Intensity) channel.Using the HSI color space makes it easier to remove noise and it is by definition closer to the human perception (Jain, Kasturi et al. 1995).It is noteworthy that only equation ( 1) is considered in our implementation because it represents the I channel value directly.In the case of gray scaled image, the subsequent processing is performed directly, Figure 5.
where R, G and B represent the Red, Green and Blue channels of the colored image.
The next step is the slicing level estimation which is achieved by considering the four corners of the original image in a histogram based process.The histogram of the four corners are computed, then the average of the pixels above the 10 th and below the 90 th percentiles points of the cumulative distribution is calculated and considered to be the bit-plane slicing level (SL).A pixel-wise ANDing operation is then applied with the binary representation of SL, and all pixels with zero results are considered to be part of the background.
As an example, it is found by that keeping the 5 most significant bit planes of the retinal image and combining them while discarding the 3 least significant bit planes will maintain the image's disk main structure while removing the vast majority of pixel noise (especially those around the edges) as well as the low intensities on the background.Majority of pixel noise put out of the way and black background made really black, applying a global thresholding at zero intensity yields a relatively fine mask.Followed by erosion and dilation morphological operations will remove the very small amount of noise pixels remaining and fills the gaps within the main disk area.
This approach requires neither complex statistical computations nor mathematical computations of the total image; rather employs a single logical AND operation on binary level to discard the least significant bit planes.Moreover, the resulting mask requires much less refinement computation.Figure 6 shows the goodness of the proposed technique segmentation even before applying morphological operations.Applying a circular edge detector with centers only on the outer coarse segmentation is found to enhance the coarse segmentation accuracy without dramatically increase the computational time costs.

Accuracy Performance
Usually, the evaluation of an algorithm is done by comparing the new results with certain ground truths.To evaluate the proposed technique in this paper, the SOHO/MDI magnetogram and Drive datasets were used.These specific datasets are used in the evaluation for many reasons (contain different illumination levels and verities, contain different noise levels, contain a ground truth to evaluate and contain different artifact such as textual tagging in the case of solar images).

Solar MDI Images
Solar images: Each MDI solar image is provided in both formats (GIF and FITS).Each FITS file contains a header that describes many parameters of the corresponding MDI image, these parameters include the center, radius and area of the solar disk.Also, the background area in the FITS files are represented by a not a number (NaN) symbol.These parameters along with the spatial location of the detected disk will be compared to the results of the proposed technique when applied to the corresponding .GIF image.It is noteworthy that multiple MDI GIF images are provided daily; so that it is important to match exactly the same GIF and FITS files for the same day for the sake of evaluation.
The proposed technique is implemented using MATLAB without using the predefined functions, which means that the proposed algorithm and the ones under comparison were built using basic MATLAB statements to avoid any effect of these predefined functions.Table 1 compares the results obtained by applying the proposed technique on some MDI GIF examples with that provided in the corresponding FITS files.Three types of errors are calculated according to equations ( 4), ( 5) and ( 6): where FITSArea, FITSRaduis, FITSXc and FITSYc represent, respectively, the area, radius, center's x-axis coordinates and center's y-axis coordinates of the provided mask in FITS files.While, ProposedArea, ProposedRaduis, ProposedXc and ProposedYc represent the area, radius, center's x-axis coordinates and center's y-axis coordinates of the calculated mask using the proposed technique which are calculated as follows:  Area: is calculated by summing up the number of foreground pixels after applying the proposed technique.
 Radius: is calculated by averaging the distances from the center towards the four mask ends along the quadratic directions.
It is clear that the proposed technique shows a very high accuracy performance; the highest error achieved for the three defined types of errors is .88%(less than 1%); this means more than 99% similarity.It is worth mentioning that a 1% to 2% oblateness is exist in some solar GIF images; which results in disagreements between the calculated parameters and the corresponding provided in the FITS files headers (Zharkova, Ipson et al. 2003).

Medical Fundus Images
The Drive dataset (Staal, Abràmoff et al. 2004) provides publicly 40 fundus images and their corresponding manually labelled masks.These available masks will be compared to the masks resulted by applying the proposed technique on the same corresponding images.Figure 9 shows an example to compare the result of the proposed technique applied on a fundus image and the corresponding mask provided by Drive dataset.Table 2 compares the masks obtained by applying the proposed technique on 15 randomly selected Drive fundus images with the corresponding masks provided by Drive dataset (i.e.ground truth).The above types of errors (equations ( 4), ( 5) and ( 6)) are used again in the evaluation.It is clear that the proposed technique shows a very high accuracy performance; the highest error achieved for the three error types is 2.98%; this means a similarity that exceeds 97%.To ensure that the proposed algorithm shows the same goodness and computational time saving despite the existence of severe abnormalities and despite their shapes in images, the proposed algorithm is applied on all images of DIARETDB0, DIARETDB1, and DRIVE datasets.It is difficult to show the segmentation results, while Figure 10

Conclusions
In this paper, we have utilized the concept bit-plane splitting to detect the large principal objects in some types of solar and medical images.The proposed technique revealed high quality results compared to other techniques that utilized iterative, adaptive, and complex edge detection techniques.The proposed technique is implemented on MATLAB operates on a Windows based platform.99% and 97% similarity were achieved when the proposed method is applied and compared to solar MDI-magnetogram and medical Fundus retinal images.This high degree of accuracy is achieved while reducing the processing time dramatically.
This piece of work represents single part of our ongoing research in solar and medical fundus image processing.
It is aimed that we can keep maintaining the subsequent phases of processing by keep eye on the simple adopted approach (i.e.bit-split slicing) along with other simple refinement, detection and classification techniques rather than complex ones of high computational cost.Also, further visualization and representation can be made making use of the state of the art utilization of cloud-based services (Hayajneh 2015).

Figure 3
Figure3illustrates the later fact by plotting the profile for a certain row in a retinal image.Using local or global thresholding based techniques to estimate and mask the background is often challenged by these problems.As a result of the presence of pixel noise and noisy background, the resulting mask from thresholding requires further refinement.Those obstacles are often overcome by applying a combination of morphological operations and filters on the foreground mask in order to refine it.

Figure 3 .
Figure 3. (A) Retinal image and (B) a zoomed background profile (along row = 100) showing that the background is not purely black

Figure 4 ,
Figure 4, we can see that the least 3 significant bit planes ( Figure 4 G, H, I) of a retinal image do not encode much useful visual information; rather they seem rich with pixel noise.

Figure 4 .
Figure 4.An example of applying the bit plane splitting on a retinal image.A: original fundus image.B-I: Single bits slicing contribution from MSB (B) to LSB (I).

Figure 8 .
Figure 8. Example of MDI-magnetogram image.B: Provided FITS mask for A. C: Proposed technique applied on A. D: difference between B and C

Figure 9 .
Figure 9. Example of Fundus retinal image.B: Provided Drive mask for A. C: Proposed technique applied on A. D: difference between B and C

Figure 10 .
Figure 10.Comparison between the proposed technique and Akram's technique applied on all images in DIARETDB0, DIARETDB1 and DRIVE datasets

Table 1 .
Comparison between the proposed technique and the FITS files masks

Table 2 .
(Akram 2012)etween the proposed technique and the Drive images' masksBesides achieving a high accuracy records, in this validation, the ability of the proposed technique to reduce the processing time is investigated.The proposed technique is applied on different retinal image from different datasets (DIARETDB0, DIARETDB1, and DRIVE) and the CPU processing time is noted for each image and recorded.The technique in(Akram 2012), which is considered the simplest technique in literature, is applied on the same images and the corresponding processing time is recorded.

Table 3
shows the CPU time for coarse background estimation (Proposed technique and (Akram 2012) technique), the first 5 images of each of the databases (DIARETDB0, DIARETDB1, and DRIVE) were processed three times on each technique.The mean time for the three runs was calculated as well as the average of those means.It is easily noted fromTable 3 that the proposed technique reduces the processing time dramatically.

Table 3 .
Comparison between the proposed technique and Akram's technique applied on different images of different datasets