applied sciences

Article Robust and Efficient Corner Detector Using Non-Corners Exclusion

Tao Luo 1, Zaifeng Shi 2,* and Pumeng Wang 2 1 College of Intelligence and Computing, Tianjin University, Tianjin 300072, China; [email protected] 2 School of Microelectronics, Tianjin University, Tianjin 300072, China; [email protected] * Correspondence: [email protected]

 Received: 12 November 2019; Accepted: 6 January 2020; Published: 7 January 2020 

Abstract: Corner detection is a traditional type of feature point detection method. Among methods used, with its good accuracy and the properties of invariance for rotation, noise and illumination, the Harris corner detector is widely used in the fields of vision tasks and image processing. Although it possesses a good performance in detection quality, its application is limited due to its low detection efficiency. The efficiency is crucial in many applications because it determines whether the detector is suitable for real-time tasks. In this paper, a robust and efficient corner detector (RECD) improved from Harris corner detector is proposed. First, we borrowed the principle of the feature from accelerated segment test (FAST) algorithm for corner pre-detection, in order to rule out non-corners and retain many strong corners as real corners. Those uncertain corners are looked at as candidate corners. Second, the gradients are calculated in the same way as the original Harris detector for those candidate corners. Third, to reduce additional computation amount, only the corner response function (CRF) of the candidate corners is calculated. Finally, we replace the highly complex non-maximum suppression (NMS) by an improved NMS to obtain the resulting corners. Experiments demonstrate that RECD is more competitive than some popular corner detectors in detection quality and speed. The accuracy and robustness of our method is slightly better than the original Harris detector, and the detection time is only approximately 8.2% of its original value.

Keywords: corner detection; Harris corner detector; non-corners exclusion; features from accelerated segment test

1. Introduction Feature point detection is used as the fundamental step of image analysis and . As an important element, corner detection is still widely used today in applications including object detection, motion tracking, simultaneous localization and mapping, object recognition and stereo matching [1–3]. A corner detector can be successfully used for these tasks if it has good consistency and accuracy [4]. For this reason, a large amount of pioneering work has been performed on corner detection in recent years. These techniques can be broadly classified into two categories: intensity-based corner detectors [5–10] and contour-based corner detectors [11–14]. Both types of corner detectors have their respective merits and demerits. The contour-based corner detectors are mainly based on the (CSS). An edge detector is used in these detectors, for example the [15], to obtain planar curves parameterized by arc-length. They are smoothed by a set of multi-scale Gaussian functions. Then the curvature is calculated on each point of the curves smoothed by the Gaussian functions. Finally, the candidate corners will be comprised of the absolute maximum curvature points from which weak and false corners will be excluded by thresholds. In order to improve localization, some CSS-based corner detectors additionally use a corner tracking step [13]. These detectors perform well in corner detection,

Appl. Sci. 2020, 10, 443; doi:10.3390/app10020443 www.mdpi.com/journal/applsci Appl. Sci. 2020, 10, 443 2 of 14 but they suffer from two main problems. First, the curvature estimation technique is sensitive to the local variation and noise on contours because it uses second order derivatives of curve-point locations. Second, the large-scale Gaussian functions fail to detect true corners while small-scale ones detect a number of false corners. In other words, scale selection is a difficult task. In order to overcome the aforementioned problems, the multi-scale detector based on the chord-to-point distance accumulation (CPDA) technique is developed [14]. However, the complexity of the CPDA corner detector is high and it is difficult to improve from the algorithm architecture, so it cannot be applied to many computer vision systems. Other novel techniques are also proposed to improve performance, including angle difference of principal directions [16], Laplacian scale-space [17] and so on. However, all the methods in this category do not detect every corner region in an image. In particular, they fail to detect corner regions formed by a texture [18]. The intensity-based detectors indicate the presence of a corner by using the first-order or second-order derivatives of images and calculating the corner response function (CRF) of each pixel. Moravec computes the local sum of squared differences (SSD) between an image patch and its shifted version in four different directions [5]. The point with the largest SSD in a certain range is determined as a corner. But this technique is dramatically sensitive to noise and strong edges. Smith and Brady developed the smallest univalue segment assimilation nucleus (SUSAN) method for corner and [7]. This method is mainly based on a circular mask applied to the interest region. The pixels which have similar brightness to the nucleus construct the univalue segment assimilating nucleus (USAN) area. However, the accuracy of this algorithm is heavily dependent on the threshold. If the threshold is too big or too small, corner detection errors will result. Rosten and Drummond proposed the feature from accelerated segment test (FAST) algorithm based on the SUSAN corner detector [9,10]. As with SUSAN, FAST also uses a Bresenham circle of radius 3 pixels as test mask. The difference is that FAST just uses the 16 pixels in the circle to decide whether a point is actually a corner. The FAST algorithm requires very short computation time, but it is very sensitive to noise and needs to be combined with other algorithms to improve its robustness. By developing Moravec’s idea, Chris Harris and Mike Stephens proposed the famous Harris corner detection algorithm, which is one of the most important corner detectors based on intensity [6]. It computes the SSD in any direction. Simultaneously, it enhances the stability and robustness of the algorithm by introducing Gaussian smoothing factor. However, the computational efficiency of the technique is observably low. E. Mair et al. developed the FAST algorithm by constructing the optimal decision tree [19]. Leutenegger et al. further proposed the binary robust invariant scalable keypoints (BRISK) algorithm by constructing a scale-space with the FAST score [20]. Alcantarilla et al. proposed a fast multi-scale detector in non-linear scale spaces [21]. Xiong et al. introduced directionality to FAST in order to avoid repeatedly searching [22]. These FAST-based algorithms aim to speed up detection efficiency and retain good performance. In this paper, a robust and efficient corner detector improved from the Harris corner detector, named the robust and efficient corner detector (RECD), is proposed. It is worth noting that the number of corners of an image is generally far fewer than 1% of the whole pixels. Thus, a key idea behind our method is to exclude a very large number of non-corners before detection. Because the non-maximum suppression (NMS) of the original Harris corner detector is complex, using an improved efficient NMS to reduce the complexity is another key idea. The original algorithm detects corners by three major steps. First, the image gradients are computed by the convolution of Gaussian first order partial derivatives in x and y directions with the image. Second, the CRF of each pixel is computed. Last, the maximum points are retained by NMS. In order to reduce the complexity, we analyze the three steps carefully and conduct many experiments. The experiment results show that the RECD possesses good robustness and efficiency. The RECD can be used for many visual processing domains because of its high speed and good performance. The remainder of this paper is organized as follows. In Section2, we discuss briefly the Harris corner detector and two criteria for performance evaluation of corner detectors. Section3 introduces our detector, with a description of the algorithm and its implementation details. Section4 illustrates Appl. Sci. 2020, 10, 443 3 of 14 the results of comparative experiments and gives an analysis of the results. Finally, we conclude our paper in Section5.

2. Related Work

2.1. Harris Corner Detection Algorithm The Harris corner detector is based on computing the corner response function of each pixel in an image [6]. If it is the local maximum and greater than a threshold value, the pixel is considered to be a corner. The corner response function is calculated by the autocorrelation matrix as follows:

2 X Ix(p) Ixy(p) AC M(p) = [ 2 ] ω(p) = [ ] (1) { Ixy(p) Iy(p) ⊗ } CB (x,y) W ∈ where Ix(p) and Iy(p) are the respective horizontal and vertical image gradients at position p, obtained by the convolution of Gaussian first order partial derivatives in x and y directions with the image, respectively. The ω(p) is a Gaussian filtering function. Harris and Stephens [6] suggested that direct eigenvalue decomposition can be avoided by calculating the response function as follows:

