Keywords

1 Introduction

An Image processing application development involves various steps like Image acquisition, Pre-processing, Image Enhancement, Image Segmentation and Image Classification. Pre-Processing involves the removal of noise from Images. Conversion of color Images to gray Images and resizing the Images is part of Image Pre-processing. Image Enhancement increases the brightness and reducing the blurring in the images. Real time Images have poor contrast and induced noise during Image acquisition because of flaws in scanning devices and illumination. Segmentation and Edge detection methods extract important portions of images. The results obtained at the end in Image classification depend on preprocessing and segmentation and edge detection. The success of the classification procedure is eventually decided by pre-processing and Segmentation. Hence this paper proposes a new edge detection algorithm which uses sobel operator, morphological operations, masking and Gaussian Smoothing. New performance parameter namely Human Perception Clarity is mathematically introduced in the paper. The performance of the edge detection algorithm is enhanced by adapting morphological operations and Gaussian Smoothing. The experimental results show that the proposed algorithm integrated with morphological operations yields better results than classical edge detection methods.

1.1 Literature Review

Image Segmentation has been a challenging research area studied in [1,2,3,4,5,6]. Bhargavi [7] had developed a detailed survey on threshold based segmentation techniques in Image processing and refers that segmentation techniques were classified as contextual or non-contextual. Khan [8] had made a comparative study on Image segmentation methods and classifies Image segmentation as semi-interactive and fully automatic approaches. Nain [9] gave a dynamic thresholding based edge detection and emphasized the adaptive efficient peak detection of the image histogram and usage of morphological operations. Al-Kubati [10] had evaluated canny and Otsu image segmentation methods. Sucharita [11] made a comparative study on various edge detection techniques like sobel, Robert, prewitt and canny edge detection operators. Khalil [12] classified fish based on color histogram using back propagation classifier and he used color histogram and gray level co-occurrence matrix to classify fish species. Nagalakshmi [13] used canny edge detection for identification of prawn species. Das [14] made a study on Image segmentation techniques and classified segmentation methods. Thakare [15] classified segmentation methods into edge based, region based and Hybrid methods. Sainia [16] made a comparative study on edge detection algorithms. Narendra [17] gave a study of edge detection techniques in quality inspection of food products.

1.2 Image Segmentation

Image Segmentation Methods are broadly classified into Pixel Based methods, Edge Based Methods and Region Based Methods. Pixel based Segmentation is a process of segmenting an image based on pixels or group of pixels [18].

Image Segmentation methods are classified on two basic properties of intensity values: discontinuity and similarity. Edge detection operators are the part of discontinuity based approach [19]. They divide the image based on abrupt changes in intensity. Region growing, Region splitting & merging, Thresholding are similarity based approaches.

2 Proposed Algorithm

The existing first derivative operators like sobel, Robert and prewitt give edges on applying corresponding masks on the image. However the edges are not continuous and some edge information is lost in this process. To overcome this a unique algorithm has been proposed.

The proposed algorithm is

  1. Step 1:

    Apply sobel vertical edge operator on the input image.

  2. Step 2:

    Apply sobel horizontal edge operator on the image obtained from step 1.

  3. Step 3:

    Use Masking and add the horizontal and vertical edges to obtain the thick edges of the edge detected image obtained from step 2.

  4. Step 4:

    Apply Gaussian Smoothing filter to remove noise.

  5. Step 5:

    The boundary extracted image is one or more pixel thick image. So apply the following masks to get one pixel thick image and using Hit- miss transform [20] to get one pixel thick image.

    The masks are \( {\text{Mask}}\; 1= \left[ {\begin{array}{*{20}c} 1 & 1 & 1 \\ 0 & 1 & 1 \\ 0 & { - 1} & 1 \\ \end{array} } \right]\quad {\text{Mask}}\; 2= \left[ {\begin{array}{*{20}c} 1 & 1 & 1 \\ 1 & 1 & 0 \\ 0 & { - 1} & 1 \\ \end{array} } \right] \).

  6. Step 6:

    The operation of Hit-miss transform creates breaks in the pixel boundary. So the gaps are to be filled. To thin and fill gaps the following masks are used.

    $$ {\text{Mask}}\; 3= \left[ {\begin{array}{*{20}c} { - 1} & { - 1} & { - 1} \\ { - 1} & { - 1} & { - 1} \\ { - 1} & { - 1} & { - 1} \\ \end{array} } \right] $$
  7. Step 7:

    To avoid the ambiguity in paths of 4-connected and 8-connected neighbors, m-connectivity [20] is used. The mask used for this purpose is

    $$ {\text{Mask}}\; 4= \left[ {\begin{array}{*{20}c} 1 & 1 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 0 \\ \end{array} } \right] $$
  8. Step 8:

    At the end Boundary is calculated as

