Estimation of Nanopore Size Using Image Processing

Haidar Jalal Ismail, Azeez Abdullah Azeez Barzinjy, and Kadhim Qasim Jabbar

Department of Physics, College of Education, Salahaddin University-Erbil, Zanko, Erbil, Iraq

Corresponding author’s e-mail:
Received: 10-03-2017 Accepted: 25-03-2017 Published: 12-04-2017


Nanopores, which are nanometer-sized holes, have been utilized in apparatus that point toward sensing a range of molecules such as DNA and RNA and single proteins The important factor for sensing molecules is diameters of nanopores which can be found through a substantial process called segmenting for nanopores of scanning electron microscope (SEM) images. In this investigation, four segmentation methods, namely, threshold, bilateral filter, k-means, and expectation maximization-Gaussian mixture model (EM-GMM) which has been utilized to segment three SEM images of nanopores efficiently. The quality of segmentation evaluated objectively through computing Rand index among them. Consequently, the nanopore size of Al2O3 films computed by means of SEM images. This study found that EM-GMM segmenting method gives promising results among other examined methods. It is for their high R-index, minimum adjustment parameters (just one variable which set usually 2), and low consuming time. Hence, it can be used efficiently for computing nanopore count and size.

Index Terms: Feature Extraction, Image Segmentation, Nanopore, Segmentation Evaluation


Biosensors can sense single molecule through using nanopores. They may sense unlabeled biopolymers such as DNA and RNA and single proteins. The sensing takes place when ion currents reduced largely due to blocking pores by passing molecules [1]. The nanopore diameter is very important for sensing molecules. The main step for finding that is through using segmenting of them from scanning electron microscope (SEM) image.

Image segmentation defined as dividing images into multiple parts that have homogeneity in pixel intensity, color, or texture [2]. One of the simple, sometimes useful, segmenting methods is threshold technique. However, it is time-consuming for its strategy based on trial and error method, and for sometimes, a single threshold value does not work well, especially, for a series of image frames of video data. Akhtaruzzamanet al. [3] used an automated threshold detection on a video which is a series of image frames of human walking to segment human lower limbs. They applied automated threshold detection to convert the image frames into grayscale image, line fill algorithm to smoothing the edges of object, and remove background to get out the object.

In general, image enhancing through denoising is an important previous step before segmenting objects. One of the denoising filters is bilateral filter which reduces noise with remaining sharp edges of the objects. Besides, Nguyen et al. [4] denoised specific artifacts and segmented the full body bone structure by employing 3D bilateral filter and 3D graph-cut, respectively. On the other hand, Sahadevanet al. [5] increased the accuracy of super vector machine classifier using a bilateral filter which merges spatial contextual information to spectral domain.

Another method of segmentation is K-means which put the image into multi cluster of pixels according to factors such as their intensities. Chen et al. [6] propose a semiautomatic segmentation method, using K-means, to determine object’s mean temperature and variance through segmenting contours of thermal images taken by the optical camera.

Fu and Wang [7] applied expectation maximization-Gaussian mixture model (EM-GMM) on color images to segmenting them, and their results approve the power of it. The EM-GMM and fuzzy-C-means (FCM) methods are widely used in image segmentation. However, they have a major drawback for their sensitivity to the noise. Kalti and Mahjoub [8] proposed a variant of these methods to resolve this problem. Their results showed improvement compare to standard version of EM-GMM and FCM.

Several researches work to find geometrical structures of nanopores. Alexander et al. [9] computed nanopore size, perimeter, and some other geometric features using histogram equalization, morphological, and statistical operations. In another work, that done by Phromsuwanet al. [10], size of nanopores of SEM images obtained through using morphological and Canny edge detector techniques. Parashuram and Vidyasagar [11] used morphological and global thresholding for obtaining nanopore diameter and statistical features. Same authors with Muralidhara [12] using same operations to obtain perimeter of the nanopores. It can be realized that all above methods using methods that need trial and error parameters to give proper results.

This work aims to find semiautomatic algorithm to find diameter of nanopores of SEM images through examine four segmenting techniques. The performance will be evaluated objectively, and the average of nanopore’s diameter will be computed.


Three SEM images of the nanopores anodic alumina film [13] used in this study for segmenting by our segmenting techniques and compute their diameters and number of pores. They consist of three SEM images with different widening times, namely, 0, 10, and 20 minutes as shown in Fig. 1.


Fig. 1. Four segmentation methods for three scanning electron microscope images with pore widening times: (a) 0 min, (b) 10 min, and (c) 20 min (Scale bar = 500 nm) [13]

The images segmented by four methods. The simple method is thresholding method that used here as ground truth images for objective evaluating of other segmenting methods. The second and third segmenting methods utilize bilateral filter, k-means, as the first step and using region selector as the second step. The fourth one is segmenting images using EM-GMM (Fig. 2).


Fig. 2. Image processing steps for different segmentation methods

