1 Introduction

Corners are widely applied for helping to tackle many tasks in image processing and computer vision communities, such as 3D construction, object tracking, robot navigation, and image registration. By now, extensive corner detection approaches have been proposed. Generally speaking, these methods can be categorized into two groups [29]: Intensity-based and contour-based. Intensity-based methods [1, 2, 10,11,12,13, 15, 21, 25, 27, 28] directly deal with the intensity values (or grey scales) while contour-based methods [4, 5, 9, 14, 16, 17, 23, 26, 29,30,31,32,33,34,35,36,37,38] directly or indirectly estimate a significance measure (e.g., curvature) on the points of a planar curve, and select the curvature extrema points as corners [29]. Our approach follows the latter.

With respect to the contour-based corner detectors, curvature estimation is the crucial step [6] and by now lots of influential curvature estimation methods have been proposed. Among them, some corner detectors estimate the curvature of a plane curve directly according to its mathematic definition. For example, the curvature scale-space (CSS) [23], ATCSS [14] and multi-scale curvature product (MSCP) [32] calculated the plane curvature K as follows:

$$ \mathrm{K}\left(\mathrm{u},\upsigma \right)=\frac{\dot{X}\left(u,\upsigma \right)\ddot{Y}\left(u,\sigma \right)-\ddot{X}\left(u,\sigma \right)\dot{Y}\left(u,\upsigma \right)}{{\left[\dot{X}{\left(u,\upsigma \right)}^2+\dot{Y}{\left(u,\upsigma \right)}^2\right]}^{1.5}} $$
(1)

where \( \dot{X}\left(u,\upsigma \right)=x(u)\otimes \dot{\mathrm{g}}\left(u,\sigma \right),\kern0.75em \ddot{X}\left(u,\sigma \right)=x(u)\otimes \ddot{\mathrm{g}}\left(u,\sigma \right),\kern0.5em \dot{Y}\left(u,\upsigma \right)=y(u)\otimes \dot{\mathrm{g}}\left(u,\sigma \right),\kern0.5em \ddot{Y}\left(u,\sigma \right)=y(u)\otimes \ddot{\mathrm{g}}\left(u,\sigma \right) \), and ⊗ is the convolution operator. g(u, σ) denotes a Gaussian function with deviation σ, and \( \dot{\mathrm{g}}\left(u,\sigma \right),\kern0.5em \ddot{\mathrm{g}}\left(u,\sigma \right) \) are the first and second derivatives of g(u, σ) respectively. x(u) and y(u) are the coordinate functions controlled by the given parameter u. This curvature estimation technique is sensitive to the local variation and noise due to its small region of support (RoS) [4, 6]. Meanwhile, many other corner detectors estimate plane curvature via presenting lots of “discrete curvature” which can reflect the degree of the curvature of planar curves. For example, Rosenfeld etc. (RJ73) [26] treated angle as discrete curvature; Awrangjeb and Lu etc. employed the Chord-to-Point Distance Accumulation for discrete curvature estimation [4]. Other “discrete curvatures” include eigenvalue [30], eigenvector [31], GCM [33] and KD curvature [9], SODC [16], ACRA [17] and so on. It has been concluded in [6] that the second kind of approaches enjoy more robustness and higher performance in general. A review of the relevant review works on contour-based corner detection methods can be found in [6, 24].

There are two major problems faced by contour-based corner detectors. One problem is that they heavily rely on the edge-detection results. Different edge detection methods will yield different contours which will greatly reflect the corner detection results. The other problem is that they are sensitive to noise and geometric transformations. For the first problem, robust contour extraction schemes should be proposed; for the second one, constructing robust curvature estimators is an effective way. We are devoted to tackle the second problem. Inspired by intuitive observation that the curvature of a point on a contour is positively correlated to the distance accumulation of its neighbors to the tangent of the point, we present a novel corner detector based on the Relative Tangent-to-Point Distance Accumulation (RTPDA) technology. Since RTPDA uses a relatively larger neighborhood without using any derivative based measurements, it is less sensitive to noise compared with CSS-based corner detectors. What’s more, by adopting relative distance for estimation, RTPDA is more robust to the uniform scaling transform.