R = det(M) k (trace(M))2 (2) − × where det(M) and trace(M) are, respectively, the and the trace of the autocorrelation matrix in the Equation (1). The coefficient k is an empirical value, usually lying in the interval [0.04, 0.06]. The image pixel is selected as a corner if R is the local maximum and greater than a given threshold value.

2.2. Performance Measurements In order to evaluate the invariance of the proposed approach under the various transforms such as addition of noise and affine transformation, we introduce consistency of corner numbers (CCN) criterion for measuring the stability of corner detectors. Mohanna and Mokhtarian presented the concept of the CCN criterion [4], which is defined as (3).

Nt No CCN = 100 1.1−| − | (3) ×

No is the number of corners in the original image and Nt is the number of corners in the transformed image. Since stable corner detectors do not change the corner numbers from original image to transformed images, in terms of consistency, the value of CCN for stable corner detectors should be close to 100% [23]. CCN is close to zero for corner detectors with many false corners. This criterion does not determine the quality of the detected corners in any way, and the correctness of corner detections is obtained by the accuracy (ACU) measure [4]. The ACU is defined as follows:

Na + Na No Ng ACU = 100 (4) × 2 where No is the number of the detected corners in the original image, Na is the total number of matched corners when comparing the first set of corners (found using a corner detector) to the second set (ground truth) using a neighborhood test, and Ng is the number of corners in the ground truth. When the majority of the detected corners are ground truths, the value of ACU will be close to 100%. Otherwise the value of ACU will be close to zero. Note that the ground truth corners are created by human judgment. Appl. Sci. 2020, 10, 443x FOR PEER REVIEW 4 of 14

3. Proposed Methods Generally, a cornercorner can be defineddefined as the pixel of large gray change in two different different directions. The RECD is mainlymainly based on thethe HarrisHarris cornercorner detector.detector. To speedspeed upup thisthis algorithmalgorithm andand enhanceenhance the robustness, the principle of the FAST algorithmalgorithm is used in corner pre-detection to rule out many non-corners andand retain retain those those strong strong corners corners as real as cornersreal corners as described as described in Section in 3.1Section. Those 3.1. uncertain Those cornersuncertain are corners looked are at as looked candidate at as corners candidate to process corner furthers to process with Harris.further Then,with Harris. gradient Then, calculation gradient is analyzedcalculation as is described analyzed in as Section described 3.2. On in theSection basis of3.2. the On first the two basis steps, of wethe just first conduct two steps, the Gaussian we just filtering at the neighborhood of the candidate corners, the size of the window is 5 5. We then only conduct the Gaussian filtering at the neighborhood of the candidate corners, the size× of the window calculateis 5 × 5. We the then CRF ofonly the calculate candidate the corners. CRF of This the ca stepndidate is described corners. in This Section step 3.3 is. Finally,described the in resulting Section corners3.3. Finally, are obtainedthe resulting by the corners improved are NMSobtained as described by the improved in Section NMS 3.4. Theas described test image in sets Section we used 3.4. areThe fromtest standardimage sets databases we used [24 are,25 ]from et al. Instandard order to databases make the [24,25] experimental et al. resultsIn order persuasive to make andthe convenientexperimental to results compare persuasive with other and methods, convenient we selectedto compare these with five other images methods, as test we sets selected in the paper, these whichfive images are shown as test in sets Figure in the1. paper, which are shown in Figure 1.

(a) block (b) flower (c) house

(d) airplane (e) lab

Figure 1. The images used for the performance test are block (256 256), flower (1024 576), house Figure 1. The images used for the performance test are block (256 ×× 256), flower (1024 ×× 576), house (256 256), airplane (331 361) and lab (512 512). (256 × 256), airplane (331 × 361) and lab (512 ×× 512). 3.1. Non-Corners Exclusion 3.1. Non-Corners Exclusion The FAST theory has good robustness for transformations, especially for rotation, owing to the use ofThe a circularFAST theory template. has good A corner robustness is generally for transfor at themations, vertex ofespecially a sharp anglefor rotation, on the owing image to edge. the Transformationsuse of a circular changetemplate. the A structurecorner is ofgenerally an angle at to the some vertex extent. of a Butsharp the angle continuity on the ofimage an edge edge. is relativelyTransformations robust. change The FAST the can structure detect outof an those angle structural to some corners extent. and But retain the continuity those uncertain of an cornersedge is fromrelatively a transformed robust. The image. FAST can By contrastdetect out with those the st FAST,ructural the corners Harris and corner retain detector those directlyuncertain conducts corners gradientfrom a transformed computation image. with aBy small contrast window with of the 3 FA3 onST, the the whole Harris image. corner So detector the uncertain directly corners conducts can × begradient detected computation further with with the Harrisa small detector. window If of an 3 uncertain× 3 on the corner whole is image. also validated So the byuncertain the Harris, corners it is acan real be corner. detected further with the Harris detector. If an uncertain corner is also validated by the Harris,The it keyis a stepreal corner. of the FAST detector is that a circle of 16 pixels (a Bresenham circle of radius 3) is examinedThe key surrounding step of the theFAST point detector P as shown is that ina circle the Figure of 162 pixels. The point(a Bresenham P is classified circle asof radius a corner 3) ifis theexamined intensities surrounding of at least theN pointcontiguous P as shown pixels in in the the Figure circle 2. are The all point brighter P is (darker)classified than as a thecorner intensity if the ofintensities the point of plus at least (minus) N contiguous a threshold pixelst. N isin actually the circle a scaleare all to brighter judge the (darker) corners. than Too the large intensity an N can of leadthe point to several plus (minus) missed cornersa threshold and thet. N smallis actuallyN will a bringscale to about judge too the many corners. weak Too corners. large an To N ensure can lead the accuracyto several and missed stability corners of the and algorithm, the smallN Nis will generally bring setabout to 12. too many weak corners. To ensure the accuracy and stability of the algorithm, N is generally set to 12. Appl. Sci. 2020, 10, x 443 FOR PEER REVIEW 5 of 14

7

Figure 2. FeatureFeature from from accelerated segment segment test test (FAST) corner detection in a Bresenham circle of radius 3.

