1 Introduction

Planetary bodies have remained intriguing to humans since ages unknown. What started with simple observations of the moon, planets and stars, soon evolved into formulating detailed and complex mathematical relationships governing their behaviour and other features. As technology advanced, sophisticated space-crafts and satellites were launched, both manned and unmanned, which, as a part of their mission, provide an enormous volume of planetary images. The availability of legible images of planetary surfaces has further spurred the possibility of crater detection from such images making it a viable tool for space exploration and scientific research.

Geological studies of the planetary surfaces require the detection and subsequent estimation of impact crater ages as well as study of their structures, density and other features. Several such pieces of work involving detection and study of impact craters has been done [3]. Crater catalogue creation is another application which can serve a number of purposes [10]. Some detection work has also focussed towards facilitating autonomous landing on planetary surfaces [3]. Diverse schemes have been used to detect the craters which include arc fitting [6], capturing circularity using Circular Hough Transform [11], ellipse fitting– a more sophisticated but time consuming approach detecting elliptical craters [7], texture and template matching [1, 2]. Several machine learning techniques like neural networks [12], SVM [5, 12], boosting [8, 12], genetic algorithm [4] have also been used. Most of the above mentioned techniques and schemes for crater detection are adequate for off-line studies like geological analysis and crater catalogue implementation. However, these methods require intensive computation and seem fairly unsuitable for real-time tasks like detection for the purpose of autonomous landing.

To address the intensive computation and time requirement issue, it is necessary to conceive of the crater detection task in a simplified fashion. Craters have several features, namely – a circular or elliptical shape, a more or less continuous structure of the rims, a distinct dark-light texture. We can reduce the detection time if we exploit the properties which require a minimal amount of mathematical computations. The proposed approach implements this by attempting detection of the probable crater rims using standard deviation filtering and thresholding, filtering out the crater containing Region-of-Interests (ROIs) by morphological operations and finally detection of craters by contrast change detection in the ROIs. We deliberately avoid the circle or ellipse fitting stage in order to reduce the computation time. Experimental results indicate a commendable detection rate and improvement in time requirement over circle fitting methods.

2 Proposed Method

Figure 1 shows a block diagram of the proposed approach. The approach has three distinct stages. The first one deals with the identification of probable crater rims on the surface image under examination, referred to as the original image, in the block diagram. The ridge map contains actual crater rims as well as undesired surface irregularities. Mathematical morphological operations are used to sift the ROIs (containing craters) from the ridge-map in the second stage. Finally, texture analysis is performed on the ROIs to verify crater presence in them.

Fig. 1.
figure 1

The proposed crater detection scheme.

Fig. 2.
figure 2

A surface image showing the presence of distinct crater rims on both darkened and lightened sides of the craters

Fig. 3.
figure 3

(a) shows the original image. (b) shows the edge map obtained by standard deviation filtering, crater rims are profoundly seen. (c) shows the Canny edge map, gives indistinguishable crater rims

Fig. 4.
figure 4

(A) shows the crater containing original image. (B) shows the Systematic augmentation stage output of the same image on which Bounding Box is drawn on two connected components. Total seven connected components are seen on (B)

