1 Introduction

Fractures and vugs are the main reservoir space and seepage channels in fracture–vug reservoirs (Yang et al. 2011). Due to their complexity and heterogeneity, their distribution mechanism has a significant impact on detailed reservoir evaluation (Li et al. 2015; Wang et al. 2013). Currently, identification and quantitative evaluation of fractures and vugs have become the focus for exploration and development of fracture–vug reservoirs (Wu et al. 2013; Li et al. 2017a, b, c; Thachaparambil et al. 2013). Geologists have worked deeply on pore structure characterization (Bian et al. 2014; Gunter et al. 2014; Chen and Heidari 2014; Holden et al. 2014; Gao et al. 2015). Many articles have been published about the acoustic and electrical parameters of fracture–vug rocks (Wang et al. 2011; Tang et al. 2013; Xu et al. 2014; Chen et al. 2014; Zhang et al. 2015; Pan et al. 2017). Both conventional logging and electric imaging logging have been applied as the main well logging methods for fracture–vug identification and extraction. Though conventional logging has been well developed (Lyu et al. 2016; Zazoun 2013; Shalaby and Islam 2017; Amartey et al. 2017), it cannot achieve accurate results because of the low vertical resolution. Electric imaging logging, which is characterized by its high vertical resolution and borehole coverage, can display fractures and vugs intuitively. It has been a key step for interpreters to identify and describe fracture–vug information from conductivity images (Lai 2011).

To calculate the fracture–vug parameters accurately, logging image segmentation plays an important role in separating fractures and vugs from the formation matrix. However, various segmentation algorithms have different effects on extraction accuracy (Tang 2013; Cui et al. 2016; Liu et al. 2017; Xie et al. 2017). For automatic fracture–vug identification and extraction, it is necessary and important to study the image segmentation method suitable for the characteristics of the electric imaging images. Until now, the main electrical imaging logging software, including GeoFrame from the Schlumberger corporation, eXpress from the Atlas corporation, LEAD from CNPC logging and Logview from GEOTECH, requires interpreters to extract the fracture or vug based on a human–computer interaction platform. Thus, it depends on human subjectivity and experience, which results in poor efficiency and involves a lot of labor.

Domestic and international scholars have performed much research on the automatic recognition and quantitative evaluation of electrical imaging logging. For example, marker-controlled image segmentation has been used to mark the outline of necessary geological features and compute geological parameters (Delhomme 1992). The Hough transform was used to extract sinusoids from the electric imaging images and automatically calculate the formation occurrence of stratification and fracture (Hall et al. 1996). To trace fractures in the reservoir, a Gauss–Laplace operator was used to remove horizontal geologic features such as the stratigraphic boundary of the enhanced electric imaging image (Chitale et al. 2004). Wavelet transforms were used to estimate the fracture density (Tokhmechi et al. 2009). MATLAB was used to identify fractures automatically, detect sinusoids in the images and calculate the fracture parameters (Cornet 2013). In addition, some scholars draw mathematical morphology into the image processing of electrical imaging logging and achieve good results (Xiao et al. 2015; Xavier et al. 2015; Li et al. 2017a, b, c). With the limitation of the complex geologic environment and logging conditions, the methods above cannot automatically identify fracture–vug information completely and achieve the required quantitative interpretation accuracy. In particular, they cannot accurately describe irregular fractures and vugs. In recent years, in the field of image processing, path morphology, by constructing flexible structuring elements, has been proposed to identify elongated and curved subimages (Heijmans et al. 2005; Talbot and Appleton 2007). The method has been used for medicine, road extraction, etc. (Wang 2014), but not for geophysical logging. With the complexity of the image distribution, this research aims to realize separation of fractures and vugs from a complex geological background and obtain their quantitative parameters automatically.

According to the basic theory of path morphology and path operators suitable for a curved structure, we apply path morphology operators to electrical imaging images and develop a novel automatic identification and extraction method for fractures and vugs. By comparing and analyzing the conventional data, Logview software analysis data and core scanning data, we verify the effectiveness and high precision of the path morphology method in electric imaging logging data processing.

2 Response characteristics of the borehole geological structures in the electric imaging images

Since the conductivity difference between fracture, vug and matrix with mud invasion, high conductivity fractures and vugs appear dark, while matrix appears bright in the electric imaging images. It provides favorable conditions for efficiently extracting fractures and vugs. However, other geological structures, such as a stratification plane, argillaceous stripe, induced fracture, will always have similar behavior to fractures and vugs. Therefore, before introducing the path morphological algorithm, it is necessary to summarize the characteristics of the borehole geological structures in the electric imaging images used for extracting fractures and vugs.

  1. (1)

    Stratigraphic interfaces and stratification planes: These often appear as a group of continuous complete sinusoidals that are parallel to each other. Moreover, they have uniform thickness, gentle dip direction and angle (Fig. 1a).

    Fig. 1
    figure 1

    Response characteristics of typical borehole geological structures in electric imaging images. a Stratigraphic interfaces and stratification planes. b Argillaceous stripe. c Fracture. d Vug. e Drilling tool fracture. f Fracturing fracture. g Stress release fracture

  2. (2)

    Argillaceous stripes: The electric imaging images display bigger thickness continuously and completely, and they are always parallel to the stratigraphic interfaces and stratification planes (Fig. 1b).

  3. (3)

    Fractures: These usually show as low resistivity strips, shaped like approximate sinusoids with extended length and a lack of completeness and regularity in the image (Fig. 1c).

  4. (4)

    Vug: The solution pores on the small scale appear as approximate elliptical or speckly, while a cavity on a large scale appears with short extension as an irregularity clot, slice or dark stripe (Fig. 1d).