In this paper, fastfast cornercorner detectiondetection theorytheory isis appliedapplied toto thethe firstfirst step:step: corner pre-detection. Three of thethe fourfour pixelspixels 1, 1, 5, 5, 9 and9 and 13 13 certainly certainly exist exist in thesein these 12 contiguous 12 contiguous pixels. pixels. We first We examine first examine the pixels the 1pixels and 9.1 and If both 9. If of both the intensitiesof the intensit of theies twoof the pixels two arepixels ina are range in a ofranget of theof tintensity of the intensity of the point of the P, point then PP, isthen excluded P is excluded to be a cornerto be a and corner the computationand the comp forutation current for pixelcurrent is terminated. pixel is terminated. If not, we If examine not, we theexamine pixels the 5 and pixels 13. If5 atand least 13. three If at ofleast the fourthree pixels of the are four all brighterpixels are (darker) all brighter than the(darker) intensity than of the pointintensity plus of (minus) the point a threshold plus (minus)t, the a pointthreshold P is a t, corner. the point This P isis becausea corner. 12 This contiguous is because pixels 12 contiguous are bound topixels include are bound three ofto theinclude pixels three which of the will pixels be examined. which will Note be examined. that if only Note two that nearest if only neighborhood two nearest pixelsneighborhood in the four pixels pixels, in forthe examplefour pixels, pixels for 1 exampl and 5, aree pixels both extremely1 and 5, are brighter both extremely or darker thanbrighter P, then or Pdarker still can than be P, a then corner. P still We can called be a these corner. uncertain We called corners these candidate uncertain corners.corners candidate For an image corners. of n Forn 2 × pixels,an image the of time n × n complexity pixels, the oftime this complexity step is O(n of). this Using step this is O( methodn2). Using can this reject method most non-corners,can reject most so thatnon-corners, the computational so that the complexity computational is reduced complexity to a great is reduced extent for to the a great next stepextent gradient for the calculation. next step Thegradient FAST calculation. principle can The only FAST detect principle those obviouscan only corners detect whenthose thereobvious are 12corners contiguous when pixelsthere are inthe 12 circlecontiguous of radius pixels 3. Forin the the circle situation of radius of contiguous 3. For the pixelssituation less of than contiguous 12, it does pixels not less perform than well.12, it does This methodnot perform can alsowell. detect This method some corners can also adjacent detect some to one corners another. adjacent The pixels to one can another. be divided The pixels into three can typesbe divided by the FAST:into three non-corners, types by uncertain the FAST: corners non-corners, and strong uncertain corners. Therefore, corners and we usestrong this principlecorners. toTherefore, exclude thosewe use non-corners this principle and to mark exclude those those strong non-corners corners as and real mark corners. those The strong uncertain corners pixels as real are allcorners. considered The uncertain candidate pixels corners are toall beconsidered detected furthercandidate with corners Harris. toIn be this detected case, almostfurther all with of theHarris. real cornersIn this case, are retained almost inall the of setthe ofreal candidate corners cornersare retained and strong in the corners. set of candidate corners and strong corners. 3.2. Gradient Calculation 3.2. GradientLet the candidateCalculation corners be the center of a 3 3 neighborhood. After step A, we calculate the × gradientsLet the in candidate x and y direction corners ofbe candidate the center corners of a 3 × after 3 neighborhood. filtering the image After withstep A, the we level calculate difference the operatorgradients andin x theand verticaly direction diff oference candidate operator, corners respectively. after filtering It isthe e ffiimagecient with to reduce the level computation difference complexityoperator and so thatthe vertical only the difference gradients ofoperator, candidate resp cornersectively. are It calculated is efficient without to reduce filtering computation the whole imagecomplexity in the so Harris that only detector. the gradients After step of A, candidat a majoritye corners of background are calculated pixels without of low-frequency filtering the parts whole are 2 ruledimage out,in the because Harris those detector. pixels After are easystep A, to distinguish.a majority of We background assume that pixelsm ( mof<< low-frequencyn ) pixels remain parts asare candidate ruled out, corners.because those The computation pixels are easy complexity to distinguish. of the We step assume B depends that m on (m the << resultsn2) pixels of remain step A. Generally,as candidate the corners. background The computat contains aion majority complexity of pixels of the in anstep image B depends and step on A the can results filter out of moststep A. of 2 themGenerally, and m theis muchbackground less than containsn . It reducesa majority many of pixels unnecessary in an image operations and step in A the can background filter out most for the of later steps. Actually, in the non-maximum suppression step, each pixel needs a 3 3 neighborhood to them and m is much less than n2. It reduces many unnecessary operations in the× background for the searchlater steps. the maximum Actually, ofin thethe CRFnon-maximum values. Thus, suppression the gradients step, should each pixel be calculated needs a for3 × each3 neighborhood pixel in this 3to search3 neighborhood. the maximum Its timeof the complexity CRF values. is Thus, O (9m the). In gradients the Harris should corner be detector calculated algorithm, for each this pixel step in × 2 hasthis a3 time× 3 neighborhood. complexity of OIts (9 timen ). complexity is O (9m). In the Harris corner detector algorithm, this step has a time complexity of O (9n2). 3.3. Corner Response Function

3.3. CornerThe CRF Response step isFunction computationally the most intensive and time-consuming stage of the Harris corner detector. The CRF of a pixel is calculated by determinant and trace of the autocorrelation matrix The CRF step is computationally the most intensive and time-consuming stage of the Harris as in (2). The autocorrelation matrix is evaluated by Gaussian filtering for the squares and products of corner detector. The CRF of a pixel is calculated by determinant and trace of the autocorrelation matrix as in (2). The autocorrelation matrix is evaluated by Gaussian filtering for the squares and Appl. Sci. 2020, 10, x FOR PEER REVIEW 6 of 14 productsAppl. Sci. 2020of gradients, 10, 443 as in (1). The CRF is calculated at each 3 × 3 neighborhood of candidate pixels.6 of 14 By employing the method in Section 3.1, we can reject a large number of non-corners. Then we only calculategradients the as CRF in (1). based The CRF on isthe calculated results of at step each B. 3 Hence,3 neighborhood this step ofcan candidate be accelerated pixels. Bydrastically. employing × Becausethe method many in false Section corners 3.1, weare can rejected reject in a largeSectio numbern 3.1, the of non-corners.computational Then efficiency we only is calculateimproved the muchCRF basedby calculating on the results the ofCRF step at B.the Hence, candidate this step corn caners. be acceleratedAlso, the time drastically. complexity Because of manythis step false dependscorners on are the rejected m and in it Sectionis O (9m 3.1). , the computational efficiency is improved much by calculating the CRF at the candidate corners. Also, the time complexity of this step depends on the m and it is O (9m). 3.4. Non-Maximum Suppression 3.4.NMS Non-Maximum can be positively Suppression formulated as local maximum search [26]. In the original Harris corner detector,NMS if the can CRF be positively of a pixel formulated is the local asmaximum local maximum of its neighborhood search [26]. In and the greater original than Harris a given corner thresholddetector, value, if the the CRF pixel of a is pixel considered is the local to be maximum a corner. The of itsneighborhood neighborhood is usually and greater (2k + 1) than × (2 ak given+ 1) regionthreshold centered value, around the pixel the is consideredpixel under to beconsideration. a corner. The The neighborhood NMS is performed is usually (2atk +each1) pixel.(2k + 1) × However,region centered there is around one main the pixel problem under with consideration. this approach. The NMS Once is a performed local maximum at each pixel.is found, However, this wouldthere isimply one mainthat we problem can skip with all this other approach. pixels Oncein the a localneighborhood maximum of is the found, maximum this would pixel imply point, that becausewe can they skip must all other be smaller pixels inthan the the neighborhood maximum po ofint. the For maximum solving this pixel problem, point, because Neubeck they and must Gool be proposedsmaller thanthe theefficient maximum non-maximum point. For solvingsuppression this problem, (E-NMS) Neubeck method and [26]. Gool First, proposed the algorithm the efficient partitionsnon-maximum the input suppression image into (E-NMS) blocks of method size (k [26+ 1)]. First,× (k + the1). algorithmThen, it searches partitions within the inputeach block image for into theblocks greatest of size element. (k + 1) Finally,(k + 1). the Then, full neighborhood it searches within of this each greatest block for element the greatest is tested.Other element. Finally,pixels of the × eachfull block neighborhood can be skipped. of this greatest element is tested.Other pixels of each block can be skipped. ThereThere is isone one main main problem problem with with the the E-NMS E-NMS algo algorithm.rithm. The The areas areas of of non-corners non-corners also also execute execute thethe NMS NMS procedure. procedure. This This will will inevitably inevitably increase increase complexity complexity because because of of none none existing existing corners. corners. So, So, thisthis paper paper improves improves the the E-NMS E-NMS algorithm. algorithm. As As an an example example shown shown in inFigure Figure 3,3 ,let let the the neighborhood neighborhood windowwindow be be equal equal to to 3 3× 3.3. By By employing employing the the method method in inSection Section 3.1, 3.1 we, we have have already already calculated calculated the the × candidatecandidate corners. corners. First, First, we we take take a candidate a candidate corner corner as as the the center center pixel pixel to to form form a ablock block of of size size 3 3× 3 as3 as × shownshown in in Figure Figure 33(a).a. Second, Second, we we search search within with thein fourthe candidatefour candidate corners corners for the for maximum the maximum element. element.Here, we Here, assume we assume that the that p is thethe maximump is the maxi element.mum element. The maximum The maximum of time complexity of time complexity is O (9m) andis Othe (9m minimum) and the minimum is O (m). If is the O ( maximumm). If the maximum of black blocks of black is not blocks the centeris not the element center P, element the center P, pixelthe centeris abandoned pixel is abandoned and the next and candidate the next cornercandidate is tested. corner Third, is tested. the fullThird, neighborhood the full neighborhood is tested for is the testedmaximum for the element maximum and element the other and three thecandidate other three corners candidate in the corners block ofin sizethe block 3 3 willof size be 3 skipped × 3 will as × beshown skipped in Figureas shown3b. Herein Figure the time 3b. Here complexity the time also complexity can be taken also as can O (9bem taken). Finally, as O we(9m continue). Finally, to we test continueuntil traversing to test until all candidate traversing corners all candidate which docorners not include which thedo skippednot include candidate the skipped corners. candidate This step corners.can eff ectivelyThis step solve can the effectively main problem solve and the play main a roleproblem in accelerating and play the a proposedrole in accelerating method. For the the proposedHarris, this method. step takes For the O (9Harris,n2) owing this step to its takes operation O (9n for2) owing each pixel.to its operation for each pixel.