The rest of paper is organized as follows. The related works were presented in section 2. In Section 3, we discuss the motivation and the methodology of the proposed corner detection approach. Section 4 presents the image datasets and evaluation metrics employed in this paper. Section 5 presents the experimental results and we present the conclusion in Section 6.

2 Related works

In this section, we shortly review the chord-to-point distance accumulation (CPDA) technique which is the most relevant work [4]. Let a chord move along a curve, CPDA detector estimates the “discrete curvature” of a point pt on the curve with the summation of the perpendicular distances from pt to the chord. Figure 1 illustrates the basic idea of CPDA technique and eq. (2) presents the measurement of the CPDA curvature under one RoS.

$$ {\mathrm{h}}_L(t)=\sum \limits_{j=t-L+1}^{t-1}{d}_{t,j} $$
(2)

where j denotes the index of the first intersected point between chord and curve, every time the chord moves. Three curvature functionsh1(t), h2(t) and h3(t) are calculated corresponding to three chords of lengths L1 = 10, L2 = 10 and L3 = 10. Three functions are normalized as

$$ {{\mathrm{h}}_j}^{\hbox{'}}(t)=\frac{{\mathrm{h}}_j(t)}{\max \left( abs\left({\mathrm{h}}_j\right)\right)},\mathrm{for}\kern0.50em \ 1\le t\le \mathrm{n}\kern0.50em \mathrm{and}\ 1\le j\le 3 $$
(3)
Fig. 1
figure 1

Chord-to-point distance accumulation technique for a chord of length L = 10

Then the discrete curvature values range from 0 to 1. Finally, the three normalized curvature functions hj(t) are multiplied together to find a single curvature value.

$$ \mathrm{H}\left(\mathrm{t}\right)={{\mathrm{h}}_1}^{\hbox{'}}(t){{\mathrm{h}}_2}^{\hbox{'}}(t){{\mathrm{h}}_3}^{\hbox{'}}(t),\mathrm{for}\ 1\le t\le \mathrm{n} $$
(4)

With respect to CPDA detector, discrete curvature is calculated with the chord-to-point distance accumulation, while discrete curvature is calculated with the tangent-to-point distance accumulation in our proposed RTPDA detector. Moreover, there are some other differences between these detectors. CPDA detector uses a larger radius. This may make it miss some weak corners. And it also utilizes the maximum normalization, which can result in the false reflection of the curvature of contour in some situations [17]. In contrast, RTPDA adopts relative a small radius which alleviates this problem. With regard to the computational complexity, CPDA corner detector utilizes three normalized curvature functions to calculate the corner response value, which is quite time-consuming [17], while RTPDA just uses one region of support and experimental results also empirically show that RTPDA is faster than both CPDA and Fast-CPDA. The comparative characteristics of CPDA and RTPDA are summarized in Table 1.

Table 1 Comparative characteristics of CPDA and RTPDA detectors

3 Methodology

In this section, we first specify the motivation of the proposed curvature estimation method and then analyze the relationship between the estimated curvature and real curvature.

3.1 Motivation of RTPDA

We illustrate the basic idea of our proposed method by an intuitive example. Figure 2 shows two parabolic curves y = x2 and y = 3x2 that are both tangent to x axis at the origin p0 = (0, 0). It is not hard to derive the curvature at p0 of the curve y = 3x2 is 6 which is larger than the one of the curve y = x2 . Meanwhile, it is also not hard to find that the heights of the neighbors of p0 on the curve y = 3x2 to x axis is higher than those on the curve y = x2. Since x axis is the tangent line of both the two curves at p0, we can find that the curvature at p0 is positively related with the distance of its neighbors to the tangent. In the following, we will further explain the relationship under more general conditions.

Fig. 2
figure 2

An intuitive illustration of the main idea of the proposed RTPDA detector

3.2 Related to curvature

In differential geometry of curves, the osculating circle S of a sufficiently smooth plane curve C at a given point p is the one among all tangent circles at the point p that approaches the curve most tightly. The curvature of C at p is defined as the curvature of that circle and the curvature is just the same as the reciprocal of the radius of the circle. In the following, to simplify the analysis, we substitute an arc of the osculating circle at the target point for a small fragment of C centered at the point, which can help us study the relationship between the real curvature and the estimated curvature.

Let us consider the following circle SRx2 + (y − R)2 = R2 shown in Fig. 3a. It is easy to find that SR passes through the origin and the radius of SR is R. The tangent line of SR at the origin is the x axis. Assume the point p0 = (x0, y0) is on SR, there is x02 + (y0 − R)2 = R2. If p0 is near enough to the origin, we have \( {y}_0=R-\sqrt{R^2-{x_0}^2} \). The distance of p0 to the x axis equals to y0. With some derivations, we have \( {y}_0=\frac{{x_0}^2}{R+\sqrt{R^2-{x_0}^2}}=\frac{\frac{1}{R}}{1+\sqrt{1-{\left(\frac{1}{R}\right)}^2{x_0}^2}}{x_0}^2 \). Keep x0 fixed, y0 increases monotonically with \( \frac{1}{R} \), which means that the larger the curvature at the origin is, the longer distance from the point near the origin to the tangent line (x axis) at the origin. The relationship between the length and \( \frac{1}{R} \) is shown in Fig. 3b.

Fig. 3.
figure 3

a The showing of the circle 푆;(b) the changing of 푦0 with variable \( \frac{1}{R} \); (c) the changing of 푑 with variable \( \frac{1}{R} \)

Given a target point on a plane curve, we get that the distance of its neighbor to the tangent line of the curve at the point increases with the curvature at the point. So we can use the distance as discrete curvature estimation at the target point. However, the distance is proportional to uniform scaling, which means it is not robust to that transformation. Such behavior indicates that it needs choosing different thresholds for different scaled images based on one same original image. To make the distance more robust under the uniform scaling, we alternatively use the ratio of the distance to the length of the chord from the target point to its neighbor. The derived relative distance can be represented by

$$ {d}_r=\frac{y_0}{\sqrt{{x_0}^2+{y_0}^2}}=\sqrt{\frac{1}{2}}\frac{\frac{1}{R}{x}_0}{\sqrt{1+\sqrt{1-{\left(\frac{1}{R}\right)}^2{x_0}^2}}}, $$
(5)

which also increases monotonically with \( \frac{1}{R} \). The relationship of the relative distance and the \( \frac{1}{R} \) is shown in Fig. 3c. In the next step we construct our curvature estimator at the origin according to the following scheme: 1) assign the region of support (RoS) of the origin (target point); 2) for every point on the RoS, we calculate a relative distance described as above; 3) the accumulation of all the relative distances is considered as the discrete curvature estimation at the origin. The reason why we use the distance accumulation is that more neighbors of the target point can participate in the calculation of the curvature at the target point in this way, and a relative bigger neighborhood is robust to noise in general.

3.3 Relative tangent-to-point distance accumulation

In the following, we present a novel “discrete curvature” estimation technique based on the above described basic idea. Let m sequential digital points describe a contour C, C = {pj = (xj, yj), j = 1, 2, ⋯, m}, where pj + 1 is adjacent to pj. Denote Nk(pi) as a small boundary segment of C, which is defined by the RoS between points pi − k and pi + k for some integer k, i.e. Nk(pi) = {pj| j = i − k, ⋯, i + k}. Our aim is to calculate the “discrete curvature” at the point pi. The first step is calculating the tangent line at pi. To achieve this aim, we parameterize the 2k + 1 points and can get two parameterized point sets \( {\left\{\left(j,\kern0.5em {x}_{i+j}\right)\right\}}_{j=-k}^{\kern0.75em k} \)and \( {\left\{\left(j,\kern0.5em {y}_{i+j}\right)\right\}}_{j=-k}^{\kern0.75em k} \). According to the least squares criterion, we respectively fit the polynomial series:\( \mathrm{x}\left(\mathrm{t}\right)={\sum}_{n=0}^2{\alpha}_n{t}^n \)and \( \mathrm{y}\left(\mathrm{t}\right)={\sum}_{n=0}^2{\beta}_n{t}^n \), to the point sets {(j,  xi + j)} and {(j,  yi + j)}, where j =  − k, ⋯, − 1, 1, ⋯, k, x(0) = xi and y(0) = yi.The coefficients α = (α0,  α1,  α2) and β = (β0,  β1,  β2, ) are estimated as follows:

$$ \underset{\boldsymbol{\upalpha}}{\boldsymbol{\upalpha} =\mathrm{argmin}}\sum \limits_{j=-k,j\ne 0}^{\kern0.50em \ k}{\left(\mathrm{x}(j)-{x}_{i+j}\right)}^2,\mathrm{s}.\mathrm{t}\ \mathrm{x}(0)={x}_i $$
(6)
$$ \underset{\boldsymbol{\upbeta}}{\boldsymbol{\upbeta} =\mathrm{argmin}}\sum \limits_{j=-k,j\ne 0}^{\kern0.50em \ k}{\left(\mathrm{y}(j)-{y}_{i+j}\right)}^2,s.t\ \mathrm{y}(0)={y}_i $$
(7)

By solving the above two optimization problems with constraints, we have

$$ {\upalpha}_1=\frac{\sum_{j=-k,j\ne 0}^k{x}_{i+j}-{x}_ij}{\sum_{j=-k,j\ne 0}^k{j}^2}=\frac{3}{k\left(k+1\right)\left(2k+1\right)}\sum \limits_{j=-k,j\ne 0}^k{x}_{i+j}-{x}_ij $$
(8)
$$ {\upbeta}_1=\frac{\sum_{j=-k,j\ne 0}^k{y}_{i+j}-{y}_ij}{\sum_{j=-k,j\ne 0}^k{j}^2}=\frac{3}{k\left(k+1\right)\left(2k+1\right)}\sum \limits_{j=-k,j\ne 0}^k{y}_{i+j}-{y}_ij $$
(9)

The tangent line of C at pi is determined by the target point pi and the direction (α1, β1). For any point p = (x, y) on C, its distance to the tangent line at pi is represented by

$$ \mid \frac{\upbeta_1\left(x-{x}_i\right)-{\upalpha}_1\left(y-{y}_i\right)}{\sqrt{\upalpha_1^2+{\upbeta}_1^2}}\mid $$
(10)

Divided by \( \left|\overrightarrow{\boldsymbol{p}{\boldsymbol{p}}_{\boldsymbol{i}}}\right|=\sqrt{{\left(x-{x}_i\right)}^2+{\left(y-{y}_i\right)}^2} \), we can derive its relative distance as follow

$$ \frac{1}{\sqrt{\alpha_1^2+{\beta}_1^2}}\mid \frac{\upbeta_1\left(x-{x}_i\right)-{\upalpha}_1\left(x-{y}_i\right)}{\sqrt{{\left(x-{x}_i\right)}^2+{\left(x-{y}_i\right)}^2}}\mid $$
(11)

then the accumulation of the relative distances among the RoS between points pi − k and pi + k is represented by

$$ \frac{1}{\sqrt{\upalpha_1^2+{\upbeta}_1^2}}\sum \limits_{\begin{array}{c}j=-k\\ {}j\ne 0\end{array}}^k\mid \frac{\upbeta_1\left({x}_{i+j}-{x}_i\right)-{\upalpha}_1\left({y}_{i+j}-{y}_i\right)}{\sqrt{{\left({x}_{i+j}-{x}_i\right)}^2+{\left({y}_{i+j}-{y}_i\right)}^2}}\mid $$
(12)

which is used as the “discrete curvature” of C at pi in this paper. We named our proposed detector as Relative Tangent to Point Distance Accumulation (RTPDA) detector. The whole procedure is shown in the following algorithm.

figure g

4 Image datasets and evaluation metrics

4.1 Image datasets

In this section, two image datasets are adopted to evaluate the performance of the compared corner detectors. The images from Dataset 1 shown in Fig.4 can be found in [33] while the images from Dataset 2 shown in Fig.5 are provided by Dr. M. Awrangjeb [3]. Many images from Dataset 1 are simple binary images which contains little gray information while the images of Dataset 2 are all gray-scale images. The transformed images of the two datasets are considered as test images, which were obtained by applying the five different types of experiments on each original image described as follows:

  1. 1)

    Rotation: The original image was rotated with rotation angles chosen by uniform steps of interval [−90o,   + 90o] at a 10o resolution.

  2. 2)

    Uniform scaling: The original image was zoomed with scale factors chosen by uniform scaling of the interval[0.5, 2] at a resolution of 0.1.

  3. 3)

    Non-uniform scaling: scaling factors sx in [0.7, 1.5] and sy in [0.5, 1.8], at 0.1 apart.

  4. 4)

    Combined transformations (rot.-scale): θ in [−30o, +30o] at 10o apart, followed by uniform or non-uniform scaling factors sx and sy in [0.8 1.2] at 0.1 apart.

  5. 5)

    Gaussian noise: Gaussian white noise with zero-mean and variances was introduced to the original image chosen by uniform sampling of the intervals [0.005, 0.05]. Distance between consecutive samples was 0.005.