Note that in the electrical images belonging from a fracture–vug reservoir, irregular fractures always overlap the solution pores or cavities.

  1. (5)

    Drilling tool fracture: These are caused by drilling tools with fine radial extensions. They often occur as in pinnate or echelon arrangements (Fig. 1e).

  2. (6)

    Fracturing fracture: These always possess small radial extensions, large longitudinal extensions, and appear symmetrical with an approximately 180° delay (Fig. 1f).

  3. (7)

    Stress release fracture: They often have uniform thickness and regular arrangement (Fig. 1g).

3 Path morphology principle and algorithm in electric imaging logging data

Based on mathematical morphology (Serra 1988; Soille and Talbot 2001), the path morphology with a more flexible structuring element group provides an effective detection method for the identification of elongated and curved structures rather than just straight lines (Heijmans et al. 2005). We apply the path morphology method to accomplish the automatic fracture–vug extraction from the electric imaging images by constructing the adjacency relation and determining the length of the path operator.

3.1 Path morphology fundamental principles

3.1.1 Adjacency relation

Suppose E is a point set representing pixel locations in a two-dimensional (2-D) image domain. A direction, i.e., an adjacency relation, among the pixels in E is denoted by the symbol “\(\mapsto\).” The set E and its adjacency relation compose a directed graph called the adjacency graph (Fig. 3). If \(x \mapsto\, y\) indicates that there exists an asymmetric directed path from x to y, y is called the successor of x and x the predecessor of y. If the adjacency relation “\(\mapsto\)” is known, an arbitrarily subset X in the image domain set E is defined as

$$\delta (X) = \{ y \in E|x \mapsto\, y\;{\text{for}}\;{\text{some}}\;x \in X\} ,$$
(1)

where \(\delta (X)\) is a successor set satisfying the adjacency relation and comprises all pixel points that have a predecessor in X.

Similarly, \(\tilde{\delta }(X)\) is a predecessor set satisfying the adjacency relation and contains all the pixel points that have a successor in X. As shown in Fig. 2, \(b_{1}\), \(b_{2}\), \(b_{3}\) are successors of a, and \(a_{1}\), \(a_{2}\), \(a_{3}\) are predecessors of b, so we may express successor or predecessor set as \(\delta (\{a\}) = \{ b_{1} ,b_{ 2} ,b_{ 3} \}\), \(\tilde{\delta }(\{b\}) = \{ a_{1} ,a_{2} ,a_{3} \}\).

Fig. 2
figure 2

Adjacency relation. Hollow points represent the image domain set E, while solid points represent subsets of E

3.1.2 Path operator

For \(\varvec{a} = \{ a_{1} ,a_{ 2} , \ldots ,a_{L} \}\), if \(a_{n} \mapsto a_{n + 1}\), or equivalently \(a_{n + 1} \in \delta (\{ a_{n} \} )\) (n  = 1, 2,…, L − 1), \(\varvec{a} = \{ a_{1} ,a_{ 2} , \ldots ,a_{L} \}\) is defined as a \(\delta\)-path of length L. \(\sigma\)(a) represents elements of the path a existing in E; in other words, \(\sigma\)(a) contains all pixel points which are located on the path a,

$$\sigma (a_{1} ,a_{ 2} , \ldots ,a_{L} ) = \{ a_{1} ,a_{ 2} , \ldots ,a_{L} \}$$
(2)

The operator \(\alpha_{L} (X)\) is defined as the union of all \(\delta\)-paths of length L in X belonging to image domain set,

$$\alpha_{L} (X){ = } \cup \{\sigma (\varvec{a})|\varvec{a}\in \varPi_{L} (X ) \}$$
(3)

where \(\varPi_{L}\) represents the \(\delta\)-path set of length L in a subset X.

Accessibly, the operator \(\alpha_{L}\) has the algebraic properties of the mathematical morphology opening, including increasing monotonicity, antiextensivity and idempotence (Heijmans et al. 2005), so \(\alpha_{L}\) is defined as the path opening operator, and L is defined as the length of \(\alpha_{L}\). In this paper, in order to extract fractures and vugs from electric imaging images regarded as subset X, we need to look for the union of all pixel points which satisfy \(\delta\)-path of length L (\(\alpha_{L} (X)\)).

3.1.3 Adjacency graph available for electric imaging image characteristics