Boundry = Boundry − (Boundary \( \emptyset \) Mask 4) where Ø is Hit-Miss transform defined in [20].

3 Experimental Setup and Results

Mat Lab 2013 is used to develop the GUI for Image segmentation methods (Fig. 1).

Fig. 1
figure 1

Comparision of results of applying various edge detection operators and proposed algorithms

4 Performance Criteria of Edge Detection

To assess the efficiency of the performance of proposed approach we made use of the classical images of Image processing. Many years of research gave numerous edge detection operators and algorithms, but the performance evaluation of each edge detection algorithm is still an ambiguity. Every researcher claims that his algorithm is ultimate and outperforms the existing methods. But defining parameters to measure the performance of edge detection method is still a question mark [21]. Gives some performance evaluation of edge detection methods. Performance Ratio (PR) and PSNR are the parameters and the edge detected images are checked against ground truth images available in BSD database. But in real time applications ground truth images are not available. Here we define some parameters to check the performance of edge detection.

  • Pixel thickness: Pixel thickness gives clarity to the image. Some edge detection algorithms identify 1-pixel thick edge or 2-pixel thick edges.

  • Connectivity: The 4-connectivity or 8-connectivity of neighbors in the edge lines gives spurious edges and lead to false edges. The existence of m-connectivity gives true edges and this is ensured in our algorithm.

  • Human Perception Clarity (HPC): Here we are defining a new parameter and we have experimented this parameter with our algorithm and compared with existing algorithms.

Let Xi define a values which denotes the number of votes for supporting the algorithm as good edge detection

$$ {\text{Xi}} = \left\{ {\begin{array}{*{20}c} 1 & {{\text{accepted}}\;{\text{algorithm}}} \\ 0 & {\text{otherwise}} \\ \end{array} } \right. $$

Let Yi define a value which denotes the number of votes against the algorithm

Let N denote the number of humans participating in the evaluation.

We can define the Human Perception Clarity (HPC) as HPCV and HPCA

HPCV gives the percentage of humans giving vote for perfect edge detection.

HPCA gives the percentage of humans giving negative vote of improper edge detection for an algorithm (Fig. 2, Tables 1, 2, 3, 4 and 5).

Fig. 2
figure 2

Graph showing the performance of all existing methods and comparision with proposed algorithm

Table 1 Values of HPCA and HPCv for sobel operator
Table 2 Values of HPCA and HPCv for Robert operator
Table 3 Values of HPCA and HPCv for Prewitt operator
Table 4 Values of HPCA and HPCv for Canny edge detector
Table 5 Values of HPCA and HPCv for Proposed Algorithm
$$ {\text{HPC}}_{\text{A}} = \frac{N - Xi}{N} $$
(1)
$$ {\text{HPC}}_{\text{V}} = \frac{N - Yi}{N} $$
(2)

Finally

$$ {\text{HPC}}_{\text{A}} + {\text{HPC}}_{\text{V}} = 1. $$
(3)

5 Conclusion

In this paper an efficient novel edge detection method has been presented. This approach utilizes the morphological operations and Gaussian smoothing which enormously helps in fast and efficient extraction of the continuous thick edges in images. In addition Human Perception Clarity parameter has been integrated to test the novel method. This paper tests the existing edge detection techniques Robert, Prewitt and sobel operators which give less thick edges and Canny edge detector gives unwanted details in the image [22]. Otsu Segmentation needs the threshold to be manually determined. Laplacian of Gaussian operator also gives gray image which has fewer details. Compared to existing Edge detectors, the proposed algorithm extracts precisely thick continuous image boundary which is very important to extract prominent and significant corners [23] in images and also in computing image semantics [24].

The GUI designed helps to successfully check all the edge detection methods at one place and choose appropriate method for your particular application. Performance evaluation measures give comparative results of all the existing methods. The proposed algorithm has highest HPCv. This shows the efficiency of the proposed algorithm.