Introduction

Geophysical study has aim the detailed knowledge of the structure and composition of the earth. It uses various prospecting techniques of subsoil resources. Lineament map plays an important role during the different phases of this prospecting in hydrogeology particularly (Mogaji et al. 2011; Youan et al. 2014; Takorabt et al. 2018). The hydrothermal system being controlled by these lineaments; thus, all the lineaments identified in an area can let foresee the possibility of any communication between two basins. Mapping these lineaments requires a well-processed dataset. Processing of gravity data by analysis methods requires computer tools, like software and programs. Several approaches and computer codes have been developed by authors such as Rudman and Blakely (1975), Huestis and Ander (1983), Blakely (1995), Phillips (1997), Pirttijärvi (2009), Zlatopolsky (1992), Bagherbandi (2012), and Soto-Pinto et al. (2013). Most of these codes are written in basic languages such as FORTRAN, PASCAL, and C. They are usually integrated in software; this makes them difficult to modify for particular uses. Setting up codes in an advanced language like MATLAB is very efficient as it makes it simple, accessible, modifiable, and better adapted to the researcher’s needs. Thus, in this work, we propose a new MATLAB code that groups together several filtering methods (polynomial separation, upward continuation, horizontal gradient computation, and maxima gradient localization) to localize lineaments in a region. For validation purposes, the code is tested on synthetic data produced by a prism to delineate and localize the contours of this prism. After validation, the code is then applied to gravity data of the transition zone between the Benue basin and Lake Chad basin to localize lineaments in this area. The results obtained are compared with those presented by previous studies.

Methods

Polynomial separation

Bouguer anomalies are the superposition of regional and residual effects of geological structures. For a good analysis, it is important to dissociate these two geological parts where residual anomalies give the best information. Regional anomaly is represented by a polynomial function that is in the form of an Eq. \((1)\) (Njandjock et al. 2012).

$$r\left(x,y\right)=\sum\nolimits_{r=0}^{n}\sum\nolimits_{s=0}^{n}{c}_{rs}{x}^{r}{y}^{s}$$
(1)

where \(r\left(x,y\right)\) is the regional value of Bouguer anomaly at \(\left(x,y\right)\), \((n)\) is the degree of the polynomial, and \({c}_{rs}\) represents the polynomial coefficients. These coefficients are determined by the Gauss pivot method by minimizing the quadratic difference \(E\) given by Eq. (2):

$$E=\sum\nolimits_{i=1}^{N}{[r\left({x}_{i},{y}_{i}\right)-b\left({x}_{i},{y}_{i}\right)]}^{2}$$
(2)

where \(b\left({x}_{i},{y}_{i}\right)\) is the value of the Bouguer anomaly at the position \((x_{i} ,y_{i} )\) and \(N\) the number of stations, where the Bouguer anomaly is known. We can thus deduce the residual anomaly at any point using Eq. (3).

$${r}^{\prime}\left({x}_{i},{y}_{i}\right)=b\left({x}_{i},{y}_{i}\right)-r\left({x}_{i},{y}_{i}\right)$$
(3)

Upward continuation

This filtering method allows to attenuate the effects of the superficial gravity sources and to better represent regional field at different heights. In fact, if the values ​​of the field are known on a surface \(S\), by using the upward continuation operation, it is possible to estimate the values ​​of the field on a surface \({S}^{\prime}\) located at a height \(h> 0\), if no source exist between \(S\) and \({S}^{\prime}\). This operation is done using Eq. (4):

$${R^{\prime}}_{{z}^{\prime}}\left(u,v,h\right)={e}^{-2\pi h\sqrt{\left({u}^{2}+{v}^{2}\right)}}.\,{R^{\prime}}_{z}(u,v,0)$$
(4)

where \({R{\prime}}_{{z}{\prime}}\left(u,v,h\right)\) and \({R{\prime}}_{z}(u,v,0)\) are the expressions of residual anomalies at the surfaces S′ and S, respectively.

Horizontal gradient

