Class AlgorithmBRISK

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmBRISK
    extends AlgorithmBase
    BRISK - Binary Robust Invariant Scalable Keypoints Reference implementation of [1] Stefan Leutenegger,Margarita Chli and Roland Siegwart, BRISK: Binary Robust Invariant Scalable Keypoints, in Proceedings of the IEEE International Conference on Computer Vision (ICCV2011). Copyright (C) 2011 The Autonomous Systems Lab (ASL), ETH Zurich, Stefan Leutenegger, Simon Lynen and Margarita Chli. This file is part of BRISK. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the ASL nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Reference for counting number of bits set in a byte: Anatomy of High-Performance 2D Similarity Calculations by Imran S. Haque, Vijay S. Pande, and W. Patrick Walters
    • Field Detail

      • wholeImageFlag

        private boolean wholeImageFlag
      • threshold

        private int threshold
      • HammingDistanceThreshold

        private int HammingDistanceThreshold
      • octaves

        private int octaves
      • rotationInvariant

        private boolean rotationInvariant
      • scaleInvariant

        private boolean scaleInvariant
      • patternScale

        private double patternScale
      • radiusList

        private java.util.Vector<java.lang.Double> radiusList
      • numberList

        private java.util.Vector<java.lang.Integer> numberList
      • dMax

        private double dMax
      • dMin

        private double dMin
      • indexChange

        private java.util.Vector<java.lang.Integer> indexChange
      • points

        private int points
      • scaleList

        private double[] scaleList
      • sizeList

        private int[] sizeList
      • numShortPairs

        private int numShortPairs
      • numLongPairs

        private int numLongPairs
      • strings

        private int strings
      • layers

        private int layers
      • safeThreshold

        private int safeThreshold
    • Constructor Detail

      • AlgorithmBRISK

        public AlgorithmBRISK()
        AlgorithmBRISK - default constructor.
      • AlgorithmBRISK

        public AlgorithmBRISK​(ModelImage srcImg)
      • AlgorithmBRISK

        public AlgorithmBRISK​(ModelImage destImage,
                              ModelImage srcImg,
                              boolean wholeImageFlag,
                              int threshold,
                              int HammingDistanceThreshold,
                              int octaves,
                              boolean rotationInvariant,
                              boolean scaleInvariant,
                              double patternScale,
                              java.util.Vector<java.lang.Double> radiusList,
                              java.util.Vector<java.lang.Integer> numberList,
                              double dMax,
                              double dMin,
                              java.util.Vector<java.lang.Integer> indexChange)
        Parameters:
        destImage -
        srcImg - Source image
        wholeImageFlag -
        threshold - FAST/AGAST detection threshold
        HammingDistanceThreshold -
        octaves - Number of octaves for the detection
        rotationInvariant -
        scaleInvariant -
        patternScale - Scale factor for the BRISK pattern.
        radiusList -
        numberList -
        dMax - Short pair maximum distance
        dMin - Long pair maximum distance
        indexChange -
    • Method Detail

      • BriskDescriptorExtractor

        private void BriskDescriptorExtractor()
      • generateKernel

        private void generateKernel()
      • smoothedIntensity

        private int smoothedIntensity​(ModelImage image,
                                      ModelImage integral,
                                      double key_x,
                                      double key_y,
                                      int scale,
                                      int rot,
                                      int point)
      • RoiPredicate

        private boolean RoiPredicate​(double minX,
                                     double minY,
                                     double maxX,
                                     double maxY,
                                     AlgorithmBRISK.KeyPoint keyPt)
      • briskScaleSpace

        private void briskScaleSpace()
      • constructPyramid

        private void constructPyramid​(ModelImage image)
      • refine3D

        private double refine3D​(int layer,
                                int x_layer,
                                int y_layer,
                                double[] x,
                                double[] y,
                                double[] scale,
                                boolean[] ismax)
      • refine1D

        private double refine1D​(double s_05,
                                double s0,
                                double s05,
                                double[] max)
      • refine1D_1

        private double refine1D_1​(double s_05,
                                  double s0,
                                  double s05,
                                  double[] max)
      • refine1D_2

        private double refine1D_2​(double s_05,
                                  double s0,
                                  double s05,
                                  double[] max)
      • getScoreMaxBelow

        private double getScoreMaxBelow​(int layer,
                                        int x_layer,
                                        int y_layer,
                                        int threshold,
                                        boolean[] ismax,
                                        double[] dx,
                                        double[] dy)
      • getScoreMaxAbove

        private double getScoreMaxAbove​(int layer,
                                        int x_layer,
                                        int y_layer,
                                        int threshold,
                                        boolean[] ismax,
                                        double[] dx,
                                        double[] dy)
      • subpixel2D

        private double subpixel2D​(int s_0_0,
                                  int s_0_1,
                                  int s_0_2,
                                  int s_1_0,
                                  int s_1_1,
                                  int s_1_2,
                                  int s_2_0,
                                  int s_2_1,
                                  int s_2_2,
                                  double[] delta_x,
                                  double[] delta_y)