1 Introduction

Frequency counting of impact craters on terrestrial planets and moons of the Solar System can provide a framework for relative geochronology of the upper planetary crust (Hartmann and Neukum2001; Carr and Head 2010) and, within model-dependent conditions, absolute ages (Neukum and Hiller 1981). It also constitutes a means of probing into paroxysmal phases of meteor showers in the early Solar System (Gomes et al. 2005). Numerous spaceborne surveying and remote sensing missions to Mars (Pyle 2012) over the last decades have acquired digital elevation data for the entire planet at usable resolutions, enabling planetary scientists to carry out analysis of the Martian impact craters (e.g. Brunetti et al. 2014). However, counting of myriads of impact craters is a tedious and time consuming task.

Subjects of research in geology, and consequently in planetary science, involve the reconstruction of original landforms from their current remnants. Such problems can be dealt with if they are reduced to morphological, and eventually geometrical, problems (Bayer 1985). Many of these problems can be tackled by computer algorithms operating on digital terrain models (DTM). Hence, impact crater detection through computer vision methods may be extremely practical in planetary science as it can automate, and thus expedite, the crater-counting procedure. Computer vision (also known as ‘image understanding’) is a branch of computer science aiming at replicating biological (human) vision through appropriate algorithms so that certain image components (objects) can be detected/recognized by computers (e.g. Haralick and Shapiro 1991).

However, planet surface processes (Berman et al. 2009) may induce random and persistent disturbance (noise) to the original structure (signal) over the course of time, resulting in the gradual deformation of the original landform. This is particularly the case of the Martian impact craters whose edges have experienced some degree of erosion (Fig. 1) by the former Martian hydrological cycle (Andrews-Hanna et al. 2007).

Fig. 1
figure 1