5 3

3 P 5

(a) (b)

Figure 3. The improved efficient non-maximum suppression (E-NMS) algorithm. The black blocks are Figurethe candidate 3. The improved corners. Theefficient white non-maximum blocks are the non-corners.suppression The(E-NMS) candidate algorithm. corner pThe is theblack center blocks pixel. are(a )the 3 candidate3 block centered corners. on The candidate white blocks corner. are ( bthe) The non-corners. neighborhood The aroundcandidate that corner block. p is the center × pixel. (a) 3 × 3 block centered on candidate corner. (b) The neighborhood around that block. If the size of an image is very large with n, the total time complexity of Harris is O (9n2 + n2 + 9n2If). the The size RECD of takesan image O (n 2is+ very9m + large9m + with10m) n, or the O ( ntotal2 + 9m time+ 9m complexity+ 18m). Thus of Harris if m < is4n O2/ 7,(9n the2 + RECDn2 + 9nhas2). The a faster RECD speed. takes In O fact, (n2 + the 9m m + is9m far + less10m than) or On 2(nfor2 + a9m realistic + 9m + image 18m). becauseThus if m many < 4n non-corners2/7, the RECD are hasexcluded. a faster speed. The proposed In fact, the RECD m is can far improveless than the n2 for detection a realistic effi ciency.image because many non-corners are excluded. The proposed RECD can improve the detection efficiency. Appl. Sci. 2020, 10, x 443 FOR PEER REVIEW 7 of 14

4. Experimental Results and Analysis 4. Experimental Results and Analysis This section focuses on experiments and performance evaluation. The RECD is compared againstThis a variety section focusesof other ondetectors experiments such as and Moravec performance [5], Harris evaluation. [6], SUSAN The RECD [7] and is comparedFAST-9 [27,28] against in aterms variety of execution of other detectors speed and such the asquality Moravec of the [5 ],corn Harriser detection. [6], SUSAN The [ 7quality] and FAST-9 of the corner [27,28] detectors in terms ofis determined execution speed not only and by the the quality accuracy of the but corner also by detection. the repeatability. The quality We ofmeasured the corner it based detectors on the is determinedACU and CCN not criteria only by as the described accuracy in but Section also by 2. the For repeatability. the purpose Weof evaluation, measured ita basedreference on thesolution ACU andfor each CCN image criteria is as manually described generated. in Section 2Since. For thethere purpose is no standard of evaluation, procedure a reference to decide solution whether for each or imagenot a point is manually should be generated. judged as Since a corner, there only is no entirely standard obvious procedure corners to decide are included whether in orthe not reference a point shouldsolutions be [29]. judged as a corner, only entirely obvious corners are included in the reference solutions [29].

4.1. Analysis of Accuracy Accuracy requiresrequires thatthat corners corners should should be be detected detected as as close close as as possible possible to theirto their correct correct positions positions [4]. The[4]. The formula formula of ACU of ACU has has been been described described in Section in Section2. We 2. We attempted attempted the the five five test test images, images, but but due due to lackto lack of spaceof space only only two two test imagestest images are depictedare depicted in this inpaper. this paper. The ground The grou truthsnd truths of the blockof the imageblock andimage the and lab imagethe lab are image illustrated are illustrated in Figure in4, whereFigure the4, where block imagethe block has 60image strong has corners 60 strong and corners the lab imageand the has lab 242 image strong has corners.242 strong The corners. corners The for corner the twos for test the images two test by theimages five algorithmsby the five algorithms are shown inare Figures shown5 andin Figure6. Each 5 detectorand Figure includes 6. Each adjustable detector parameters includes and adjustable their settings parameters a ffect and detection their resultssettings [ 30affect]. To detection give a fair results evaluation, [30]. severalTo give tests a fair have evaluation, been conducted several with tests each have algorithm been conducted to attain individualwith each algorithm optimal parameter to attain individual settings. optimal parameter settings.

(a) (b) Appl. Sci. 2020, 10, x FOR PEER REVIEW 8 of 14 Figure 4. TestTest images ( a) block and ( b) lab and their ground truths where cornerscorners areare labeled.labeled.

We count the numbers of True Positives, False Negatives and False Positives for the five algorithms of the block and the lab. The results are listed in Tables 1 and 2, where the True Positives refers to positive examples that are classified as positive examples. The False Negatives refers to positive examples that are classified as negative examples. The False Positives refers to negative examples that are classified as positive examples. The ACU means accuracy of the correctness of corner detections. It can be seen from Table 1 that the number of true corners is 60. The RECD and the Harris corner detector give the same results. Both detect the highest number of true positives and have the least number of false negatives and false positives. The FAST-9 corner detector performs slightly worse than the Harris corner detector and the RECD, but it performs substantially better than the Moravec detector and the SUSAN detector. The detection performance of the SUSAN corner detector is the worst. Similar results are shown in Table 2. However, the FAST-9 corner detector is now slightly worse than the Moravec corner detector in detecting true positives and false negatives, while the RECD performs slightly better than the Harris corner detector. It is noted that the RECD always performs best on accuracy. Subjective observation of the two experimentalFigure 5.5. Corner figuresCorner detection showsdetection onthat theon the blockthe RECD block image. detects image. (a) Moravec. th(ae) largestMoravec. (b) Smallest number (b) univalueSmallest of the segment trueunivalue positives assimilation segment while it detectsnucleusassimilation the least (SUSAN). falsenucleus (negativesc) FAST-9.(SUSAN). and (d )( Harris.c false) FAST-9. positives. (e) Robust (d) Harris. and e ffi(ecient) Robust corner and detector efficient (RECD). corner detector (RECD).

Figure 6. Corner detection on the lab image. (a) Moravec. (b) SUSAN. (c) FAST-9. (d) Harris. (e) RECD.

Table 1. Evaluation results of the block image.

