Class AlgorithmBRISK

All Implemented Interfaces:
ActionListener, WindowListener, Runnable, 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 Details

    • 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 Vector<Double> radiusList
    • numberList

      private Vector<Integer> numberList
    • dMax

      private double dMax
    • dMin

      private double dMin
    • indexChange

      private Vector<Integer> indexChange
    • basicSize

      private static final double basicSize
      See Also:
    • scales

      private static final int scales
      See Also:
    • scaleRange

      private static final double scaleRange
      See Also:
    • n_rot

      private final int n_rot
      See Also:
    • safetyFactor

      private final double safetyFactor
      See Also:
    • points

      private int points
    • patternPoints

      private AlgorithmBRISK.BriskPatternPoint[] patternPoints
    • scaleList

      private double[] scaleList
    • sizeList

      private int[] sizeList
    • shortPairs

      private AlgorithmBRISK.BriskShortPair[] shortPairs
    • longPairs

      private AlgorithmBRISK.BriskLongPair[] longPairs
    • numShortPairs

      private int numShortPairs
    • numLongPairs

      private int numLongPairs
    • strings

      private int strings
    • layers

      private int layers
    • pyramid

    • HALFSAMPLE

      private static final int HALFSAMPLE
      See Also:
    • TWOTHIRDSAMPLE

      private static final int TWOTHIRDSAMPLE
      See Also:
    • safeThreshold

      private int safeThreshold
  • Constructor Details

    • 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, Vector<Double> radiusList, Vector<Integer> numberList, double dMax, double dMin, Vector<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 Details

    • finalize

      public void finalize()
      finalize -
      Overrides:
      finalize in class AlgorithmBase
    • runAlgorithm

      public void runAlgorithm()
      Starts the program.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • 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)
    • computeImpl

      private byte[][] computeImpl(ModelImage image, Vector<AlgorithmBRISK.KeyPoint> keypoints)
    • detectImpl

      public void detectImpl(ModelImage image, Vector<AlgorithmBRISK.KeyPoint> keypoints, BitSet mask)
    • briskScaleSpace

      private void briskScaleSpace()
    • constructPyramid

      private void constructPyramid(ModelImage image)
    • getKeypoints

      private void getKeypoints(Vector<AlgorithmBRISK.KeyPoint> keypoints)
    • 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)