Source: ESA/DLR/FU Berlin. (http://www.esa.int/spaceinimages/Images/2014/04/Osuga_valles)

Impact craters on Mars overlapping with relict drainage network in Osuga Valles, 170 km south of Eos Chaos, Valles Marineris. Image center at 15°S/322°E. Image from High Resolution Stereo Camera on Mars Express.

Circular Hough transform (CHT) has been promoted as a method for the detection of impact craters (Kim et al. 2005; Stepinski et al. 2006; Bue and Stepinski 2007). CHT (Illingworth and Kittler 1987) is an adaptation of the Hough transform (e.g. Duda and Hart 1972; Xiao and Weij 2006; Mingzhu and Huanrong 2008). It is a feature detection method that exploits the edges of circular objects in an image to reconstruct their perimeter out of their imperfect instances. This is achieved through a voting procedure from the 2D space of the imagery to a 2D or 3D parametric space.

Nevertheless the noisy nature of most DTMs inevitably introduces votes from irrelevant objects, frequently leading to the emergence of false craters (false positives) while failing to spot true craters (true positives). Investigators on the CHT detection of impact craters (Kim et al. 2005; Bue and Stepinski 2007) address this deficiency of CHT. Bue and Stepinski (2007) promoted an adapted CHT approach which employs algorithms that fragment the DTM into numerous small images, each aimed at wrapping one crater exactly. Although the noisy influence of other objects lying in the neighborhood of a crater is in this way waned to a large extent, the method turned out to be a long-drawn-out and computationally costly one, rendering the adapted CHT less practical for routine crater detection.

Region-based detection (blob detection) may be an alternative way to go around the limitations posed to edge-detection methods (CHT) by imperfect crater instances. Blob detection (Kaspers 2011) utilizes operators (algorithms) capable of delineating regions that exhibit uniform properties. Therefore, blob detection is not affected by the imperfections of linear components, such as the eroded crater edges, and may be able to capture craters that CHT left out. Among various blob detection methods (Kaspers 2011), the determinant of Hessian (DoH) is well-known (Lindeberg 1993, 1998). Blob detection has been applied to numerous cases involving conventional images (e.g. Grauman and Leibe 2011) and satellite imagery (Karantzalos and Argialas 2004).

This work promotes a utility for routine crater counting on the Mars Global Surveyor DTM by integrating open-source CHT and DoH algorithms. It is computationally less costly than other published approaches (e.g. Bue and Stepinski 2007) and yields similarly high scores. This is, to our knowledge, the first application of the Blob-detection method for impact crater detection on a digital terrain model. Next, the methods are contrasted against one another as to their performance and then they are integrated for optimal true-positive detection results.

2 Source Data and Methods

The Planetary GIS Web Server of the United States Geological Survey (USGS) makes available a GIS-ready digital terrain model (DTM) of the Martian surface, released by NASA Goddard Flight Center. The DTM used here was acquired by the Mars Orbiter Laser Altimeter (MOLA) of the Mars Global Surveyor (MGS) robotic spacecraft at a resolution of 463 m/pixel (observed topography within a 0.00781 × 0.00781 degree window). The selection of the study window (shown in Fig. 2) on the DTM was more or less arbitrary. The study area captures a segment of the equatorial area of Mars. According to the USGS Astrogeology Research Program (http://astrogeology.usgs.gov/) this window mainly captures the northern parts of the Sinus Sabaeus quadrangle.

In a DTM, impact craters are perceived as negative topographic features in relation to their immediate neighborhood, enclosed by almost perfectly circular edges. Because the blurry DTM raster image (Fig. 2a) cannot be readily read as is, the fluctuations of the gradient of the DTM can highlight crater ridges as embossed lines (edges) on a low intensity background (Fig. 2b). From the outside inwards, the profile of an impact crater is morphologically expressed by a ridge that sharply goes over a low-lying flat area. The image-processed excerption from the DTM (Fig. 2b) portrays the qualitative characteristics of the Martian impact craters in the study area. Crater morphology on Mars is diverse. Impact craters range in diameter from ~ 450 km to as less as 1 km or even lesser. Surface processes may distort the original perimeter of the craters (Barlow 2016) from nearly circular to jigsaw-like edges, as in the case of the prominent crater in the bottom-right corner of Fig. 2 (1). In addition, ongoing bombardment may produce overlapping craters exhibiting complex configurations: from matryoshka doll-like structures, where craters are completely nested in larger craters (2 in Fig. 2), to interlocked rings (3 in Fig. 2), or a combination of the two (4 in Fig. 2).

Fig. 2
figure 2

a: digital terrain model (DTM) of the study area (source: USGS Planetary GIS Web Server). b: gradient image of the DTM. (1) Crater whose circular edge is eroded acquiring a jigsaw-like shape. (2) Crater nesting in crater, (3) overlapping craters, (4) combination of (1), (2) and (3)

Hough Transform involves switching back and forth from the 2D image space (x, y) to a multi-dimensional space (depending on the number of the curve parameters), known as the parametric space, from which object candidates are detected as local maxima of votes cast into the so-called accumulator matrix. Such a parametric space is known as the “Hough” space (Duda and Hart 1972; Argialas and Krishnamoorthy1992). The CHT algorithm employed in this study is the ‘Phase Coding’ (Atheron and Kerbyson 1999) variation of the CHT algorithm. This implementation can be found in Matlab’s imfindcircles function.

Contrary to CHT, blob detection extracts information from regions of an image that cannot be obtained from edge detectors (i.e. CHT). Lindeberg (1993, 1998) defines a blob as a region of the image corresponding to a local extremum, be it a maximum or a minimum (i.e. a bright blob in a darker background or a dark blob in a brighter background). This definition satisfies the appearance of impact craters on the DTM of Mars which appear as concave basins (lower height—dark areas) exhumed in the ground surface (higher height—brighter areas). Blobs can be automatically detected by employing operators that calculate the gradient fluctuations on an image.

There are two common approaches to blob detection, namely the Laplacian of Gaussian (Mikolajczyk and Schmid 2004) and the Determinant of Hessian (Lindeberg 1998). Both aim at detecting either convex or concave structures in an image. Because of the apparent resemblance between the graphical representation of the Determinant of Hessian (DoH) and the crater geometry (impact craters resemble 3D, inverted, Gaussian-like depressions) it is the DoH operator that is here tested on the DTM from the Mars Global Surveyor. The Determinant of Hessian searches the image for locations that display intense derivatives in orthogonal directions (Grauman and Leibe 2011).

For the detection of impact craters as blobs, this study takes advantage of the blob_doh algorithm available from the scikit-image library for image processing in the Python programming language. The algorithm defines the center of a blob where the determinant of the Hessian matrix is maximized, and then delivers their (x, y) coordinates and the standard deviation of the Gaussian kernels convolved with the Hessian matrix. The radii of the blobs are approximately equal to the standard deviation of the Gaussian kernel. One shortcoming of blob_doh is that it cannot detect radii smaller than 3 pixels wide due to the box filters (Bay et al. 2008) employed in the approximation of the Hessian Determinant.

Figure 3 illustrates two topographic profiles corresponding to the dashed lines in sections A and B respectively (drawn in Fig. 2) and reveal that impact craters may crop up at diverse landscapes from tilted sinusoid-like (Fig. 3a) to remarkably flat areas (Fig. 3b). Therefore, the apparent complexity of crater shapes encountered on Mars poses a challenge to the CHT and DOH methodologies employed here. Thus, CHT and DoH were tested against two distinctive landscape settings designated as A and B in Fig. 2 in order to compare their performance on both trended (A) and plane (B) topographies. Before applying the CHT and DoH algorithms, excerpts from the DTM of the two selected areas (Fig. 2) underwent some image pre-processing in order to optimize the operator’s performance. The “median” edge-preserving, noise-reduction filter (MF) was employed for both CHT and DoH. Nevertheless, CHT requires some additional amount of image pre-processing so that the circle edges emerge. Therefore, a standard deviation filter was applied to the DTM in order to emboss areas of high variance, such as the crater edges, which are the features to be recognized by the CHT algorithm. Moreover, the Canny and Sobel edge detection operators were applied separately. Finally, the profile curvature was calculated to reveal the edges and a threshold was set to the gradient magnitude so as to convert the grey-scale image into black and white (binary image). A step including morphological opening and skeletonization of the image is usually interposed. In that way only foreground pixels with high gradient are designated for casting votes.

Fig. 3
figure 3

a Topography profile of test area A in a NW–SE direction. Topography is characterized by sinusoidal-like fluctuations while trending towards higher elevations to the SE. b Topography profile of test area B in a W–E direction, drawn across the middle of area B

By default, DoH searches for local topographic extrema without distinguishing minima (craters) from maxima (bright blobs corresponding to concave or hilly areas). Because of this, DoH will inevitably return ‘phantom’ craters (false positives) which skew the results dataset. One way to prevent blob_doh from extracting bright blobs is to insert an intensity cut-off in Python in order to exclude concave or hilly areas, which correspond to groups of high-intensity pixel values. However, insertion of an intensity cut-off inevitably leads to the rejection of a large portion of the image area and exclusion of craters resting at higher elevations.

With the intention of improving the performance of DoH on a trended topography, such as area B, without losing information, we de-trended the relevant DTM in ArcGIS. De-trending involved fitting a plane to the DTM, and then subtracting it from the original DTM. The result was a leveled DTM which maintained the initial topological associations of the geomorphic features. This has the advantage that any intensity cut-off value will prevent DoH from extracting concave features without discarding portions of the image resting above the intensity cut-off value.

As some overlap between the two methods may occur with regard to the crater detection results, it is essential that duplicate true positives be detected and counted as singles in the output. For this reason an algorithm was designed to identify those craters extracted by both methods. Specifically, a crater is defined by three parameters: the x and y coordinates of its center, and its radius. These parameters will probably vary slightly, even for the same crater, when extracted by different methods. Therefore, searching for exactly the same values will fail in duplicate crater recognition. For this reason, a tolerance-based method for the elimination of duplicates was implemented.

$$|x_{1} - x_{2} | < x_{tol}$$
(1)
$$|y_{1} - y_{2} | < y_{tol}$$
(2)
$$|r_{1} - r_{2} | < r_{tol}$$
(3)

Let x1, y1, r1 be the x, y coordinates and radius of a crater of the CHT method respectively and x2, y2, r2 be the x, y coordinates and radius of a crater of the DoH method. Arbitrary tolerance values (in pixels) can be set for each element, i.e. x tol , y tol and r tol . Then, the above three conditions (13) must be fulfilled in order to consider a crater as duplicate. Specifically, the absolute difference of the radii must be smaller than a certain value (tolerance), to be considered as duplicates. All tolerance values were set to 15 pixels.

3 Results

The performance of CHT and DoH was evaluated on the basis of well-established indices (Wiedemann et al. 1998; Mariano et al. 2002) which address three queries: (1) how complete (completeness) and (2) how accurate (correctness) the results are, and (3) what their quality is. Completeness is the ratio of objects identified by the algorithm over the ground-truth ones ([true positives] ÷ [true positives + false negatives]), whereas correctness is the ratio of objects identified by the algorithm over all objects detected—both true and phantom ([true positives] ÷ [true positives + false positives]). The final index that characterizes the performance of the operator is quality (e.g. Wiedemann et al. 1998; Mariano et al. 2002; Shan and Lee 2005) defined as the ratio of the objects identified by the algorithm over both the ground-truth objects and the phantom objects ([true positives] ÷ [ground-truth + false positives]).

Table 1 lists the results of CHT algorithm applied to both DTMs excerpts after they underwent image pre-processing with various filters. The above indices were calculated both by counting craters (ComN, CorN, QuaN) and measuring the relevant surface (ComA, CorA, QuaA). The S2 and S3 preprocessing algorithms involved applying the standard deviation filter two and three times respectively. The window sizes of the standard deviation filters were 11 × 11, 3 × 3 and 3 × 3 from the first to the last pass. Search radius range was set to 10–70 pixels in all cases. For the CHT method, the best results were achieved using the S2 filtering for area A, while the S3 filtering provided better results for area B (Table 1, Fig. 4). DTM de-trending seems to have a negligible influence on the CHT results. After removing the trend the number of craters was found to be quite similar to the number of craters identified in the DTM prior to detrending.

Table 1 Results of the CHT algorithm performed on areas A and B
Fig. 4
figure 4

a Red circles correspond to craters extracted by CHT in area A after the DTM underwent the S2 filtering (see Table 1). b Red circles correspond to craters extracted by CHT in area B after the DTM underwent the S3 filtering (see Table 1)

The syntax of blob_doh for Python requires 3 input parameters, namely the minimum and maximum standard deviations of the Gaussian kernel for detecting both small and large blobs as well as a threshold known as the scale parameter which defines the smallest maxima to be detected. We experimented with several combinations of these parameters. However, important omission or commission errors are introduced (Fig. 5a) because the algorithm extracts both convex and concave blobs indiscriminately. Yet, the most crucial parameter in DoH, turned out to be the cut-off value which we introduced to the blob_doh code. By progressively lowering the cut-off value we managed to free the output from false craters (Table 2). This can be straightforwardly explained by recalling the shape of the topographic profile (Fig. 3a).

Fig. 5
figure 5

a Results of DoH in area A for a cut-off value of 150. b Results of DoH in area B for a cut-off value of 150. Along with the concave features (craters) the algorithm still extracts some convex ones (hills)

Table 2 Results of the DoH algorithm performed on areas A and B

In DoH, it seems that de-trending plays a more important role. Indeed, when DoH ran on the de-trended DTM of areas A and B it scored a higher number of true positives (Table 2). The most satisfactory results for DoH (Table 2, Fig. 5) have been achieved using a cut-off value of 150 for the original DEM and 110 for the de-trended DEM (area A). For area B, cut-off values of 140 and 110 produced the best results for the original and the de-trended DEM (Fig. 6), respectively.

Fig. 6
figure 6

Results of DoH in de-trended area A. Having used an appropriate cut-off value the performance of DoH improved significantly on the detrened DTM

Neither CHT nor DoH is capable of capturing the overwhelming majority of the craters independently. A way to go around the problem of phantom craters, as well as to increase the overall number of detected craters by combining both computer vision approaches is discussed hereafter.

4 Discussion

A careful examination of Fig. 4a, b shows the tendency of CHT to capture craters with diameter smaller than ~ 50 km while missing the larger ones systematically. Investigators on the CHT detection of impact craters (Kim et al. 2005; Bue and Stepinski 2007) address the partial deficiency of CHT to detect impact craters. The imperfect instantiation of the craters in the pre-processed image, due to natural erosion of the crater edges, and the contribution from edges of irrelevant objects (i.e. relict drainage network and other types of topographic discontinuities) that cast false votes in the accumulation matrix will result into low signal-to-noise ratios. Bue and Stepinski (2007) managed to enhance the detection capacities of CHT by employing a long-drawn-out process (which lies beyond the purposes of this work) deploying algorithms which fragment the DTM into numerous small images, each aimed at wrapping one crater exactly. In this way the noisy influence of other objects lying in the neighborhood of a crater is eliminated. Nevertheless, the higher computational cost involved in that approach (Bue and Stepinski 2007) renders the adapted CHT less practical for routine crater detection. Contrary to CHT, DoH seems to miss smaller craters, while performing better on the larger ones (Fig. 5a, b).

Having optimized the output from both CHT and DoH, we combined the results (Fig. 7a, b). This was accomplished by merging the results of the two methods and by applying the tolerance-based algorithm for the elimination of duplicates explained earlier. Once the duplicate craters were found, it was the CHT-duplicates that were discarded from the data set with the merged craters. Consequently, a more accurate crater count (and a visually better vector) was obtained, using a combination of CHT and DoH methods. The success of the duplicate crater finder algorithm was 100%. All the craters that were discarded by this algorithm were indeed duplicates. There were no false positives or false negatives. The results of this matching algorithm are illustrated in Fig. 7a, b.

Fig. 7
figure 7

a Craters detected in area A by combining CHT and DOH on the de-trended DTM. Blue: craters found by either CHT or DoH (for craters found by both methods the duplicates of the CHT method were removed). Green: ground-truth craters (manually drawn) that match a blue crater. Red: ground-truth craters not found by either method (omission error). Yellow: craters found by either method but do not belong to ground-truth (false positives—commission error). Cases of complex structures resulting from interlocking craters are denoted by numbers: (1) crater with eroded rim, (2) craters nesting in craters, (3) overlapping craters, (4) combination of (1), (2) and (3). b Craters detected in area B by combining CHT and DOH on the de-trended DTM. See a for description

Aside from the challenges posed by the irregularity of the topography, presence of complex structures resulting from interlocking craters, such as those described in Sect. 2 and Fig. 2, additionally challenge the detection capabilities of the integrated methodology put forward here. Figure 7a, b shows that the integrated algorithms can isolate individual craters in similarly complex contexts, and this is an advantage of the proposed methodology.

5 Conclusions

Application of conventional CHT to the DTM of Mars achieved to capture small-sized (< ~ 50 km) craters. On the contrary, DoH succeeded in capturing the remainder (larger) craters leaving amiss those captured by CHT, with some degree of overlap on medium-sized craters. DoH necessitated the introduction of an intensity cut-off value in order to prevent the algorithm from encircling true negative features (hillocks). The performance of DoH was challenged further by irregular surfaces; introduction of a cut-off value led to the rejection of much of the image area, as well as of craters lying in high-elevated areas. We circumvented the problem by de-trending the DTM, without affecting the topological relationships of the features appearing in it. De-trended DTMs allowed DoH to score higher.

Combined use of CHT and DoH ensures higher scores in crater detection than CHT alone. As of now, adaptations of CHT that make use of meticulously pre-processed images including fragmentation of the image into small icons (Bue and Stepinski 2007) have been characterized by a higher rate of success. Nevertheless, the higher computational cost involved in such an approach (Bue and Stepinski 2007) renders the adapted CHT less practical for routine crater detection as long as the processed image cannot be substantially released from noise introduced by the presence of surrounding features (e.g. relict drainage network, rims of irregular basins etc). DoH can cope with the image noise better than CHT and image preprocessing requirements are least. The methodological progress presented here would expedite impact crater detection on the rocky planets.