Detector True Positives False Negatives False Positives ACU Moravec 39 21 16 0.680 SUSAN 28 32 36 0.452 FAST-9 47 13 9 0.811 Harris 48 12 1 0.890 RECD 48 12 1 0.890

Table 2. Evaluation results of the lab image.

Detector True Positives False Negatives False Positives ACU Moravec 148 94 58 0.665 SUSAN 61 181 134 0.282 FAST-9 142 100 55 0.654 Harris 156 86 49 0.703 RECD 157 85 47 0.709 Appl. Sci. 2020, 10, x FOR PEER REVIEW 8 of 14

Figure 5. Corner detection on the block image. (a) Moravec. (b) Smallest univalue segment

Appl. Sci.assimilation2020, 10, 443 nucleus (SUSAN). (c) FAST-9. (d) Harris. (e) Robust and efficient corner detector8 of 14 (RECD).

Figure 6.6. CornerCorner detection detection on on the the lab lab image. image. (a) Moravec.(a) Moravec. (b) SUSAN. (b) SUSAN. (c) FAST-9. (c) FAST-9. (d) Harris. (d) Harris. (e) RECD. (e) RECD. We count the numbers of True Positives, False Negatives and False Positives for the five algorithms of the block and the lab. TheTable results 1. Evaluation are listed results in Tables of the1 and block2, whereimage. the True Positives refers to positive examples that are classified as positive examples. The False Negatives refers to positive Detector True Positives False Negatives False Positives ACU examples that are classified as negative examples. The False Positives refers to negative examples that are classified asMoravec positive examples.39 The ACU means 21 accuracy of the correctness 16 0.680 of corner detections. It can be seen fromSUSAN Table 1 that the28 number of true 32 corners is 60. The 36 RECD and0.452 the Harris corner detector give theFAST-9 same results. Both47 detect the highest 13 number of true 9 positives0.811 and have the least number of falseHarris negatives and false48 positives. The 12 FAST-9 corner detector 1 performs0.890 slightly worse than the Harris cornerRECD detector and48 the RECD, but 12 it performs substantially 1 better0.890 than the Moravec detector and the SUSAN detector. The detection performance of the SUSAN corner detector is the Table 2. Evaluation results of the lab image. worst. Similar results are shown in Table2. However, the FAST-9 corner detector is now slightly worse than the MoravecDetector corner detector True Positives in detecting False true Negatives positives Falseand false Positives negatives, ACU while the RECD performs slightlyMoravec better than the148 Harris corner detector. 94 It is noted that 58 the RECD 0.665 always performs best on accuracy.SUSAN Subjective observation61 of the two 181 experimental figures 134 shows that0.282 the RECD detects the largest numberFAST-9 of the true positives142 while it detects 100 the least false 55 negatives and0.654 false positives. Harris 156 86 49 0.703 RECD Table157 1. Evaluation results 85 of the block image. 47 0.709 Detector True Positives False Negatives False Positives ACU Moravec 39 21 16 0.680 SUSAN 28 32 36 0.452 FAST-9 47 13 9 0.811 Harris 48 12 1 0.890 RECD 48 12 1 0.890

Table 2. Evaluation results of the lab image.

Detector True Positives False Negatives False Positives ACU Moravec 148 94 58 0.665 SUSAN 61 181 134 0.282 FAST-9 142 100 55 0.654 Harris 156 86 49 0.703 RECD 157 85 47 0.709 Appl. Sci. 2020, 10, x FOR PEER REVIEW 9 of 14 Appl. Sci. 2020, 10, x FOR PEER REVIEW 9 of 14 Appl. Sci. 2020, 10, 443 9 of 14

4.2. Consistency of Corner Numbers 4.2.4.2. ConsistencyConsistency ofof CornerCorner NumbersNumbers Consistency means corner numbers should not vary with various transforms [4]. The formula Consistency means corner numbers should not vary with various transforms [4]. The formula of CCNConsistency has been means described corner in numbersSection 2. should Here, the not block vary withimage various is used transforms as test image [4]. to The evaluate formula the of CCN has been described in Section 2. Here, the block image is used as test image to evaluate the ofconsistency. CCN has been According described to inthe Section definition2. Here, of CCN, the block its computation image is used do ases testnot imageneed the to evaluateground truths the consistency. According to the definition of CCN, its computation does not need the ground truths consistency.of test images. According The number to the definitionand the position of CCN, of its corners computation in the doesblock not image need are the shown ground in truths Figure of test5. To of test images. The number and the position of corners in the block image are shown in Figure 5. To images.evaluate The the number consistency and the of position the five of cornerscorner indete thectors, block the image rotation are shown transformation, in Figure5. Tothe evaluate shearing evaluate the consistency of the five corner detectors, the rotation transformation, the shearing thetransformation, consistency of the fivebrightness corner detectors,transformation, the rotation the uniform transformation, scaling theand shearing the Joint transformation, Photographic transformation, the brightness transformation, the uniform scaling and the Joint Photographic theExperts brightness Group transformation, (JPEG) compression the uniform are performed. scaling and theThe Joint original Photographic image is Expertsfirst transformed Group (JPEG) with Experts Group (JPEG) compression are performed. The original image is first transformed with compressionthese transformations. are performed. Then, The we original use the image five corner is first detectors transformed to extract with these the number transformations. and the position Then, these transformations. Then, we use the five corner detectors to extract the number and the position weof usecorners the five in all corner transformed detectors images. to extract Finally, the number the values and thefor positionthe CCN of criterion corners inare all computed. transformed The of corners in all transformed images. Finally, the values for the CCN criterion are computed. The images.transformation Finally, thefactors values are foras follows: the CCN criterion are computed. The transformation factors are as follows:transformation factors are as follows: • Rotation: 19 different angles in [−90°, 90°] at 10° apart. • Rotation:Rotation: 1919 didifferentfferent angles angles in in [ [−9090°,, 9090°]] atat 1010° apart.apart. • • Shearing: the shearing factor of− y direction◦ ◦ in ◦[−1, 1] at 0.2 apart. • Shearing: the shearing factor of y direction in [−1, 1] at 0.2 apart. • Shearing:Uniform thescaling: shearing 11 scaling factor offactors y direction in [0.5, in1.5] [ 1,at 1]0.1 at apart. 0.2 apart. •• Uniform scaling: 11 scaling factors in [0.5, 1.5]− at 0.1 apart. • UniformBrightness scaling: variation: 11 scaling 9 brightness factors infactors [0.5, 1.5]in [0.2, at 0.1 1.8] apart. at 0.2 apart. •• Brightness variation: 9 brightness factors in [0.2, 1.8] at 0.2 apart. • BrightnessJPEG compression: variation: the 9 brightness quality loss factors factors in [0.2,in [0.1, 1.8] 1] at at 0.2 0.1 apart. apart. •• JPEGJPEG compression: compression: the the quality quality loss loss factors factors in in [0.1, [0.1, 1] 1] at at 0.1 0.1 apart. apart. • The Figure 7 shows the average consistency of corner numbers (CCN) under each TheThe Figure Figure7 shows 7 shows the average the average consistency consistenc of cornery numbersof corner (CCN) numbers under each(CCN) transformation under each transformation for five corner detectors. Figure 8 shows the CCN values of the five corner detectors fortransformation five corner detectors. for five corner Figure detectors.8 shows the Figure CCN 8 valuesshows ofthe the CCN five values corner of detectors the five undercorner di detectorsfferent under different shearing factors in vertical direction. shearingunder different factors inshearing vertical factor direction.s in vertical direction.

Figure 7. The average CCN under each transformation for five corner detectors. FigureFigure 7. 7. TheThe average average CCN underunder each each transformation transformation for fivefor five corner corner detectors. detectors.