Fig. 4
figure 4

The sample images from the Dataset 1

Fig. 5
figure 5

The sample images from the Dataset 2

4.2 Evaluation criteria

We use two criteria to evaluate performance. The one criterion is average repeatability (AR) [4] and localization error (LE); the other one is accuracy (ACU) [22] and localization error (LE).

4.2.1 Average repeatability and localization error

  1. (a)

    Average Repeatability

Let No and NT be the number of corners detected from an original image and its transformed image respectively. Nr is the number of repeated corners in the original image and transformed image. Then AR can be represented as

$$ {R}_a=\frac{N_r}{2}\left(\frac{1}{N_o}+\frac{1}{N_T}\right) $$
(13)
  1. (b)

    Localization Error

The localization error in this criterion is measured as the Root-Mean-Square-Error (RMSE) of the detected corners

$$ {L}_e=\sqrt{\frac{1}{N_r}\sum \limits_{i=1}^{N_r}\left[{\left({x}_{ti}-{x}_{oi}\right)}^2+{\left({y}_{ti}-{y}_{oi}\right)}^2\right]} $$
(14)

Where (xoi, yoi) and (xti, yti) are the original position and the test position of the ith repeated corner respectively. An RMSE value of maximal 3 pixels was allowed to find a corner correspondence or repetition.