Horizontal gradient computation of Bouguer anomaly is very important to localize geological contacts like lineaments because they correspond to peaks of gradients (Blakely 1995; Khattach et al. 2004). The amplitude value of the horizontal gradient \(g\left(x,y\right)\) is given by Eq. \((5)\) (Cordell and Grauch 1985):

$$g\left(x,y\right) = \sqrt{{(\frac{\partial {r}_{z}^{\prime}(x,y)}{\partial x})}^{2}+{(\frac{\partial {r}_{z}^{\prime}(x,y)}{\partial y})}^{2}}$$
(5)

where \(\frac{\partial {r}_{z}^{\prime}(x,y)}{\partial x}\) and \(\frac{\partial {r}_{z}^{\prime}(x,y)}{\partial y}\) are the horizontal derivatives of the anomaly field \({{r}^{\prime}}_{z}\left(x,y\right)\) along directions \(x\) and \(y\), respectively.

The greatest advantage of the horizontal gradient method is that it is least susceptible to noise in the data; it requires only the calculation of the two first-order horizontal derivatives of the field and the horizontal gradient filter, which can be estimated by Phillips (1998). Grauch and Cordell (1987) discussed the limitations of the horizontal gradient magnitude for gravity data. They concluded the horizontal gradient magnitude maxima can be offset from a position directly over the boundaries, if the boundaries are not near vertical and close to each other.

In 1986, Blakely and Simpson proposed a method to automatically locate the horizontal gradient maxima. It consists firstly in comparing the value \({g}_{i,j}\) of the horizontal gradient at any point \((i, j)\) with the values of its eight direct neighbors in four directions. This comparison test is done using the four following inequations (Blakely and Simpson 1986):