Figure 8. Consistency of corner numbers (CCN) of each method under shearing transformation. Figure 8. Consistency of corner numbers (CCN) of each method under shearing transformation. Figure 8. Consistency of corner numbers (CCN) of each method under shearing transformation. It can be seen that the proposed RECD achieves the best performance when shearing factor is in [ 0.2, 0.4]. The Harris performs better than the RECD in the range from 1 to 0.4. Although the − − − Appl. Sci. 2020, 10, x FOR PEER REVIEW 10 of 14

Appl. Sci.It can 2020 be, 10 seen, x FOR that PEER the REVIEW proposed RECD achieves the best performance when shearing factor10 is of in14 [−0.2, 0.4]. The Harris performs better than the RECD in the range from −1 to −0.4. Although the FAST-9It can has be be seentter CCNthat the at theproposed shearing RECD factor achieves −0.6 and the 0.6, best it performancehas large fluctuation when shearing and achieves factor islow in Appl. Sci. 2020, 10, 443 10 of 14 value[−0.2, at0.4]. other The shearing Harris performsfactors. As be thetter basis than of the FAST RECD−9, the in theSUSAN range detector from − ac1 hievesto −0.4. similar Although results. the TheFAST-9 consistency has bett erof CCNMoravec at the detector shearing is the factor worst. −0.6 It and can 0.6,be seenit has from large Figure fluctuation 7 that theand average achieves CCN low FAST-9valuevalue ofat has RECDother better shearing is highest CCN atfactors. which the shearing As is followedthe basis factor slightlyof FAST0.6 and by−9, 0.6,Harris. the itSUSAN has large detector fluctuation achieves and similar achieves results. low − valueThe consistencyThe at other consistency shearing of Moravec performance factors. detector As the under is basis the uniform worst. of FAST It scaling can9, the be SUSANseenis shown from detector inFigure Figureachieves 7 that 9. It the is similar averageobvious results. CCN that − TheRECDvalue consistency ofdetector RECD is of highestthe Moravec most which stable detector is one followed is for the the worst. slightly variat It canionby Harris.of be scaling seen from factor. Figure Moreover,7 that the it averageperforms CCN best valuewhenThe ofthe RECD consistencyscaling is highestfactor performance is which in [1, 1.3] is followed andunder [0.6, uniform slightly 0.7]. As byscaling the Harris. basis is ofshown RECD, in Harris Figure has 9. similarIt is obvious CCN tothat it. However,RECDThe detector consistency RECD is has the performance bettermost stableconsistency under one for uniformowing the variat to scaling theion strong isof shownscaling corner in factor. Figure validation Moreover,9. It is in obvious Section it performs that 3.1. RECD When best detectorthewhen image the is scaling theis mostshrunk, factor stable FAST-9 is onein [1, for achieves1.3] the and variation [0.6,the 0.7]best of. scaling Asperformance the basis factor. of Moreover, followedRECD, Harris by it performs RECD. has similar By best contrast, CCN when to the it.it scalingperformsHowever, factor worst RECD is in when [1,has 1.3] better the and image consistency [0.6, is 0.7]. enlarged. As owing the basisIn to Fi the ofgure RECD,strong 7, the Harriscorner RECD hasvalidation has similar the best CCNin Section average to it. However,3.1. CCN. When It RECDdemonstratesthe image has better is thatshrunk, consistency RECD FAST-9 has owing better achieves todetection the the strong bestcapabi corner performancelity validationunder scaling followed in Section transformation by 3.1RECD.. When Bythan the contrast, the image other isit shrunk,fourperforms detectors. FAST-9 worst achieves when the the image best performance is enlarged. followed In Figure by 7, RECD. the RECD By contrast, has the it performsbest average worst CCN. when It thedemonstrates image is enlarged. that RECD In Figurehas better7, the detection RECD has capabi the bestlity under average scaling CCN. transformation It demonstrates than that the RECD other hasfour better detectors. detection capability under scaling transformation than the other four detectors.

Figure 9. CCN of each method under uniform scaling transformation.

Figure 10 showsFigureFigure the 9. 9.relationCCN CCN ofof eachbetweeneach methodmethod CCN underunder and uniform uniform image scaling scalingbrightness. transformation. transformation. When the brightness factor is 1, Figurethe image 10 shows is not the changed. relation It between becomes CCN darker and when image brightness brightness. factor When is theless brightness than 1 and factor brighter is 1, whenFigure brightness 10 shows factor the is morerelation than between 1. RECD CCN and and Harris image both brightness. have a more When stable the curve brightness and achieve factor the image is not changed. It becomes darker when brightness factor is less than 1 and brighter when betteris 1, the performance image is not thanchanged. other It becomesthree detectors darker whenin Figure brightness 10. FAST-9factor is performsless than 1worst and brighter under brightness factor is more than 1. RECD and Harris both have a more stable curve and achieve better brightnesswhen brightness variation. factor Seen is more from than Figure 1. RECD 7, th ande RECD Harris has both highest have aaverage more stable CCN curve under and different achieve performance than other three detectors in Figure 10. FAST-9 performs worst under brightness variation. brightnessbetter performance variations. than other three detectors in Figure 10. FAST-9 performs worst under Seen from Figure7, the RECD has highest average CCN under di fferent brightness variations. brightness variation. Seen from Figure 7, the RECD has highest average CCN under different brightness variations.

Figure 10. Figure 10. CCNCCN ofof eacheach methodmethod underunder brightnessbrightness variation.variation.

Figure 11 shows the consistency performance of the five detectors under different JPEG compression Figure 10. CCN of each method under brightness variation. factors. The quality loss factor determines the percent of lost image information. As the increase of quality loss factor, the lost information increases. Obviously, the Moravec detector achieves the highest CCN. This is because the Moravec detector is more sensitive to edges of different directions. FAST-9 Appl. Sci. 2020, 10, x FOR PEER REVIEW 11 of 14 Appl. Sci. 2020, 10, x FOR PEER REVIEW 11 of 14 Figure 11 shows the consistency performance of the five detectors under different JPEG compressionFigure 11 factors.shows Thethe qualityconsistency loss factorperformance determines of the the fivepercent detectors of lost underimage differentinformation. JPEG As compressionthe increase factors.of quality The loss quality factor, loss the factor lost informationdetermines theincreases. percent Obviously, of lost image the Moravecinformation. detector As theachieves increase the of highestquality lossCCN. factor, This theis becauselost information the Moravec increases. detector Obviously, is more the sensitive Moravec to detectoredges of Appl. Sci. 2020, 10, 443 11 of 14 achievesdifferent the directions. highest FAST-9CCN. This performs is because worst the for MoJPEGravec compression detector is seen more from sensitive Figure to11. edges Figure of 7. differentShows the directions. average FAST-9CCN under performs each transformationworst for JPEG for compression five corner seendetectors. from ItFigure can be 11. seen Figure that the7. Showsperformsaverage the CCN worstaverage of for the CCN JPEG RECD under compression detector each transformation is seen the fromsecond Figure forbest five11 under. Figurecorner compression7 detectors.. Shows the andIt averagecan slightly be seen CCN more that under thethan averageeachSUSAN transformation CCN and Harris.of the for RECD five cornerdetector detectors. is the second It can bebest seen under that thecompression average CCN and ofslightly the RECD more detector than SUSANis the second and Harris. best under compression and slightly more than SUSAN and Harris.