As two commonly used metrics, Repeatability mainly measures the stability of a corner detector while LE measures the accuracy of a corner detector.

4.2.2 Accuracy and localization error

  1. (a)

    Accuracy

Let No, Ng, and Na be the number of detected corners, “ground truth” corners and correctly matched corners respectively, accuracy (ACU) can be represented as

$$ ACU=\left(\frac{N_a}{N_o}+\frac{N_a}{N_g}\right)/2\times 100\% $$
(15)
  1. (b)

    Localization Error

Let Nr be the number of correctly matched corners between the test image and reference image, LE is defined as the Root-Mean-Square-Error (RMSE)

$$ LE=\sqrt{\frac{1}{N_r}\sum \limits_{i=1}^{N_r}\left[{\left({x}_{gi}-{x}_{ti}\right)}^2+{\left({y}_{gi}-{y}_{ti}\right)}^2\right]} $$
(16)

where (xgi,  ygi) is the position of the ith matched corner in the reference image and (xti,  yti) is that in the test image.

Since accuracy index (ACU) involves human visual inspection procedure, it is hard to implement for proper robustness tests in practice [6].

5 Experiment results and discussion

In this section, some experiments are conducted to evaluate RTPDA detector compared with the-state-of-art corner detectors in two aforementioned criteria. These approaches are included: i) LoG [36], ii) CTAR [29], iii) GCM [33], iv) CPDA [4], v) F-CPDA [5], vi) MSCP [32], vii) Eigenvector [31], viii) RJ73 [26], ix) SODC [16].