$$\left\{\begin{array}{l}{g}_{i-1,j}<{g}_{i,j}>{g}_{i+1,j} \\ {g}_{i,j-1}<{g}_{i,j}>{g}_{i,j+1} \\ {g}_{i-1,j+1}<{g}_{i,j}>{g}_{i+1,j-1} \\ {g}_{i-1,j-1}<{g}_{i,j}>{g}_{i+1,j+1} \end{array}\right.$$
(6)

The proximity of point \((i,j)\) at maximum contour of abrupt density change is determined by the number \(N\) of verified inequations which represents the order of maxima. This number is between \(0\) and \(4\) depending on the total number of inequations that is \(4\). Thus, the more the number \(N\) increases, the closer the point is to the maximum contour. We can thus choose the quality of the desired points by fixing the minimum number \(N\) of inequations to be verified. We usually set \(N\ge 2\) or \(3\).

The values of the horizontal gradient maxima \({g}_{max}\) and the maximum position \({x}_{max}\) are given by

$${g}_{max}=a{{x}^{2}}_{max}+b{x}_{max}+c$$
(7)
$${x}_{max}=-\frac{b}{2a}$$
(8)

where the coefficients a, b, and c are given by

$$\left\{\begin{array}{l}a=\frac{1}{2{d}^{2}}({g}_{i-1,j}-{2g}_{i,j}-{g}_{i+1,j})\\ b=\frac{1}{2d}({g}_{i+1,j}-{g}_{i-1,j}) \\ c={g}_{i,j}\end{array}\right.$$
(9)

(d is the step or the distance between the intersection grids).

The dip of the lineament is given by the maxima migration when depth increases. For a vertical structure, all the maxima are superposed (Archibald and Boschetti 1999; Khattach et al. 2004; Vanié et al. 2006).

On this basis, a simplified flowchart that takes into account all lineament characterization parameters for the developed algorithm is written in the MATLAB-based platform (Fig. 1).

Fig. 1
figure 1

Flowchart code

Code execution

The MATLAB code developed and presented in this work can be applied to gravity data from an area to localize lineaments. To run the code, it is necessary to have an input Excel file name. The code first requests the name of the Excel file containing the data regularly distributed in the zone. This file is organized in such a way that the code can read the coordinates of each point and the corresponding Bouguer anomaly value. Then, it requests the desired order of separation; length in km along longitude and latitude of the study area; the number of data along x and y directions for this area; desired order maxima; maximum depth of upward continuation; upward continuation step in km; and the minimum values of the longitude and the latitude. Using the above information, the code generates the results of the processing and recorded them in the original Excel file. This file contains on the first sheet the longitudes, the latitudes, the values ​​of the Bouguer, residual, and regional anomalies. On the other sheets of the Excel file, upward continuation values, horizontal gradient, and their maxima are written in ascending order of the upward continuation. From these results, we can plot maps that represent Bouguer, residual, regional, residuals upward-continued, horizontal gradients, maxima, maxima superposition, and lineaments system of the area.

Applications

Synthetic model

The prism model (Fig. 2a) is a good example of shape with sharp contours. In this part, we show the application of code to data obtained from a prism whose parameters are as follows: density contrast: 1 kg/m3; length: 20 km; width: 20 km; height: 2 km; depth: 2 km. Anomalies produced by the prism were generated using a MATLAB code set up from Banerjee and Das Gupta (1977)’s relation. These gravity data are generated on a surface of 50 × 50 km2 with a step of 1 km. To verify its reliability and efficiency, the code presented above is applied to these synthetic data to delimit the contours of the prism. The following information was used as input into the code Excel file name: Model; the degree of the polynomial separation: 3; length of the area along x: 50 km; length of the area along y: 50 km; the number of data along x: 51; the number of data along y: 51; order of maxima of the gradient: 2; the maximum depth of upward continuation: 0 km; upward continuation step: 0 km; the minimum value of longitude: 0 km; the minimum value of latitude: 0 km.

Fig. 2
figure 2figure 2

a Representation of the prism, b theoretical anomaly map, c regional anomaly map, d residual anomaly map, e horizontal gradient map of the residual anomaly, f maxima map of the horizontal gradient, g superposition map of the horizontal gradient and the maxima, and h contour of the prism

From the results obtained, we plotted maps representing the Bouguer, the regional, the residual, the horizontal gradient of residual, the gradient maxima, the superposition of horizontal gradient and maxima, and prism contour. Figure 2b–h shows these different maps in the same order as cited above. The Bouguer gravity anomalies map (Fig. 2b) shows the effect of the prism expressed here by anomalies of small amplitude concentrated in the center of the map because of the choice of a positive density value. The regional anomaly map (Fig. 2c) tells us more about the broad gravity effect produced by this prism, and the residual map (Fig. 2d) shows the effect of the prism itself. The horizontal gradient map (Fig. 2e) shows the contours of the prism represented by areas of high gravity gradient values. The maxima map of the horizontal gradient (Fig. 2f) highlights these contours. The maxima observed in the center of this map delimit the real contours of the prism and those at the ends are the edge effects that should not be interpreted. A superposition of the horizontal gradient and maxima (Fig. 2g) helps to better define the contours of the prism (Fig. 2h). This clearly demonstrates the efficiency of the code to precisely localize the contours of the prism. These contours can be assimilated to lineaments in an area with the structural features.

Field example: transition zone between the Benue basin and Lake Chad basin (Cameroon)

Geographically, the transition zone between the Benue and Lake Chad basins is located in Central Africa, precisely in North Cameroon between latitudes 8°35′ and 10°98′ north and longitudes 12°68′ and 15°32′ east (Fig. 3). It is included in a vast mobile zone in Central Africa. This region has undergone several tectonic movements during the Cretaceous and was affected by the Pan-African Orogeny, which produced some lineaments within the basement, some of which have already been identified by previous geological and geophysical studies.

Fig. 3
figure 3

Location of the transition zone between the Benue and Lake Chad Basins

Geologically, this area is dominated by a broad sedimentary cover and a Precambrian basement (Fig. 4). Thus, the basement is essentially crystalline rocks (various granites and metamorphic rocks) attributed to the lower Precambrian. It finds shale, granitoid, slate, micaceous quartzite, muscovite schist, biotite, and amphibole (Olivry 1986). We also note the presence of gneisses, migmatites, diorites, anatexis, syenites, granites, basalts, and shales (Penaye et al. 2006). Sediments also cover this area. Previous geological and geophysical studies based on Earth Gravitational Model 2008 (EGM2008) and terrain model data show that this zone is also characterized by numerous major and minor lineaments mainly oriented NW–SE and NNE-SSW (Essi et al. 2017). Water channels such as Benue, Logone, mayo-kebi, mayo-louti, and mayo-tsanaga characterize the hydrology of this zone.

Fig. 4
figure 4

Geological map of the study area modified from Penaye et al. (2006). (1) Post-Pan-African sediments, (2) late to post-tectonic Pan-African granitoids, (3) syntectonic granite, (4) Mayo-Kebbi batholith: tonalite, trondhjemite, and granodiorite, (5) medium- to high-grade gneisses of the Northern domain, (6) Mafic to an intermediate complex of the Mayo-Kebbi domain (metadiorite and gabbro- diorite) and amphibolites, (7) Neoproterozoic low-to medium-grade volcano-sedimentary sequences of the Poli-Léré Group, (8) remobilized Palaeoproterozoic Adamawa-Yadé domain, (9) thrust front, and (10) strike-slip

The gravity data used in this study have been acquired from the Earth Gravitational Model 2008 (EGM2008). This model is completed to degree and order 2159 and contains additional coefficients up to degree 2190 and order 2159 (Pavlis et al. 2012). It provides gravitational data with a spatial resolution of \(5\) min of arc. EGM2008 integrates land, airborne, and maritime gravity data as well as satellite altimetry-derived data. A total of 4096 data points were used in this study.

The Matlab code presented is applied to gravity data of this zone to localize lineaments. The following information was used as input to run this code is Excel file name: Bouguer; the degree of the polynomial separation: 3; length of the area along x: 291.375 km; length of the area along y: 291.375 km; the number of data along x: 64; the number of data along\(y: 64\); order of maxima of the gradient: 2; maximum depth of upward continuation: 30km; upward continuation step: 10 km; 4.5 km spacing; the starting point along\(x\): 1408.3125 km; the starting point along \(y\): 927.3125 km.

Results and discussion

From the results obtained and recorded in an Excel file and using the SURFER map software, we can plot the maps which represent Bouguer, residual, regional, residuals upward-continued, horizontal gradients, gradient maxima, and lineament system of the area.

Bouguer anomaly map shows anomalies oriented NW–SE and SSW-NNE with values between − 85 and \(+ 10\) mGals (Fig. 5a). It highlights positive and négative anomalies. For a better geological interpretation, the Bouguer anomalies have been separated into regional and residual anomalies.

Fig. 5
figure 5

a Bouguer anomaly map, b regional anomaly map, and c Residual anomaly map

The regional anomaly map (Fig. 5b) shows a mass defect in the N-W part, with anomalies varying between − 66 and − 46 mGals. In its S-W part, we observe an excess of mass with anomalies varying between − 36 and − 26 mGals. That would mean that geological mass is heavier in the south than in the north of the study area. But for more information on geology, we need to look at the residual map.

The residual anomalies map (Fig. 5c) highlights positive and negative anomalies with amplitudes between \(-55\) and \(45\) mGals. These anomalies reflect the effects of superficial and shallow geological structure. The positives anomalies observed in this map could be linked to the intrusive bodies in the basement (basalts, migmatites, and gneiss). The negative anomalies are linked to the granitic rocks and the sedimentary formations composed mainly of sandstone, marl, and sand present in these areas (Kamguia et al. 2005; Mouzong et al. 2014).

The upward-continued residual maps to 0 km, 10 km, 20 km, and 30 km (Fig. 6) show that the general trend of the anomalies remains the same. On these maps, we note that the anomalies of small sizes and high intensities corresponding to near surface gravity sources are gradually less evident. The negative and positive anomalies observed in these maps are separated by gradients, indicating the presence of lineaments in the subsurface. To better highlight these potential lineaments, the horizontal gradient has been calculated and the gradient maps at different depths of upward continuation were plotted (Fig. 7). These maps show the zones of the maxima which correspond to the lineaments and represented here by white segments. Some lineaments disappear, others appear as the depth increases, and this allows detecting the shallower and very deep lineaments in this region. The analysis of these lineaments reveals four main dominant directions: NE-SW, SE-NW, NNE-SSW, and WNW-ESE. These directions correspond to the major structural lineaments between the different morpho-structural units of the study area. Abdullahi et al. (2019) have interpreted the NE-SW and NNE-SSW trends as the general orientation of the mega Benue trough and the deep seated basement structures of the Neoproterozoic thermo-tectonic units of the Brasiliano/African plate whereas. The NW–SE and WNW-ESE trends represent an important structural trend in Africa that interpreted the dextural shear zone and the mega shear zones in Africa. Some of these lineaments detected coincide with the river beds in the area (Benue, mayo-kebi, mayo-louti). For a precise localization of the lineaments, we have plotted the maps of maxima for each depth of upward continuation (Fig. 8). In order to have an idea of ​​the dip of lineaments, we have superposed the maxima from 10 to 30 km deep with a constant step of 10 km (Fig. 9a).

Fig. 6
figure 6

Upward-continued residual anomalies maps at a 0 km, b 10 km, c 20 km, and d 30 km

Fig. 7
figure 7

Horizontal gradient maps at a 0 km, b 10 km, c 20 km, and d 30 km

Fig. 8
figure 8

Horizontal gradient maxima maps at a 0 km, b 10 km, c 20 km, and d 30 km

Fig. 9
figure 9

a Maxima superposition map, b lineament maps of the study area (this study), c lineament maps of the study area according to Jean Marcel et al. (2017), Fofie et al. (2019), and Mouzong et al. (2018)

From this superposition map of the maxima, we elaborated the lineament system map of the area (Fig. 9b). These lineaments are plotted along successive points representing the maxima of gradients. Analysis of the lineament system map shows that the transition zone between the two basins presents numerous lineaments (\(40\)), whose some are already known and others not. They do not have privileged directions. Thus, we note the presence of families of N-S, W-E, SE-NW, and WNW-ESE general direction lineaments. Theses directions are in agreement with those revealed by Abdullahi et al. (2019a, 2023) in the south-western part of the Benue trough. The lineaments showed in blue color on the map of the Fig. 9a and b are the new lineaments detected in the area and those in red color (L10, L11, L16, L17, L23, L24) correspond to those observed on the lineament maps of the area elaborated by Essi et al. (2017), Mouzong et al. (2018), and Fofie et al. (2019) (Fig. 9b and c).

The results obtained from the application of this code to the transition zone between the Benue and Lake Chad basins show its validity. The lineaments localized on the different maps of horizontal gradient correspond to the lineament areas (gradient zone) on the upward-continued maps. Since the lineaments represent the streamlines, according to the results obtained from this code, some lineaments (L9, L12, L22, and L30) correspond to the streamlines of this transition zone (Benue, mayo-louti, and mayo-kebi). The different directions of the detected lineaments (N-S, W-E, NE-SW, SE-NW, NNE-SSW, and WNW-ESE) are in perfect agreement with those revealed by previous studies in the region, notably those of Abdullahi et al. (2019a, 2023) carried out in the soouth-western part of the Benue trough. Several lineaments identified by Essi et al. (2017), Mouzong et al. (2018), and Fofie et al. (2019) were detected by this code (Fig. 9b). In addition to the lineaments already identified by these authors using the same data (Essi et al. 2017), other programs, codes, or software, this code made it possible to highlight several other lineaments (Fig. 9b and c). This brings new perspectives, thus improving our understanding of the geological structure of the study area.

Conclusion

This study developed a MATLAB code facilitating the localization of lineaments using gravity data. The methodology was based on several gravity data processing techniques (polynomial separation, upward continuation, calculation of the horizontal gradient, localization of gradient maxima). To verify its validity and effectiveness, this code was first applied to synthetic data produced by a prism then to gravity data from the transition zone between the Benue basin and the Lake Chad basin to localize the lineaments that exist in this area. The analysis of the results obtained shows that this code not only permits to confirm the existence of lineaments already detected by previous studies in this area but also to identify and localize new lineaments, thus increasing the structural and scientific knowledge of this region. This knowledge can be exploited for the realization of major public works and other economic purposes.