Thresholding is a technique of selecting optimum gray level value which separates the region of interest from other regions. Thresholding produced binary images from gray level by making pixels lower or greater than a gray level value to zero and other remaining pixels to one. If g(x, y) is threshold output of an input f(x, y) at specific input gray level value T, it can be described as [14] follows:


K-means methoddivides pixels into a number of separate clusters. It’s algorithm consists of two steps. First, it finds k centroid (k number of clusters) for pixels of the image, and second, relate each pixel to a centroid through using different methods of computing distance between them. Euclidean distance may be used to measure distance, and it defined as follows:


Where p(x, y) is an input pixel to be cluster and ck is the cluster centers. After grouping pixels into k sets (i.e. clusters), new Euclidean distance evaluated between each center and pixels, so pixels assigned to the minimum Euclidean distance [15].

The bilateral filtering is a technique for smoothing and sharpening edges of an image. It obtained by applying one Gaussian filter for obtaining the spatial domain and another one for intensity domain. The filter output of s pixel is given by following equation:


Where K(s) is normalization expression:


Where f and g are Gaussian, in the spatial domain and in the intensity domain, which represents the range filter, respectively [16].

Region selector method uses roicolor command in Matlab which select wanted region according to color or intensity levels in grayscale image.

The GMMconsists ofGaussian distributions that defined as follows:


Where every component of function N(xnk) is a Gaussian distribution which, for a D-dimensional vector x, defined as follows:


Where µ and Σ are a D-dimensional average vector and a D × D covariance matrix, respectively. The prior distribution πk defines the probability of noticing xn that belongs to the kth class ?k. It is unrelated to the observation xn. Moreover, πk must possess these restrictions:


After finding the density function for an observation, the log-likelihood function of N observations is as follows:


According to Equations 5 and 8, the major feature of the GMM is that its form is too simple and it needs few variables. Moreover, when GMM used in image segmentation, the correct results obtained if they unrelated to each other. To find the variables (πkk,and Σk), the EM step is usually applied to get the upper limit of the log-likelihood function in Equation 8. The last probability for expectation stage of EM obtained as follows:


In the maximization step of EM, the parameters (πkk,and Σk) are changed iteratively through the following formulas:


Where t denotes the iteration value. The loop is stopped in the convergence condition. The value from Equation 9 for maximum posterior criterion used to get the class label for each pixel [17].

A. Rand Index

The Rand index, which founded by William Rand, used for the comparison of two arbitrary segmentations using pair-wise label relationships. It obtained by division of the number of pixel pairs that have the same label relationship in both segmentations. The nuv is the number of points labeled u in S and that labeled v in S’. The labeled points u in the first part of S, and labeled points v in second part S’ are termed as nu■ and n■v, respectively. Afterward:


The R-index is 1 when both segmentations have total similarities and 0 for zero ones. This type of similarity measurements takes small running time when unique labels in S and S’ are smaller than total data numbers N [18].


All three SEM images segmented using threshold technique obtained after a large number of trial and error for optimize threshold intensity pixel value, morphological operation, and removing small objects. They considered as ground truth images through visual perception to objective evaluating other segmenting methods (Fig. 1). The results of other segmenting methods are shown in same figure too.

Fig. 1a shows SEM that suffers from some noise effect. The Wiener filter and adaptive histogram equalization used for denoising and contrast enhancement before segmenting by threshold technique. Nevertheless, it still effects on segmenting by other methods.

Fig. 1b and c show good segmenting for all segmenting methods. Fig. 3 presents all three images that segment by threshold, ground truth image, and EM-GMM, higher R index, that number labeled each pore. Furthermore, the distribution of pore size which mentioned showed in same figure. They can be fitted mainly as Gaussian distribution as appear charts of Fig. 3 and that in agreement with what in results of Macias et al. [13].


Fig. 3. (a-c) Total counting nanopores and distribution of nanopore sizes for threshold segmenting (ground truth image) and expectation maximization-Gaussian mixture model (higher R index) for all three scanning electron microscope types

The time consuming for running code, Rand index, number, and diameter of nanopores for segmenting methods and for all three SEM images presented in Table I. The obtained results for diameter of nanopores are in a good agreement with Macias et al. [13] results for threshold segmenting and smaller for EM-GMM segmenting. The method of analysis SEM images in mentioned reference is unknown. The EM-GMM is semiautomatic method, with high R index, and relatively smaller time consuming is better than other segmenting methods studied here.

TABLE I Time Consuming, Rand Index, Nanopore Diameter and Nanopore Counts for all SEM Images Segmented by the Four Techniques



Four different segmenting methods are applied on three SEM images with various time widening pores 0, 10, and 20 minutes. It can be noticed that the threshold segmenting possesses good results, but perhaps, it needs a large number of trial and error for choosing optimum threshold pixel intensity and needs also morphological operation and removing small objects. The authors also concluded that the EM-GMM is superior than bilateral filter and K-means with region selector, since it has higher R index than them. Consequently, their segmenting results used for pore counting and computing their diameters. Likewise, it has relatively small time consuming of running. Accordingly, EM-GMM can be used professionally for segmenting SEM images and finding number of pores and their diameters.