5.1 Performance evaluation based on repeatability criterion

5.1.1 Parameter selection

The behaviors of RTPDA detector changing along with the parameters setting are analyzed in this section and we mainly consider three parameters: (1) Gaussian smoothing scale (σ), (2) RoS (n), and (3) curvature threshold (T). We conduct several experiments to empirically select the optimal parameter.

Figure 6 shows the effect of different parameters (Gaussian smoothing scale σ, the size of RoS n and curvature threshold T) to the performances of the RTPDA. In this experiment, we tune one parameter at one time and keep the others fixed. It should be noted that the parameters of the other compared detectors have also been well tuned. We present the selected parameters of all the compared methods in Table 2 and the performances are reported in Figs. 7 and 8, and Table 3 in detail. Canny edge detector [8] is chosen as the contour tracking method and its parameters are set following the ones in [4, 6]. For a fair comparison, the same Canny edge extraction and contour-tracking methods are applied for all comparative detectors.

Fig. 6
figure 6

Effects of different parameter changes (Gaussian smoothing scale, RoS and curvature threshold) on the RTPDA corner detector

Table 2 Parameters of the compared detectors
Fig. 7
figure 7

Comparative results under geometric transformations using Dataset 1. (a) Average Repeatability and (b) Localization Error

Fig. 8
figure 8