According to the different vertical and horizontal extensions for the different target geological bodies, we need to design the vertical and horizontal adjacency graph available for the electric imaging image characteristics (Fig. 1). The adjacency graph measures their angles, while the operator length L measures their extension and connectivity. According to the different characteristics of borehole geological structures, we designed the vertical and horizontal adjacency graph (Fig. 3).

Fig. 3
figure 3

Adjacency graph available for electric imaging image characteristics. a Vertical adjacency graph. b Horizontal adjacency graph. Black dots represent pixel points in 2-D image domain, and the arrow represents the adjacency relation

  1. (1)

    Vertical adjacency graph

For fractures with large vertical extension, we design a vertical adjacency graph to extract them from the images. We define each pixel of the set E in the 2-D image domain satisfying this adjacency relationship: starting from the chosen pixel to its adjacency pixels in the 0°, 45°, 90° and 135° directions, so the set E and its adjacency relation compose a directed graph, called the vertical adjacency graph (Fig. 3a). We place each pixel of the electric imaging image I in the vertical adjacency graph and perform the path opening. It can keep the high-angle fracture extended from 0° to 135°, the drilling tool fracture and the fracturing fracture mainly in the vertical direction (Fig. 3a). Then, we determine the corresponding path lengths L as threshold values to separate the high-angle fracture from the drilling tool and fracturing fractures.

  1. (2)

    Horizontal adjacency graph

Similarly, for target geologic structures with a large horizontal adjacency extension, we design a horizontal adjacency graph to distinguish them. We define each pixel of the set E satisfying this adjacency relationship: starting from the chosen pixel to its adjacency pixels in the − 45°, 0° and 45° directions, so the set E and its adjacency relation compose a directed graph called the horizontal adjacency graph (Fig. 3b). We place each pixel of the electric imaging image I into the horizontal adjacency graph and perform the path opening. It can keep the low-angle fracture extended from − 45° to 45°, stratigraphic interfaces, stratification planes, argillaceous stripes and stress release fractures in the horizontal direction. Then, we determine the corresponding path lengths L as threshold values to separate low-angle fractures from other fractures.

Specifically, the path lengths of the vug are much smaller than of the tectonic or induced fractures, so we determine smaller path lengths L as the threshold value to extract them.

Note that the number of the \(\delta\)-paths grows exponentially with the operator length L for the common periodic adjacency graph (Fig. 3). For example, for the horizontal adjacency graph shown in Fig. 3b, except for at the boundary, there exist irreversible \(3^{L - 1}\)\(\delta\)-paths of length L starting from an arbitrary pixel, and the path opening can be understood as the union performing the morphological opening with the \(3^{L - 1}\) structuring elements. However, these structuring elements are not translational to each other. This is the difference between path opening and morphological opening. Obviously, it is inefficient to compute all these operations. We apply an efficient decomposition algorithm (Talbot and Appleton 2007) to realize the morphological path opening algorithm applicable to electric imaging logging as follows.

3.2 Path opening algorithm for fracture–vug extraction

Primarily, we need to convert the electric imaging image X into a binary image B. Take the vertical adjacency graph as an example in Fig. 3a, and let B(x) denote the value of the pixel point x on the binary image B and (x1, x2) denote the coordinates of x. We calculate two values at each pixel x: the longest path length \(l^{ - } [x]\) traveling upward from pixel x (not including x itself) and the longest path length \(l^{ + } [x]\) traveling downward from pixel x. If B(x) = 1, the maximum path length through x is \(l[x]= l^{ - } [x]{ + }l^{ + } [x] - 1\). If B(x) = 0, set \(l[x]{ = 0}\). We use the recursive formulas (4) and (5) to compute \(l^{ - } [x]\) and \(l^{ + } [x]\):

$$l^{ - } [x] = 1 + \hbox{max} (l^{ - } [(x^{1} + 1,x^{2} )],l^{ - } [(x^{1} - 1,x^{2} + 1)],l^{ - } [(x^{1} ,x^{2} + 1)],l^{ - } [(x^{1} + 1,x^{2} + 1)])$$
(4)
$$l^{ + } [x] = 1 + \hbox{max} (l^{ + } [(x^{1} - 1,x^{2} )],l^{ + } [(x^{1} - 1,x^{2} - 1)],l^{ + } [(x^{1} ,x^{2} - 1)],l^{ + } [(x^{1} + 1,x^{2} - 1)])$$
(5)

Analogously, for the horizontal adjacency graph in Fig. 3b, according to recursive Eqs. (6) and (7), we compute \(l^{ - } [x]\) and \(l^{ + } [x]\) for each pixel x:

$$l^{ - } [x] = 1 + \hbox{max} (l^{ - } [(x^{1} + 1,x^{2} - 1)],l^{ - } [(x^{1} + 1,x^{2} )],l^{ - } [(x^{1} + 1,x^{2} + 1)])$$
(6)
$$l^{+} [x] = 1 + \hbox{max} (l^{+} [(x^{1} - 1,x^{2} - 1)],l^{+} [(x^{1} - 1,x^{2} )],l^{+} [(x^{1} - 1,x^{2} + 1)])$$
(7)