The authors would like to express their acknowledgment to the Salahaddin University for supporting him with available tools.


[1]. C. Raillon, P. Granjon, M. Graf, L. J. Steinbock and A. Radenovic, “Fast and automatic processing of multi-level events in nanopore translocation experiments.” Nanoscale, vol. 4, no. 16, pp. 4916, 2012.

[2]. M. Ahmed, S. Abd El-attySoliman and J. Adamkani. “Performance study of innovative and advanced image segmentation techniques.” Singaporean Journal of Scientific Research, vol. 7, no. 12015, pp. 320-326, 2014.

[3]. M. Akhtaruzzaman, A. A. Shafie and R. Khan.” Automated threshold detection for object segmentation in colour image. ARPN Journal of Engineering and Applied Sciences, vol. 11, no. 6, pp. 4100-4104, 2016.

[4]. C. Nguyen, J. Havlicek, Q. Duong, S. Vesely, R. Gress, L. Lindenberg, P. Choyke, J. H. Chakrabarty and K. Williamset. “An automatic 3D CT/PET segmentation framework for bone marrow proliferation assessment.” 2016 IEEE International Conference on Image Processing (ICIP), Phoenix, AZ, 2016, pp. 4126-4130.

[5]. A. S. Sahadevan, A. Routray, B. S. Das and S. Ahmad.” Hyperspectral image preprocessing with bilateral filter for improving the classification accuracy of support vector machines.” Journal of Applied Remote Sensing, vol. 10, no. 2, pp. 025004, Apr. 2016.

[6]. Y. Y. Chen, W. S. Chen and H. S. Ni.” Image segmentation in thermal images.” 2016 IEEE International Conference on Industrial Technology (ICIT), Taipei, 2016, pp. 1507-1512.

[7]. Z. Fu and L. Wang. “Color image segmentation using gaussian mixture.” in Multimedia and Signal Processing: Second International Conference, CMSP 2012, Shanghai, China, 2012.

[8]. K. Kalti and M. Mahjoub. “Image segmentation by Gaussian mixture models and modified FCM algorithm.” The International Arab Journal of Information Technology, vol. 11, no. 1, pp. 11-18, 2014.

[9]. S. Alexander, R. Azencott, B. Bodmann, A. Bouamrani, C. Chiappini, M. Ferrari, X. Liu and E. Tasciotti. “SEM image analysis for quality control of nanoparticles.” in Computer Analysis of Images and Patterns, Springer, Berlin, Heidelberg, 2009. pp. 590-597.

[10]. U. Phromsuwan, Y. Sirisathitkul, C. Sirisathitkul, P. Muneesawang and B. Uyyanonvara. “Quantitative analysis of X-ray lithographic pores by SEM image processing.” MAPAN-Journal of Metrology Society of India, vol. 28, no. 4, pp. 327-333, 2013.

[11]. P. Bannigidad and C. Vidyasagar. “Effect of time on anodized Al2O3 nanopore FESEM images using digital image processing techniques: A study on computational chemistry.” International Journal of Emerging Trends and Technology in Computer Science (IJETTCS), vol. 4, no. 3, pp. 15-22, 2015.

[12]. C. Vidyasagar, P. Bannigidad and H. Muralidhara. “Influence of anodizing time on porosity of nanopore structures grown on flexible TLC aluminium films and analysis of images using MATLAB software.” Advanced Materials Letters, vol. 7, no. 1, pp. 71-77, 2016.

[13]. G. Macias, J. Ferré-Borrull, J. Pallarès and L. Marsal.” Effect of pore diameter in nanoporous anodic alumina optical biosensors.” The Analyst, vol. 140, no. 14, pp. 4848-4854, 2015.

[14]. M. H. J. Vala and A. Baxi.” A review on Otsu image segmentation algorithm.” International Journal of Advanced Research in Computer Engineering and Technology, vol. 2, no. 2, pp. 387-389, 2013.

[15]. N. Dhanachandra, K. Manglem and Y. Chanu.” Image segmentation using K-means clustering algorithm and subtractive clustering algorithm.” Procedia Computer Science, vol. 54, pp. 764-771, 2015.

[16]. S. Agarwal and P. Kumar.” Denoising of a mixed noise color image through special filter.” International Journal of Signal Processing, Image Processing and Pattern Recognition, vol. 9, no. 1, pp. 159-176, 2016.

[17]. T. Xiong, L. Zhang and Z. Yi.” Double Gaussian mixture model for image segmentation with spatial relationships.” Journal of Visual Communication and Image Representation, vol. 34, pp. 135-145, 2016.

[18]. R. Unnikrishnan and M. Hebert.” Measures of similarity.” Application of Computer Vision, 2005. WACV/MOTIONS ‘05. vol. 1. Seventh IEEE Workshops on, Breckenridge, CO., 2005, pp. 394.