Comparative results under geometric transformations using Dataset 2. (a) Average Repeatability and (b) Localization Error.

Table 3 The performances of the compared detectors

5.1.2 Performance evaluation

Figure 7 and 8 show the results under different geometric transformations and Gaussian noise on Dataset 1 and Dataset 2, respectively. Overall, the proposed RTPDA detector shows the highest average repeatability in all datasets, with a similar localization error as the one of the CTAR detector. RTPDA detector used both a relative big neighborhood and large scale factor, which can improve its robustness to the geometric transformations and Gaussian noise. LoG detector had better localization (lower error) compared with other nine well-known detectors on Dataset 1 while CPDA detector [6] had better localization on Dataset 2. GCM detector performed not well as the recent proposed LoG and CTAR detectors, it was pointed out in [13] that it used a very small neighborhood (1 × 1) and its significance measure is highly sensitive to geometric transformation. Since Eigenvector detector [31] calculated the discrete curvature by utilizing the wavelet transform of contour orientation, it was sensitive to noise too. Without adopting any derivative of curve-point locations RTPDA has not suffered from this drawback. SODC [16] is a recently proposed corner detector by employing simple triangular theory and distance calculation. Since it utilized absolute distance instead of relative distance, it was not as robust as RTPDA in some geometrical transformations such as uniform scaling or non-uniform scaling. In all, RTPDA provided promising performances in term of AR and LE for two datasets demonstrating its effectiveness in corner finding. However, we noticed that RTPDA performed not so well in LE metric. Its localization error is somewhat high. We attribute this to the fact that RTPDA adopts a large Gaussian smoothing scale to remove noise. In this situation Multi-scale technique may be a suitable choice for RTPDA considering its good performance on suppressing noise and improving localization [16, 32].

5.1.3 Time efficiency