For details of the recursive computation of \(l^{ - } [x]\) and \(l^{ + } [x] ,\) see Heijmans et al. (2005) and Talbot and Appleton (2007).

Searching the path length L of the operator \(\alpha_{L} (X)\) for each borehole geological structure as the appropriate threshold value, the pixels x that satisfy \(l[x] < L\) are removed, and the set comprising all the pixels for \(l[x] \ge L\) is the result of the path opening operation. The image of the maximum path length is generated by substituting the maximum path length l[x] for B(x). The minimum value between two peaks in the frequency distribution of the maximum path length l[x] for all pixels corresponds to the threshold value of the path length L for each geological structure along the borehole. To identify these different structures, we perform the path opening operation to the electric imaging images by their appropriate threshold values L.

According to the adjacency graph (Fig. 3a), we implement the opening transform to separate fractures in the electric imaging logging as shown in Fig. 4. In Fig. 4a, the black dots indicate the target pixels set X contained in image domain set E, and the light gray boundary including dots and arrows indicates the adjacency graph. In Fig. 4b, the green, red and blue dots represent isolated points, planar structures and curved structures, respectively. We, respectively, ascertain L = 2 and L = 6 as the threshold values of the path length for separating the three kinds of structures. As shown in Fig. 4b, we compute the path opening \(\alpha_{2} (X)\) of a set X and remove the green isolated points (background noise), while \(\alpha_{6} (X)\) is computed for removing the red planar structures (vugs) and ultimately reserving the blue curved structures (fractures). Consequently, for fracture–vug recognition from electric imaging images, we determine the suitable adjacency graph and the corresponding path length of the operator \(\alpha_{L}\) to suppress the noise and extract various geologic bodies.

Fig. 4
figure 4

Path opening operation for extracting fractures and vugs

4 Noise suppression and fracture–vug extraction from simulated data based on path morphology

In this section, we apply the path operator \(\alpha_{L}\) to process the simulated data of the electric imaging images. Placing each pixel point from the electric imaging image into the vertical and horizontal adjacency graph, we determine the appropriate path length L as the threshold value to split the different geological images into subimages with respective maximum path length. The path opening method can achieve noise suppression and automatic fracture–vug extraction and efficiently characterize the fracture–vug reservoirs.

4.1 Quantitative estimation of the fracture–vug parameters in the conductivity images

In electric imaging logging, the original conductivity data are acquired from the electrode array of instruments scanning the borehole wall, which is then transferred to a ground system that processes and shows these data as a 2-D conductivity image covering the full borehole. We used the FMI instrument belonging to the MAXIS-500 imaging logging series developed by Schlumberger and designed the simulated formation models comprising of fracture–vug information and calculated their parameters. There are four main plates and four folding plates, including 192 microelectrodes acquiring 192 conductivity curves in the FMI instrument. They provide higher vertical resolution and borehole coverage, i.e., 0.508 cm and 80%, respectively, in a 20.32 cm borehole. After filling the blank strips of the electric imaging logging images, the number of horizontal sampling points along the borehole will reach almost 250. After pretreatment, the conductivity data from 192 plates are calibrated to a static image with the corresponding color distributed in the borehole direction from 0° to 360° (Gaillot et al. 2007). To display fractures and vugs more completely, we need to convert the static image into a dynamic image. We select 2ft as the length of sliding window and 1/2 window length as step length and repeat static color calibration in the window for the whole well.

For fracture identification, the image shows a curved interface similar to a sinusoid when the fracture plane intersects the borehole. Combining the geometric relationship between the fracture plane and borehole (Fig. 5), we determine the fracture spatial position along the pixel edge, fit the fracture centerline with a polynomial function and calculate the fracture occurrence including the dip angle and direction. The dip angle α of the fracture obeys the geometric relationship

$$\alpha = \text{arctg}(H/d)$$
(8)

where H is the vertical distance between the highest and lowest points of the polynomial and d is the borehole diameter.

Fig. 5
figure 5

a Geometric relationship between the fracture planes intersecting the borehole. b Corresponding planar distribution

Moreover, θ represents the dip direction, i.e., the azimuth located at the lowest point of the polynomial.

For the vug identification, we need to mark vugs and extract their edges from the binary image. A vug is considered an ellipse fitted with the least squares method. Therefore, we can acquire the aspect ratio, area and other parameters by computing the major LENmax and minor LENmin axes of the fitted ellipse (Fig. 6).

Fig. 6
figure 6

Schematic of the solution pore or cavity fitting with the ellipse

$${\text{Aspect}}\,{\text{ratio}}\,A_{\text{spect}} : A_{\text{spect}} = {\text{LEN}}_{\hbox{min} } /{\text{LEN}}_{\hbox{max} }$$
(9)
$${\text{Area}}\,S:S = \pi {\text{LEN}}_{\hbox{min} } {\text{LEN}}_{\hbox{max} } /4$$
(10)