2.1 The Steps of the Algorithm

  1. 1.

    Crater rim identification: Craters have a unique texture, a lightened half and the darkened other by virtue of their hollow insides. Figure 2 presents a surface image showing multiple such craters. This property gives the rims a different light intensity than its surroundings. This feature is well captured across the crater if we use an extraction technique by which we can gain insight into the localized changes in the gray intensity. This task is accomplished by performing standard deviation (STD) based filtering of the gray scale surface image.

    In order to do this, we initially choose the neighbourhood or locality in which the standard deviation will be considered.

    Let I be the gray-scale original image, the neighbourhood size be n, and I(xy) be the \((x,y)^{th}\) pixel for which the STD filtering value will be defined. Without loss of generality, n is assumed to be even.

    Mean gray value at \((x,y)^{th}\) pixel,

    $$\begin{aligned} M(\varvec{x},\varvec{y}) = \left( {1 \over n+1 }\right) ^2 \sum _{\begin{array}{c} {x'}=x-\lfloor n/2 \rfloor \;to \; x+\lfloor n/2 \rfloor \\ {y'}=y-\lfloor n/2 \rfloor \; to\; y+\lfloor n/2 \rfloor \end{array}} I({x'},{y'}) \end{aligned}$$
    (1)

    Variance value at I(xy),

    $$\begin{aligned} V(\varvec{x},\varvec{y}) = \left( {1 \over n+1 }\right) ^2 \sum _{\begin{array}{c} {x'}=x-\lfloor n/2 \rfloor \; to \; x+\lfloor n/2 \rfloor \\ {y'}=y-\lfloor n/2 \rfloor \; to \; y+\lfloor n/2 \rfloor \end{array}} (M(x,y)- I({x'},{y'}))^2 \end{aligned}$$
    (2)

    Then, the Standard deviation filtering value at (xy), is calculated as

    $$\begin{aligned} S(x,y)= {V(x,y)}^{0.5} \end{aligned}$$

    In order to obtain a binary (BW) edge map from the STD filtered image, it is necessary to perform a thresholding operation. Since this edge map contains the probable crater rims, it is important to select a proper threshold. For this purpose, Otsu thresholding has been used to have a dynamic threshold in the context of the test image.

    Let the threshold value obtained by applying Otsu thresholding on S be T and E(xy) be the BW value at (xy) after quantization of S(xy) subject to the threshold T.

    $$\begin{aligned} E(x,y)={\left\{ \begin{array}{ll} 1, &{} S(x,y)>T \\ 0, &{} \text {otherwise}\end{array}\right. } \end{aligned}$$

    The effectiveness of the standard deviation (STD) filtering is illustrated in Fig. 3. The localized absolute difference computation of the image shown in Fig. 3a, gives the distinct edges which represent crater rims both on the darker and the lighter sides, shown in Fig. 3b. Edge detection using the Canny operator gives a meshed edge map where positive rims and other noisy surroundings become indistinguishable, shown in Fig. 3c. I map will be used in subsequent stages with crater identification being the ultimate goal.

  2. 2.

    ROI extraction: The output of the rim extraction stage, the E map gives the locations on which ROI extraction will be performed. Edge pixels, i.e. the white ones on the E map give the probable locations of crater rims. High frequency noise and other non-relevant surface irregularities also contribute to the edge pixels on the E map apart from the craters. We resort to quantitative (morphological) removal and systematic augmentation of edges to get the continuous crater rims. The crater rims which are enclosed in Bounding boxes give the coveted Region-of-Interest, ROI. The various steps involved, are explained below:

    1. (a)

      Quantitative removal: In most cases, crater rims give one or more edges (8-connected set of edge pixels) with higher volume (number of pixels) whereas high frequency noise and non-relevant irregularities give edges with a lesser volume. Following this observation, we ignore edges which have volume (no. of pixels) less than a certain threshold. From observations made on a large set of images, this threshold was empirically set at 1 % of the total no. of white pixels in the edge map E.

    2. (b)

      Systematic augmentation: As crater rims give disconnected edges, it is important to restore their connectivity before we go for texture analysis in the next segment. For that, we perform closing operation on the remaining edges of E by a single structuring element followed by a hole-filling operation on the modified edges. This gives a somewhat continuous set of probable crater rims.

    3. (c)

      Enclosing the probable crater locations in Bounding Boxes: After establishing structural continuity of the probable crater rims in the previous stage, it is necessary to quantitatively ‘mark’ those regions for crater detection in the final stage. For this, we draw Bounding Box around each of such probable crater rim or connected component. By bounding box, we imply a rectangle of least area which totally encloses a connected component or probable crater rim. For each probable crater rim (given as an output of System augmentation stage), we note the maximum and minimum abscissa and ordinate respectively. These four measures coupled together gives the x and y span of the bounding rectangle.

    Let \(x_{max},\,x_{min},\,y_{max},\,y_{min}\) be the maximum and minimum abscissa and ordinate respectively. The four corners of the Bounding box are given by [\((x_{max},\,y_{max}),\,(x_{max},\,y_{min}),\,(x_{min},\,y_{max}),\,(x_{min},\,y_{min})]\).

    The Bounding box provides a visual marker while the coordinate values give the quantitative locations of the Region-of-Interest (ROIs) which are used in the crater detection stage.

  3. 3.

    Crater detection: Edges generated from crater rims have been the guideline for extraction of the ROIs in the previous stage. But we cannot deny the presence of non-relevant objects in the ROIs. We distinguish craters (detect craters) from non-crater ones by texture analysis of the ROI locations in I.

    The proposed texture analysis is based on capturing the dark-light, high-contrast texture of the crater inside. Standard deviation of the gray values or luminance of an image is indicative of the contrast of an image. Often \(rms\,contrast\) is the term used for the same measure [9]. More the \(rms\,contrast\) of an image, more is its contrast.

    Consider two images with different rms contrast values and whose contrast is enhanced by applying histogram equalization to each image separately. It would be observed that the change in rms contrast value of the originally low-contrast image is considerably more than that of the initially high contrast one. This is a consequence of the increased stretching of the gray-value histogram in the low contrast image.

    The phenomenon mentioned above is analogous to distinguishing an ROI containing a crater from an ROI without crater presence. An ROI containing a crater will possess a high contrast region originally (by virtue of the dark-light texture of the crater), and hence, will show less augmentation in rms contrast after contrast enhancement via histogram equalization. On the contrary, a ROI without a crater is generally a low-contrasted one, arising due to surface irregularities and hence shows larger increase in rms contrast after histogram equalization. This differential behaviour of the ROIs with a crater present as compared to ROIs devoid of craters, is used to detect the craters.

    Let \(R_{1}\) be a ROI (image segment) to be tested for crater detection and I is the original image.

    \(S_{1} = rms\,contrast\) of \(R_{1}\).

    \(S_{I} = rms\,contrast\) of I.

    \(RC_{1} = R_{1}\) after contrast enhancement using histogram equalization.

    \(IC = I\) after contrast enhancement using histogram equalization.

    \(\acute{S_{1}} = rms\,contrast\) of \(RC_{1}\).

    \(\acute{S_{I}} = rms\,contrast\) of IC.

    Fitness value, \(f = (\acute{S_{1}}-S_{1})-(\acute{S_{I}}-S_{I})\).

    f gives the difference of change in contrast between the ROI concerned and the original image. If the change of contrast in a ROI is less than that of the original image, it indicates the presence of a contrasted texture (dark-light) in the concerned ROI. Contrasted texture is synonymous to crater presence while the reverse indicates the absence. So we quantize the fitness value for crater absence or presence as follows:

    \(f<0\),    Crater is detected in ROI

    \(0<f<5\),    Undecided about crater presence

    \(f>5\),    Crater is absent in ROI

Fig. 5.
figure 5

Crater 1: \(f=-23\), detected and present, Crater 2: \(f=4.8\), undecided but present (missed), Crater 3: \(f=-12\), detected and present, Crater 4: \(f = 18.9\), absent and missing, Crater 5: \(f = 16\), absent and missing, Crater 6: \(f =-18\), detected and present

Fig. 6.
figure 6

1: Large crater, 2 and 3: Small crater in the context of the given image.

3 Experimental Validation

Our work is focussed towards autonomous crater detection to facilitate landing on unknown terrain. In order to validate the efficacy of the proposed method, it is necessary to compare the automated detection output with visual probe of the same images by humans.

3.1 Crater Sizes

Crater size is an important parameter which influences the quality of the crater detection task. Missing out a large crater is clearly hazardous for landing but we can expect a ‘missed’ small one to be detectable in a closer, magnified stage which would be available as the spacecraft approaches the planetary surface. It is important to define a large and small crater clearly. Before proceeding to the evaluation stage, we define two classes of craters – large craters and small craters heuristically.

Large Craters: are the ones which cover more than 2 % of image pixels. [6] has classified a crater as large or small by its size (\(Size<8\) pixels: Small, \(8<Size\le 60\): Large) irrespective of the surface image size. A more realistic approach of classification should be using crater size relative to the image size — an 8 pixel crater can be regarded small in a 256 pixel size surface image, but a crater with the same size is relatively large in a 32 pixel surface image.

Small Craters: are the ones which occupy less than 2 % of the pixels of the surface image. Such craters which go undetected in the “small” stage may become detectable in the later stages. It happens if the “small” crater gets a good share of the pixels and becomes a “large” one in the magnified view.

3.2 Metrics for Evaluation

In order to facilitate smooth and autonomous landing, it is necessary to have a good recall rate of detection, specially for large craters. Quality of detection is the other important criteria which takes into account the detection of false targets (non-craters) besides the actual craters. In order to have a practical application, time complexity of detection should also be taken into consideration. We use the following three parameters to evaluate the performance of our scheme and the comparing technique. The evaluation is performed image-wise.

  • \(\bullet \) True detection percentage: It gives the percentage of ‘true’ craters detected by the crater detection scheme. It may be noted that ‘true’ craters refer to those detected manually from a surface image.

    $$\begin{aligned} True \;detection \;percentage \;(TDP)=\frac{TP}{TP+FN}*100 \end{aligned}$$
  • \(\bullet \) False detection rate: It estimates the percentage of non-craters present in the detected set of craters.

    $$\begin{aligned} False \;detection \;rate \;(FDR)=\frac{FP}{TP+FP}*100 \end{aligned}$$
  • \(\bullet \) Detection time (DT): The total time taken to detect all the craters present on an image. It is measured in seconds.

For crater detection assessment, human detection is considered as the ground truth value. True positive (TP) denotes those cases which are classified as craters by the detection scheme as well as the humans. Similarly, True negative (TN), are those which are classified as non-craters by both. The ones classified as craters by the autonomous detector but having ground truth (human) value as non-craters denote False positive (FP), while the reverse class is denoted by False negative, (FN).

3.3 Data Sources

In recent times, spacecraft landings have been made on several planetary surfaces like Mars, Mercury, Venus, Moon and others. These missions have led to the acquisition and transmission of planetary surface images back to earth, as a valuable source of data for exploration and research. We have used images of two diverse heavenly bodies, Mars and the Moon for evaluation of the proposed approach for crater detection. The two major sources of such images for our work have been:

  • Martian images captured by the spacecraft Odyssey. One of the chief motivations for acquiring images of the Martian surface was to map the water distribution of the surface.

  • Lunar images taken by the Lunar Reconnaissance orbiter (LRO) We convert the RGB images of LRO to gray-scale before proceeding with our algorithm.

3.4 Comparison of Performance

The “Crater Detection” stage, where contrast change detection is performed for crater identification, forms the most transformational juncture and hence the most crucial step of the proposed algorithm. We have made the comparative study of our work with the more general and extensively used, Circular Hough Transform (CHT) based detection method (where we have considered the previous stages to be same as that of our work). Figure 7 illustrates a scenario where an elliptical crater is detected by the proposed schema but CHT fails.

Fig. 7.
figure 7

This figure shows the failure of CHT to detect an elliptical crater

3.5 Results

The results of the comparison of the proposed method with the CHT based method has been given in Table 1. The performance with respect to the evaluating criteria are given for large and small craters separately.

Table 1. Results for crater detection is given. TDP, FDR, DT stands for True detection percentage, False detection rate and Detection time respectively. CHT stands for Circular Hough transform. \(\uparrow \) indicates higher the value, better the performance on the metric, similarly \(\downarrow \) indicates the reverse, the lower the better.

Results have been obtained for 25 images of the Martian surface and 25 of the Lunar surface. A total of 123 craters were found the Martian surface images (including large and small) while 141 were detected on the Lunar surface. The mean criteria values across those images has been presented on Table 1. It is observed from the results that performance of both CHT-based technique and the proposed scheme is better for Lunar images than that of Martian images.

4 Conclusion

This paper presents a fast, autonomous crater detection technique to facilitate landing on unknown surfaces. Validation of its performance has been established through computations made on a large number of actual planetary images captured on various extra-terrestrial missions. Rim continuity detection followed by simplified contrast-change capturing modus operandi enables us to sufficiently reduce the time required. Mathematical morphological operations establish the continuity in the detected rims. The scheme for capturing contrast-change allows us to perform texture matching of craters without having to address the issues of scaling, rotation or alignment which are commonly faced problems during texture matching.

The proposed algorithm provides a unique way of validating crater presence in the ROIs in significantly lesser amount of time than the competing Circular Hough Transform-based technique. A substantially superior True detection percentage is the other important achievement of this work. Improvement of performance for small craters and achieving a better False detection rate constitute our future direction of work. Extending the algorithm to include other kinds of surface images also form the scope of future research.