We tabulate the computational time of each evaluated detector on Dataset 1 and Dataset 2 in Table 4. All the experiments are conducted in a Win10 machine with 3.4 GHz Intel(R) Core(TM) Quad CPU and 8GB of RAM (Matlab-2012b). It should be noted that the time for curve extraction is not included in the total computational costs since it is identical for every compared detector. CTAR runs fastest by estimating discrete curvature with only three points based on triangle theory while Eigenvector runs slowest due to the time-consuming wavelet transform. RTPDA is faster than fast-CPDA detector, which also reveals its high efficiency.

Table 4 Total times to detect corners on Dataset 1 and Dataset 2 with different corner detectors (average results over ten random experiments)

Figure 9 shows some visualization results, with the corners of “Lena” image detected by the nine testing algorithms. The “ground truth” corners of “Lena” image can be referred to [6]. We can see that the proposed RTPDA detector finds all true corners without introducing any false corner. CPDA and fast-CPDA miss some true corners while GCM, SODC, Eigenvector, MSCP and RJ73 introduce some false corners.

Fig. 9
figure 9

Corners of “Lena” detected by ten contour-based corner detectors

5.2 Performance evaluation based on accuracy criterion

In this section, we present the evaluation performances based on accuracy criterion under Dataset 1. It should be pointed out that the thresholds of Canny edge detector are chosen as low = 0 and high = 0.35 following the setting in [33] and the “ground truth” corners are also from [33]. For a fair comparison, all compared detectors share the same Canny edge extraction and contour-tracking methods. Here we just select four typical contour-based detectors as reference ones: [4, 16, 29, 33]. The optimal parameters are summarized in Table 5 and the performances of the five compared detectors are shown in Table 6 and Fig. 10.

Table 5 Parameters of the compared detectors
Table 6 The performances of the compared detectors
Fig. 10
figure 10

Comparative results under geometric transformations using Dataset 1. (a) Accuracy and (b) Localization Error

5.3 Some applications of the approach

Corner detection has many important applications on computer vision. Specially, since information about a shape is concentrated at the corners, they prove to be practical descriptive primitives in shape representation, objection recognition and motion analysis [30]. Figure 11 shows a practical application of our approach on the construction of shape descriptor. We first detect the corners of a shape and then extract all of the possible fragments defined by two corners with that the distance between the two points is more than 10 points. After that, each contour fragment is described (here we can choose an effective method, e.g. shape context [7]). Finally, we use K-means clustering algorithm to acquire the codebook of the contour fragments (all the shapes) and then derive the shape representation with a multi-dimensional vector, which can be conveniently applied to shape classification and shape recognition etc. In addition, we notice that Liu et al. [18,19,20] proposes to recognize activities from sensor data where discriminant features are utilized. The attempt to replace the discriminant features with the features constructed with corners would be a very interesting work for us.

Fig. 11
figure 11

An example of building shape representation using corners (a) contour of a shape; (b) corners detected using RTPDA method; (c) some contour fragments of the shape divided by corners; (d) contour fragment descriptions; (e)we use K-means clustering algorithm to acquire the codebook of the contour fragments and then can derive the shape representation

6 Conclusion and future work

In this paper, we presented a novel discrete curvature estimator based on Relative Tangent-to-Point Distance Accumulation (RTPDA) technique to provide a robust corner detection scheme. In RTPDA, we first fit the digital curve segments with quadratic polynomials by employing least square technique to derive the tangent of the target point and then compute the distance accumulation of its neighbors to the tangent. Based on the “discrete curvature”, we developed a novel corner detection algorithm. Higher average repeatability and accuracy with relative low localization error compared with the-state-of-art contour-based corner detection algorithms demonstrate that it is a robust contour-based corner detector.

However, as a typical contour-based detector, RTPDA highly relies on the performances of edge-detection technique, which is a common problem suffered by boundary-based corner detection algorithms; besides, the discrete curvature of RTPDA detector is calculated under single-scale, while fusing multi-scale information may help RTPDA more robust. In the future, we would try to improve the performance of RTPDA algorithm based on the above two considerations and propose a more robust corner detection scheme.