In terms of the aspect ratio, the rock matrix is closer to 1.0, while a fracture with a small aperture and long extension is far less than 1.0. Moreover, the aspect ratio of the vug, whose shape is nearly circular, is between the rock matrix and fracture. For the fine reservoir evaluation, we display the plane porosity, which is the respective ratio of the area of the fracture, vug or rock matrix to the total area of the electric imaging image per unit depth, by a 2-D waveform diagram in ascending order of the aspect ratio. In other words, we call the diagram a fracture–vug pore structure spectrum (Fig. 7).

Fig. 7
figure 7

Schematic of the fracture–vug pore structure spectrum distribution based on pore aspect ratio (the blue dotted line represents the fractures; the black one represents the vugs; the red one represents the matrix pores)

To calculate the fracture–vug parameters automatically and performing the opening operation of the binary image based on the path operator from Fig. 3, we can acquire the target geological structures such as fractures and vugs, whose interiors are filled with the morphological region-filling algorithm. After thinning the binary images, we obtain the fracture centerline fitted with a polynomial function for extracted fractures, while we detect their morphological boundaries fitted with elliptic functions for the extracted vugs.

4.2 Noise suppression and fracture–vug extraction based on the model data

According to the measured features of the electric imaging logging instrument, we build two formation response models, including the fracture model and fracture–vug model. Figures 8 and 9 are shown as binary images switched from the conductivity response images. Here, the vertical depth is 1 m and the number of horizontal sampling points distributed from 0° to 360° is 250. It is well known that the real conductivity images always comprise areas with different degrees of noise, mainly caused by the electronic parts, circuits, collision between instrument and borehole, and others, so we add 10% salt and pepper noise to the conductivity models for the binary images.

Fig. 8
figure 8

a Fracture formation model with 10% salt and pepper noise, including one high-angle fracture, three low-angle fractures and background noise. The ordinate represents the vertical relative depth (m), while the abscissa represents the azimuth. b Separated noise from the fracture formation model. c Frequency distribution of the maximum path length l(x) for each pixel x (the red line represents the threshold value between noise and fracture). d Low-angle fractures extraction. e Centerlines of the three low-angle fractures. f Polynomial fit of the centerlines of low-angle fractures. g Low-angle fracture occurrence (circumferential and radical direction represents dip direction and dip angle, respectively). h High-angle fractures extraction. i Centerlines of the high-angle fractures. j Polynomial fit of the centerline of the high-angle fracture. k High-angle fracture occurrence

Fig. 9
figure 9

a Fracture–vug formation model with 10% salt and pepper noise including four fractures and seven pores. The ordinate represents the vertical relative depth (m), whereas the abscissa represents the azimuth. b Separated noise from the fracture–vug formation model. c Frequency distribution of the maximum path length l(x) for each pixel x (the red, purple, blue and orange dotted line represent the threshold values dividing into noise, small pores, medium pores, large pores and fracture, respectively). d Pore extraction. e Pore edge detection. f Ellipse fit of pore edges. g Fractures extraction. h Fracture centerlines. i Polynomial fits of the fracture centerlines

4.2.1 Noise suppression and fracture extraction for the fracture formation model

We design a conductivity response model of the fracture formation composed of one high-angle fracture, three low-angle fractures and background noise; particularly, the high-angle fracture and two low-angle fractures are parallel to each other (Fig. 8a). The extension length of the fracture connected horizontally is much greater than of the isolated noise. As shown in Fig. 8c, implementing Fig. 3b as an adjacency graph for opening operation, the results indicate obviously that the path length of the fracture (L > 8) is greater than the background noise (0 ≤ L ≤ 8). Using the maximum path length of the background noise as the threshold value, we can remove the noise (Fig. 8b) and reserve fractures at L > 8.

To perform the opening operation to the process denoising binary image, the low-angle fractures are extracted using the horizontal adjacency graph, whereas the high-angle fractures are extracted using the vertical adjacency graph (Fig. 3). To acquire fracture parameters, we pick up the fracture centerlines fitted with polynomials. The result shows that the path morphology method not only effectively separates the high and low-angle fractures, but also commendably keeps the connectivity of each fracture (Fig. 8).

4.2.2 Fracture and pore separation for the fracture–vug formation model