Figure 11. CCN of each method under JPEG compression. Figure 11. CCN of each method under JPEG compression. Figure 11. CCN of each method under JPEG compression. ForFor imageimage rotation rotation as as shown shown in in Figure Figure 12, 12, the the average average consistency consistency of the of RECD the RECD is highest is highest at most at For image rotation as shown in Figure 12, the average consistency of the RECD is highest at ofmost the of rotation the rotation angles. angles. Its invariance Its invariance to rotation to rotati is betteron is better than thethan other the other four cornerfour corner detectors. detectors. The most of the rotation angles. Its invariance to rotation is better than the other four corner detectors. MoravecThe Moravec corner corner detector detector shows theshows worst the consistency, worst cons becauseistency, the because corner measuresthe corner of measures the detector of arethe The Moravec corner detector shows the worst consistency, because the corner measures of the highlydetector sensitive are highly to rotation. sensitive Although to rotation. the averageAlthough consistency the average of consistency the RECD is of highest, the RECD its consistency is highest, detector are highly sensitive to rotation. Although the average consistency of the RECD is highest, isits obviously consistency lower is obviously than the FAST-9 lower cornerthan the detector FAST-9 and corner SUSAN detector corner and detector SUSAN in thecorner angle detector range ofin its consistency is obviously lower than the FAST-9 corner detector and SUSAN corner detector in 20the toangle 30 andrange significantly of 20° to 30° higher and significantly than both of themhigher in than the angleboth of range them of in 40 theto angle 55 . No range matter of 40° how to the◦ angle ◦range of 20° to 30° and significantly higher than both of them in the◦ angle◦ range of 40° to much55°. No the matter angle how of rotation much is,the the angle consistency of rotation of is, the the Moravec consistency corner of detector the Moravec is the corner worst. detector Through is 55°. No matter how much the angle of rotation is, the consistency of the Moravec corner detector is observationthe worst. Through of Figures observation7 and 12, The of RECDFigure detector12 and Figure performs 7, The best RECD under detector rotation performs transformation best under and the worst. Through observation of Figure 12 and Figure 7, The RECD detector performs best under isrotation followed transformation by the FAST-9 cornerand is detector. followed The by Harris the detectorFAST-9 performscorner detector. better than The the Harris SUSAN detector corner rotation transformation and is followed by the FAST-9 corner detector. The Harris detector detectorperforms and better worse than than the the SUSAN FAST-9 corner corner detector detector. and worse than the FAST-9 corner detector. performs better than the SUSAN corner detector and worse than the FAST-9 corner detector.

Figure 12. CCN of each method under rotation transformation. Figure 12. CCN of each method under rotation transformation. Figure 12. CCN of each method under rotation transformation. Compared with other four detectors, the proposed RECD detector achieves better consistency Compared with other four detectors, the proposed RECD detector achieves better consistency under shearing, scaling, brightness variation and rotation. It has the second best consistency under underCompared shearing, with scaling, other brightness four detectors, variation the proposedand rotation. RECD It has detector the second achieves best better consistency consistency under lossy JPEG compression. The RECD corner detector combines the merits of FAST and Harris. The under shearing, scaling, brightness variation and rotation. It has the second best consistency under non-corners exclusion step eliminates the interference of many non-corners and reduces the amount of computation of following steps. Thus, the following steps can detect fewer false corners without interference of those non-corners. As a result, the final corners obtained by RECD are more robust than the FAST-9 detector and Harris corner detector. Appl. Sci. 2020, 10, x FOR PEER REVIEW 12 of 14

lossy JPEG compression. The RECD corner detector combines the merits of FAST and Harris. The non-corners exclusion step eliminates the interference of many non-corners and reduces the amount of computation of following steps. Thus, the following steps can detect fewer false corners without interference of those non-corners. As a result, the final corners obtained by RECD are more robust than the FAST-9 detector and Harris corner detector. Image compression can retain the high-frequency information such as edges in an image. The Moravec detector chooses the edge direction with minimum to detect corners. It can extract many pixels on image edges although some are not corners. This is the reason why the Moravec detector performs best under JPEG compression. Appl. Sci. 2020, 10, 443 12 of 14 4.3. Computational Time Performance ImageAll the compression timing experiments can retain are the high-frequencyoperated on Matlab information R2014a such with as a edges 3.20 inGHz an image.Pentium(R) The Moravecdual-core detector central choosesprocessing the edgeunit (CPU) direction and with 2 GB minimum random varianceaccess memory. to detect To corners. get more Itcan reasonable extract manyresults, pixels the five on imagecorner edges detectors although are executed some are 100 not times corners. and Thismean is execution the reason times why are the measured. Moravec detectorThe time performs is obtained best through under JPEG the timing compression. function in Matlab (tic/toc). Table 3 and Figure 13 show the execution time of the RECD compared with other corner detectors. The speedup is relative to the 4.3. Computational Time Performance performance of the RECD which represents the ratio of each referenced detector to the RECD. The computingAll the timingmethod experiments of the speedup are operated is shown on as Matlab(5): R2014a with a 3.20 GHz Pentium(R) dual-core central processing unit (CPU) and 2 GB random access memory. To get more reasonable results, the t1 five corner detectors are executed 100 timesspeedup and mean= execution times are measured. The time(5) is obtained through the timing function in Matlab (tic/toc).t2 Table3 and Figure 13 show the execution time of the RECD compared with other corner detectors. The speedup is relative to the performance of where t1 represents the execution time of the RECD and t2 represents the execution time of one of thethe RECD five corner which detectors. represents The the smaller ratio of eachthe value referenced of speedup, detector the to more the RECD. obvious The the computing speed advantage method ofof the RECD speedup over this is shown compared as (5): method. t speedup = 1 (5) t Table 3. Execution time of the 2five corner detectors. where t1 represents the execution time of the RECD and t2 represents the execution time of one of the Time (s) five corner detectors.Detector The smaller the value of speedup, the more obviousSpeed the speed up (%) advantage of RECD over this comparedBlock method. Flower House Airplane Lab RECD 0.100 1.014 0.102 0.138 0.814 100.0 Moravec 0.561Table 3. Execution6.166 time0.559 of the five corner0.977 detectors.2.251 20.6 SUSAN 1.010 12.002 1.111 1.856 4.391 10.6 Time (s) DetectorHarris 1.239 16.155 1.307 2.280 5.266 Speed 8.2 up (%) FAST-9 Block0.293 Flower2.427 House0.340 Airplane0.449 1.326 Lab 44.8 RECD 0.100 1.014 0.102 0.138 0.814 100.0 FigureMoravec 13 is Contrast 0.561 of execution 6.166 time 0.559of the five 0.977 corner detectors. 2.251 The RECD 20.6 is the fastest SUSAN 1.010 12.002 1.111 1.856 4.391 10.6 among theHarris five corner 1.239detectors while 16.155 the convention 1.307al 2.280 Harris corner 5.266 detector is 8.2the slowest. The speed of RECDFAST-9 is more 0.293than 10 times 2.427 faster than 0.340 the traditional 0.449 Harris 1.326 angle detector. 44.8

Figure 13. Contrast of execution time of the five corner detectors. Figure 13. Contrast of execution time of the five corner detectors. Figure 13 is Contrast of execution time of the five corner detectors. The RECD is the fastest among the five corner detectors while the conventional Harris corner detector is the slowest. The speed of RECD is more than 10 times faster than the traditional Harris angle detector. As can be seen in Figure 13, compared with other detectors, the speed advantage is also obvious: the execution time of RECD is only 20.6% and 10.6% of Moravec and SUSAN respectively. Even with the closest FAST-9, our method has more than doubled the speed. This is enough to show that the speed improvement of RECD is significant. Note that the FAST-9 detector is different from the original FAST detector. It involves a machine-learning step to refine the result after the FAST step with 9 contiguous pixels. That is why the FAST-9 is slower than RECD. Appl. Sci. 2020, 10, 443 13 of 14