The fracture–vug formation model comprises four fractures connected horizontally at various angles, especially the two low-angle fractures which cut each other. We assume the shape of the simulated pores on different scales is circular, and their diameters are, respectively, the length of 12, 20 and 35 sampling intervals (Fig. 9a). It is well known that the extension length of the fracture is much greater than of the pores. To separate the fractures and vugs at different scales, we perform the horizontal adjacency graph for the opening operation and determine a suitable path length of the operator \(\alpha_{L}\) as the corresponding threshold value for each geological body. Obviously, the path length of these pores is between fractures and background noise. According to Fig. 9c, there are four peak ranges on frequency distribution of l(x) and the minimum value between two peaks as the threshold value of the path length L for vugs on different scales. Taking the path opening length L = 8 as the threshold value, those pixels belonging to noise (where l(x) < 8) are removed after the path opening operation \(\alpha_{8} (X)\). Similarly we perform \(\alpha_{13} (X)\) to the denoising image by threshold value (L = 13), and these pixels belonging to small-scale pores (where 8 ≤ l(x) < 13) are filtered out. Then, using the path lengths L = 26 and L = 40 as the threshold values, executing \(\alpha_{ 2 6} (X)\) and \(\alpha_{ 4 0} (X)\) to the previous processed image in turn, we can successively remove medium-scale pores (where 13 ≤ l(x) < 26) and large-scale pores (where 26 ≤ l(x) < 40) and ultimately isolate fractures at l(x) ≥ 40. The result shows clearly that the path morphology method effectively extracts fractures and pores from the background noise (Fig. 9). Particularly, for extracted pores, we detect their morphological boundaries fitted with an elliptic function, whereas we acquire the fracture centerlines fitted with polynomial functions for the extracted fracture. The specific parameters of fracture and pore are shown in Tables 1 and 2, respectively.

Table 1 Pore parameters of fracture–vug formation model
Table 2 Fracture occurrence of fracture–vug formation model

5 Filling blank strips and matrix separation in electric imaging images

Before applying the path morphology to identify fractures and vugs, we need to deal with the original electric imaging images, including the singular spectral interpolation (Recht 2011; Li et al. 2017a, b, c; Cai et al. 2008; Li et al. 2017a, b, c) for the blank strips and the Otsu method (Otsu 1979; Mala and Sridevi 2016) for matrix separation.

5.1 Singular spectrum analysis and interpolation reconstruction on conductivity response

During the electric imaging logging measurement, images appear as blank strips owing to the loss of conductivity data in the electric imaging logging data because the electrode plates do not cover the full borehole (Fig. 10). In this section, we reconstruct the full borehole 2-D electric imaging images with the singular spectral analysis method.

Fig. 10
figure 10

Schematic of the electric imaging logging data matrix (“*” represents practical electric imaging logging data and “○” missing data)

  1. (1)

    Convert the electric imaging images to 2-D data in the frequency domain by a Fourier transform.

  2. (2)

    Implement the singular spectrum interpolation for every frequency slice of the 2-D data.

For each frequency slice \(S = \left\{ {s_{1} ,s_{2} , \ldots ,s_{N} } \right\}\), construct the Hankel matrix:

$$M = \left[ {ll_{1} ,ll_{2} , \ldots ,ll_{K} } \right] = \left[ {\begin{array}{*{20}c} {s_{1} } & {\begin{array}{*{20}c} {s_{2} } & {s_{3} } \\ \end{array} } & {\begin{array}{*{20}c} {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & {s_{\lambda } } \\ \end{array} } & {\begin{array}{*{20}c} {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & {s_{K} } \\ \end{array} } \\ {s_{2} } & {\begin{array}{*{20}c} {s_{3} } & {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} \\ \end{array} } & {\begin{array}{*{20}c} {s_{\lambda } } & {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} \\ \end{array} } & {\begin{array}{*{20}c} {s_{K} } & {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} \\ \end{array} } \\ {\begin{array}{*{20}c} {s_{3} } \\ {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} \\ \end{array} } & {\begin{array}{*{20}c} {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & {s_{\lambda } } \\ {s_{\lambda } } & {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} \\ \end{array} } & {\begin{array}{*{20}c} {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & {s_{K} } \\ {s_{K} } & {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} \\ \end{array} } & {\begin{array}{*{20}c} {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} \\ {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} \\ \end{array} } \\ {s_{\lambda } } & {\begin{array}{*{20}c} {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & {s_{K} } \\ \end{array} } & {\begin{array}{*{20}c} {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} \\ \end{array} } & {\begin{array}{*{20}c} {\mathinner{\mkern2mu\raise1pt\hbox{.}\mkern2mu \raise4pt\hbox{.}\mkern2mu\raise7pt\hbox{.}\mkern1mu}} & {s_{N} } \\ \end{array} } \\ \end{array} } \right]$$
(11)

and

$$ll_{i} = \left[ {s_{i} ,s_{i + 1} , \ldots ,s_{i + \lambda - 1} } \right]^{\text{T}} ,{1 \le \lambda \le N,1 \le i \le K,}$$
(12)

where \(ll_{i}\) denotes the delay vectors for the 1-D conductivity signal in the frequency domain, λ the length of the delay vector and K the number of delay vectors.

Performing singular value decomposition for the Hankel matrix, we construct the reduced-rank Hankel matrix after cutting off small singular values.

$$M^{ * } = U\left[ {\Sigma_{j} } \right]V^{H},\, j \le r$$
(13)

where \(\Sigma_{j}\) are the first j larger singular values, r denotes the rank of the original \(\lambda \times K\) Hankel matrix and U and V denote the λ unitary matrix and K unitary matrix satisfying the singular value decomposition of the Hankel matrix, respectively. By performing the inverse Hankel transform for the low-rank Hankel matrix \(M^{ * }\), the elements in the first column and the last row of the new matrix compose the reconstructed signal.

  1. (3)

    To reconstruct the 2-D electric imaging logging data in the spatial domain, we perform an inverse Fourier transformation of the 2-D conductivity signal in the frequency domain.

Figure 11b shows the singular spectrum interpolation that is used to fill the blank strips in Fig. 11a. The result indicates that the filled image makes up for the information that the instrument cannot detect, especially formations with strong heterogeneity. The interpolation method can not only suppress noise and improve image quality, but also reconstruct complete electric imaging logging images.

Fig. 11
figure 11

a Original electric imaging logging image. b Electric imaging image interpolated by singular spectrum interpolation. c Fracture–vug image separated by the Otsu method

5.2 Automatic matrix segmentation from electric imaging images based on the Otsu method

In this section, we apply the Otsu method to automatically separate fractures and vugs from the rock matrix. The fundamental principle of the Otsu method is that we determine the optimal threshold to divide the gray level histogram of the images into two classes whose variance is the largest.

As shown in Fig. 12, we define the image F whose size is Q × R pixels, or equivalently, \(F = \{ f(x,y)|x \in \{ 1,2, \ldots ,Q\} ,y \in \{ 1,2, \ldots ,R\} \}\). Let \(f(x,y)\) be the gray value located in \((x,y)\). We test k at the gray level range and determine k as the optimal segmentation threshold when between-class variance \(\sigma^{2} (k)\) is the maximum.

Fig. 12
figure 12

Schematic diagram of automatic segmentation based on the Otsu method

Figure 11c shows how the Otsu method is utilized to automatically segment Fig. 11b. Comparing Fig. 11c, b, we see that the Otsu method is an efficient way to separate fractures and vugs from the filled electric imaging image.

6 Analysis and processing of practical logging data

We use the novel path morphology method to extract fractures and vugs from the fracture–vug reservoir in the wells A, B and C (as shown in Figs. 13, 14, 15, respectively). Wells A and C are carbonate formations, whereas well B is a clastic formation. To implement the automatic fracture–vug extraction and identification based on the opening transformation, after filling the blank strips of original electric imaging logging images and applying conventional logging curves for shale correction, we need to apply the Otsu method for the threshold segmentation that targets geological structures such as fractures and vugs, which are separated from the matrix background in the real conductivity images.

Fig. 13
figure 13

Fracture extraction and occurrence characterizations of the fracture reservoir in well A. a Original electric imaging image. b Binary electric imaging image after removing the matrix. c Stratification and background noise extracted from b. d Fracture extracted from b. e Polynomial fit of the fracture centerlines. f Fracture occurrence

Fig. 14
figure 14

Pore extraction of the pore reservoir and comparison with the thin section in well A. a Original electric imaging image. b Vugs extracted from a by path opening operation. c Edge detection of b. d Ellipse fit of c. e the thin section located in 2704 m. f Solution pores extracted from e

Fig. 15
figure 15

Fracture–vug extraction and comparison with the multi-threshold segmentation in well B. a Original electric imaging image. b Fracture extraction based on multi-threshold segmentation. c Vug extraction based on multi-threshold segmentation. d Threshold selection between fractures and vugs. e Fracture extraction based on path opening operation. f Vug extraction based on path opening operation

The original electric imaging images show how the high-angle fractures cutting the stratification are extremely developed and complexly distributed, so we determine the formation as the fracture reservoir (in Fig. 13). According to the vertical and horizontal adjacency graph, as shown in Fig. 3, the three high-angle fractures are completely extracted from the noise and stratification, so the path opening operation has the advantage of being efficient in detecting fractures in all directions, especially for groups of fractures with a large curvature. To acquire the fracture parameters, we pick the fracture centerlines fitted with a polynomial.

Figure 14 shows the result of vug extraction from pores by a path opening operation in contrast to the result of thin section analysis. Figure 14e shows that intercrystalline pores are mainly developed in this reservoir. Based on the path opening operation, we adequately separate the vugs from the noise background and accurately detect their edges (Fig. 14c, d). Comparing the plane porosity of vugs extracted from Fig. 14b by path opening operation with those from thin section (Fig. 14f), the plane porosity in Fig. 14b, e is 7.5% and 6.8%, respectively, with a relative error of less than 10%. The result shows that it is reasonable to use the path opening operation for the segmentation of the electric imaging images.

We perform the path opening operation to process the electric imaging image from the fracture–vug reservoir and compare the extraction result with that of multi-threshold segmentation (Fig. 15). We can distinguish the fracture and vug subimages extracted by multi-thresholding (Ge et al. 2015), according to the fracture roundness > 3.5 and the length–width ratio > 1.5 (Fig. 15b, c). We determine the minimum value between the first peak and the second peak in Fig. 15d as the threshold value of the path length L, and the extracted fractures and vugs are shown in Fig. 15e, f based on the path opening operation. As shown in Fig. 15, both the path opening operation and the multi-threshold segmentation have achieved good segmentation results and verify the validity of the path opening algorithm for separating fractures and vugs. In particular, with respect to the multi-threshold segmentation method, the path opening operation can better keep the integrity of fractures while extracting vugs.

We use the path opening algorithm to deal with the electric imaging image from the fracture–vug reservoir of the well B in the clastic formation and compare the result with the Logview software analysis (Fig. 16). The whole-bore electric imaging image shows that the formation develops horizontal stratification and vugs, but high conductivity fractures. In contrast to the results of the Logview software analysis, the vugs surrounded by the pocks automatically picked up by the software are consistent with the vugs separated from the horizontal stratification by the path opening operation, and the plane porosity calculated by the two methods is coherent, which prove the reliability of the path opening algorithm in vug extraction.

Fig. 16
figure 16

Comprehensive logging interpretation of the vug reservoir in a clastic formation, well B. The first column: depth; the second column: conventional logging curves; the third column: the whole-bore electric imaging image; the fourth column: matrix extraction; the fifth column: the horizontal stratification extraction; the sixth column: vug extraction; the seventh column: the vug subimage with pocks picked up automatically by the Logview software; the eight column: comparison of the plane porosity between the two methods (the red line represents the extraction results based on the path opening operation, and the black represents that based on the Logview software)

For oil-bearing strata in a carbonate formation (well C), we compare the interpretations of conventional logging and core data by analyzing and evaluating the fracture–vug reservoir after performing the path opening operation (Fig. 17). Because the reservoir develops secondary pores and is relatively high in uranium, it causes the natural gamma radiation to be slightly higher than in the adjacent layer. The effective porosity calculated by conventional logging interpretation is 2.3%–4.4%. The whole-bore electric imaging logging image and core scanning image indicate that fractures develop very well with vugs. The path opening operation is applied to detect fractures in all directions and to separate the fractures from the vugs. On the fracture–vug pore structure spectrum, the fractures with a small aspect ratio show a high amplitude peak on the left; the high amplitude peaks in the middle indicate that ellipsoid vugs are developed in the formation; the peak area on the right, whose aspect ratio is almost 1, represents the matrix proportion. Given the threshold value of the corresponding aspect ratio for fracture, vug and matrix, their porosity percentage can be calculated by integrating the area within the threshold. Calibrating porosity with the logging data in the pure matrix layer, we compare the cumulative porosity curve with the core test porosity (blue points), where the average relative error was 5.0%, which also indicated the effectiveness of the path opening operator in extracting fractures and vugs. As shown in Figs. 16 and 17, the path opening algorithm can achieve good results in automatically extracting fractures and vugs whether in carbonate rocks or clastic rocks.

Fig. 17
figure 17

Logging comprehensive interpretation of the fracture–vug reservoir in carbonate formation, well C. The first column: depth; the second column: conventional logging curves; the third column is the fullbore electric imaging image; the fourth column: matrix extraction; the fifth column: the fracture extraction; the sixth column: vug extraction; the seventh column: the fracture–vug pore structure spectrum; the eighth column: porosity accumulation curve (blue points represent core test porosity); the ninth column is the core scanning image

7 Conclusion

On the basis of the fracture–vug response characteristics of the electric imaging logging data, we have developed a novel fracture–vug identification and extraction method based on the path morphology. To extract multi-scale fractures and vugs from the electric imaging logging images automatically, we have designed an adjacency graph available for linear and curved structures such as different angle fractures and determined a suitable path length of the operator \(\alpha_{L}\) as the corresponding threshold value for each geological feature. We have successfully applied the new method to deal with simulated data and practical electric imaging logging data and draw the following conclusions:

  1. (1)

    The path morphology method provides an efficient way to identify fractures and vugs, and we calculate their parameters automatically by path operators tracing the linear and curved structures available for fracture distribution with different linear structures.

  2. (2)

    The new method has the advantage of being precise enough to distinguish fractures at different angles by applying the vertical adjacency graph for high-angle fractures and horizontal adjacency graph for low-angle fractures.

  3. (3)

    The path morphology method can be implemented to effectively suppress random noise on the electric imaging logging images and automatically identify fractures and vugs. Furthermore, the fracture–vug pore structure spectrum denoted by the pore aspect ratio not only describes the distribution of multi-scale pore types, but also performs better in dividing reservoir types and quantitative evaluation of the pore structure.

In this paper, the new fracture–vug extraction method based on the path morphology is still at the exploratory stage. At present, the path length of operator is chosen at the minimum point between two peaks belonging to fractures and vugs in the frequency distribution of the maximum path length. However, it is difficult to choose the point in practical applications, so we need to explore searching automatically for threshold values. Furthermore, we need to study deeply the effect of different adjacency relations and path opening operators on the extraction of argillaceous stripes, stratification and high resistivity fractures and thus summarize the extraction templates and applicable conditions for different borehole geological structures.