5. Conclusions In this paper, a robust and computationally efficient corner detector is proposed based on the Harris corner detector [6]. First, we used the theory of the feature from accelerated segment test (FAST) algorithm [9] to exclude a large number of non-corners and mark those strong corners. For those uncertain corners, they are judged as candidate corners and processed further. Second, we calculated the gradients in x and y directions of the image by filtering the candidate corners. Third, we calculated the corner response function (CRF) of the candidate corners. Finally, we used the improved efficient non-maximum suppression (NMS) to obtain the resulting corners. Consequently, we achieved a corner detector of good detection quality and high speed. The detection and localization performance evaluation were carried out using two theoretical criteria of the consistency of corner numbers (CCN) and accuracy (ACU). The experimental results show that the RECD is more accurate with respect to the ACU criterion and more robust with respect to the CCN criterion under all the five transformations except compression. Moreover, the RECD shows the fastest computation time among the five corner detectors. The detection time of the RECD is only approximately 8.2% that of the original Harris corner detector.

Author Contributions: Conceptualization, Z.S.; methodology, T.L. and Z.S.; formal analysis, T.L.; data curation, P.W.; writing—original draft preparation, T.L.; writing—review and editing, P.W.; funding acquisition, Z.S. All authors have read and agreed to the published version of the manuscript. Funding: This work was supported by the National Natural Science Foundation of China (No. 61674115). Conflicts of Interest: The authors declare no conflict of interest.

References

1. Pang, Y.; Cao, J.; Li, X. Learning sampling distributions for efficient object detection. IEEE Trans. Cybern. 2017, 47, 117–129. [CrossRef][PubMed] 2. Yan, C.; Xie, H.; Chen, J.; Zha, Z.; Hao, X.; Zhan, Y. A fast Uyghur text detector for complex background images. IEEE Trans. Multimed. 2018, 20, 3389–3398. [CrossRef] 3. Zhang, S.; Liu, W. Single image 3D reconstruction based on control point grid. Multimed. Tools Appl. 2018, 77, 1–19. [CrossRef] 4. Mohanna, F.; Mokhtarian, F. Performance evaluation of corner detectors using consistency and accuracy measures. Comput. Vis. Image Underst. 2006, 102, 81–94. 5. Moravec, H. Towards automatic visual obstacle avoidance. In Proceedings of the 5th International Joint Conference on Artificial Intelligence, Cambridge, MA, USA, 22–25 August 1977. 6. Harris, C.; Stephens, M. A combined corner and edge detector. In Proceedings of the Alvey Vision Conference, Manchester, UK, 31 August–2 September 1988. 7. Smith, S.M.; Brady, J.M. SUSAN-A new approach to low-level image. Int. J. Comput. Vis. 1997, 23, 45–78. [CrossRef] 8. Trajkovic, M.; Hedley, M. Fast Corner Detection. Image Vis. Comput. 1998, 16, 75–87. [CrossRef] 9. Rosten, E.; Drummond, T. Fusing Points and Lines for High Performance Tracking. In Proceedings of the 10th IEEE International Conference on Computer Vision, Beijing, China, 17–21 October 2005. 10. Rosten, E.; Reitmayr, G.; Drummond, T. Real-Time Video Annotations for . Adv. Vis. Comput. 2005, 3804, 294–302. 11. Rattarangsi, A.; Chin, R.T. Scale-based detection of corners of planar curves. IEEE Trans. Pattern Anal. Mach. Intell. 1992, 14, 430–449. [CrossRef] 12. Mokhtarian, F.; Suomela, R. Robust image corner detection through curvature scale space. IEEE Trans. Pattern Anal. Mach. Intell. 1998, 20, 1376–1381. [CrossRef] 13. He, X.C.; Yung, N.H.C. Corner detector based on global and local curvature properties. Opt. Eng. 2008, 47, 1–12. 14. Awrangjeb, M.; Lu, G. Robust image corner detection based on the chord-to-point distance accumulation technique. IEEE Trans. Multimed. 2008, 10, 1059–1072. [CrossRef] Appl. Sci. 2020, 10, 443 14 of 14

15. Canny, J. A Computational Approach to Edge Detection. IEEE Trans. Pattern Anal. Mach. Intell. 1986, 8, 679–698. [CrossRef][PubMed] 16. Zhang, W.C.; Shui, P.L. Contour-based corner detection via angle difference of principal directions of anisotropic Gaussian directional derivatives. Pattern Recognit. 2015, 48, 2785–2797. [CrossRef] 17. Zhang, X.; Qu, Y.; Yang, D.; Wang, H.; Kymer, J. Laplacian Scale Space Behavior of Planar Curve Corners. IEEE Trans. Pattern Anal. Mach. Intell. 2015, 37, 1. [CrossRef][PubMed] 18. Mainali, P.; Yang, Q.; Lafruit, G.; van Gool, L.; Lauwereins, R. Robust Low Complexity Corner Detector. IEEE Trans. Circuits Syst. Video Technol. 2011, 21, 435–445. [CrossRef] 19. Mair, E.; Hager, G.D.; Burschka, D.; Suppa, M.; Hirzinger, G. Adaptive and generic corner detection based on the accelerated segment test. In Proceedings of the European Conference on Computer Vision, Crete, Greece, 6–9 September 2010. 20. Leutenegger, S.; Chli, M.; Siegwart, R.Y. BRISK: Binary robust invariant scalable keypoints. In Proceedings of the 2011 International Conference on Computer Vision, ICCV 2011, Barcelona, Spain, 1 March 2011. 21. Alcantarilla, P. Fast explicit diffusion for accelerated features in nonlinear scale spaces. IEEE Trans. Pattern Anal. Mach. Intell. 2013, 34, 1281–1298. 22. Xiong, W.; Tian, W.; Yang, Z.; Niu, X. Improved FAST corner-detection method. J. Eng. 2019, 2019, 5493–5497. [CrossRef] 23. Zhang, X.H.; Lei, M.; Yang, D.; Wang, Y.; Ma, L. Multi-scale curvature product for robust image corner detection in curvature scale space. Pattern Recognit. Lett. 2007, 28, 545–554. [CrossRef] 24. Petitcolas. Photo Database. Available online: http://www.petitcolas.net/fabien/watermarking/image_ database/ (accessed on 2 January 2020). 25. The Usc-Sipi Image Database. Available online: http://sipi.usc.edu/database/ (accessed on 2 January 2020). 26. Neubeck, A.; van Gool, L. Efficient non-maximum suppression. In Proceedings of the International Conference on Pattern Recognition, Hong Kong, China, 20–24 August 2006. 27. Rosten, E.; Drummond, T. Machine Learning for High Speed Corner Detection. In Proceedings of the 9th European Conference on Computer Vision, Graz, Austria, 7–13 May 2006. 28. Rosten, E.; Porter, R.; Drummond, T. Faster and Better: A Machine Learning Approach to Corner Detection. IEEE Trans. Pattern Anal. Mach. Intell. 2010, 32, 105–119. [CrossRef][PubMed] 29. He, X.C.; Yung, N.H.C. Curvature scale space corner detector with adaptive threshold and dynamic region of support. In Proceedings of the International Conference on Pattern Recognition, Cambridge, UK, 26 August 2004. 30. Shui, P.L.; Zhang, W.C. Corner Detection and Classification Using Anisotropic Directional Derivative Representations. IEEE Trans. Image Process. 2013, 22, 3204–3218. [CrossRef][PubMed]

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).