Class Covdet

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

    public class Covdet
    extends AlgorithmBase
    Copyright (C) 2013-14 Andrea Vedaldi. Copyright (C) 2012 Karel Lenc, Andrea Vedaldi and Michal Perdoch. All rights reserved. vl_svd2, vl_solve_linear_system_2, vl_solve_linear_system_3, and gaussian_elimination from mathop.c by Copyright (C) 2014 Andrea Vedaldi. Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. All rights reserved. vl_imsmooth_f, vl_imgradient_f, vl_imgradient_polar_f, _vl_new_gaussian_fitler_f, and vl_imconvcol_vf from imopv.c by Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. test_svd2 routines from test_svd2.c Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. Testing vl_imconvcol.vf from code in test_imopv.c Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. Routines form scalespace.c by Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. Routines form qsort-def.h by Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. From vl_covdet.c Copyright (C) 2007-12 Karel Lencl, Andrea Vedaldi and Michal Perdoch. This file is part of the VLFeat library and is made available under the terms of the BSD license (see the COPYING file). Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. 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. 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 HOLDER OR CONTRIBUTORS 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.
    Author:
    Karel Lenc, Andrea Vedaldi, Michal Perdoch
    • Field Detail

      • VL_EPSILON_D

        double VL_EPSILON_D
      • VL_ERR_OK

        int VL_ERR_OK
        ------------------------------------------------------------------
      • VL_ERR_OVERFLOW

        int VL_ERR_OVERFLOW
        < No error
      • VL_ERR_ALLOC

        int VL_ERR_ALLOC
        < Buffer overflow error
      • VL_ERR_BAD_ARG

        int VL_ERR_BAD_ARG
        < Resource allocation error
      • VL_ERR_IO

        int VL_ERR_IO
        < Bad argument or illegal data error
      • VL_ERR_EOF

        int VL_ERR_EOF
        < Input/output error
      • VL_PAD_BY_ZERO

        int VL_PAD_BY_ZERO
      • VL_PAD_BY_CONTINUITY

        int VL_PAD_BY_CONTINUITY
        < @brief Pad with zeroes.
      • VL_PAD_MASK

        int VL_PAD_MASK
        < @brief Pad by continuity.
      • VL_TRANSPOSE

        int VL_TRANSPOSE
        < @brief Padding field selector.
      • VL_COVDET_MAX_NUM_ORIENTATIONS

        int VL_COVDET_MAX_NUM_ORIENTATIONS
      • VL_COVDET_MAX_NUM_LAPLACIAN_SCALES

        int VL_COVDET_MAX_NUM_LAPLACIAN_SCALES
      • VL_COVDET_AA_PATCH_RESOLUTION

        int VL_COVDET_AA_PATCH_RESOLUTION
      • VL_COVDET_AA_MAX_NUM_ITERATIONS

        int VL_COVDET_AA_MAX_NUM_ITERATIONS
      • VL_COVDET_OR_NUM_ORIENTATION_HISTOGAM_BINS

        int VL_COVDET_OR_NUM_ORIENTATION_HISTOGAM_BINS
      • VL_COVDET_AA_RELATIVE_INTEGRATION_SIGMA

        double VL_COVDET_AA_RELATIVE_INTEGRATION_SIGMA
      • VL_COVDET_AA_RELATIVE_DERIVATIVE_SIGMA

        double VL_COVDET_AA_RELATIVE_DERIVATIVE_SIGMA
      • VL_COVDET_AA_MAX_ANISOTROPY

        double VL_COVDET_AA_MAX_ANISOTROPY
      • VL_COVDET_AA_CONVERGENCE_THRESHOLD

        double VL_COVDET_AA_CONVERGENCE_THRESHOLD
      • VL_COVDET_AA_ACCURATE_SMOOTHING

        boolean VL_COVDET_AA_ACCURATE_SMOOTHING
      • VL_COVDET_AA_PATCH_EXTENT

        double VL_COVDET_AA_PATCH_EXTENT
      • VL_COVDET_OR_ADDITIONAL_PEAKS_RELATIVE_SIZE

        double VL_COVDET_OR_ADDITIONAL_PEAKS_RELATIVE_SIZE
      • VL_COVDET_LAP_NUM_LEVELS

        int VL_COVDET_LAP_NUM_LEVELS
      • VL_COVDET_LAP_PATCH_RESOLUTION

        int VL_COVDET_LAP_PATCH_RESOLUTION
      • VL_COVDET_LAP_DEF_PEAK_THRESHOLD

        double VL_COVDET_LAP_DEF_PEAK_THRESHOLD
      • VL_COVDET_DOG_DEF_PEAK_THRESHOLD

        double VL_COVDET_DOG_DEF_PEAK_THRESHOLD
      • VL_COVDET_DOG_DEF_EDGE_THRESHOLD

        double VL_COVDET_DOG_DEF_EDGE_THRESHOLD
      • VL_COVDET_HARRIS_DEF_PEAK_THRESHOLD

        double VL_COVDET_HARRIS_DEF_PEAK_THRESHOLD
      • VL_COVDET_HARRIS_DEF_EDGE_THRESHOLD

        double VL_COVDET_HARRIS_DEF_EDGE_THRESHOLD
      • VL_COVDET_HESSIAN_DEF_PEAK_THRESHOLD

        double VL_COVDET_HESSIAN_DEF_PEAK_THRESHOLD
      • VL_COVDET_HESSIAN_DEF_EDGE_THRESHOLD

        double VL_COVDET_HESSIAN_DEF_EDGE_THRESHOLD
      • VL_COVDET_GSS_BASE_SCALE

        double VL_COVDET_GSS_BASE_SCALE
    • Constructor Detail

      • Covdet

        public Covdet()
    • Method Detail

      • vl_get_frame_size

        public int vl_get_frame_size​(Covdet.VlFrameType frameType)
        Parameters:
        frameType - identifier of the type of frame.
        Returns:
        size of the corresponding frame structure in bytes.
      • vl_get_frame_type

        public Covdet.VlFrameType vl_get_frame_type​(boolean affineAdaptation,
                                                    boolean orientation)
        Parameters:
        affineAdaptation - whether the detector use affine adaptation.
        orientation - whether the detector estimates the feature orientation.
        Returns:
        the type of extracted frame. Depedning on whether the detector estimate the affine shape and orientation of a feature, different frame types are extracted.
      • neighbors3DGreatest

        public boolean neighbors3DGreatest​(float v,
                                           float[] map,
                                           int mapOffset,
                                           int xo,
                                           int yo,
                                           int zo,
                                           double threshold)
      • neighbors3DLeast

        public boolean neighbors3DLeast​(float v,
                                        float[] map,
                                        int mapOffset,
                                        int xo,
                                        int yo,
                                        int zo,
                                        double threshold)
      • vl_find_local_extrema_3

        public int[] vl_find_local_extrema_3​(int[] extrema,
                                             int[] numExtrema,
                                             int[] bufferSize,
                                             float[] map,
                                             int mapOffset,
                                             int width,
                                             int height,
                                             int depth,
                                             double threshold)
        Parameters:
        extrema - buffer containing the extrema found (in/out).
        bufferSize - size of the @a extrema buffer in bytes (in/out).
        map - a 3D array representing the map.
        width - of the map.
        height - of the map.
        depth - of the map.
        threshold - minumum extremum value.
        Returns:
        number of extrema found.
      • neighbors2DGreatest

        public boolean neighbors2DGreatest​(float v,
                                           float[] map,
                                           int mapOffset,
                                           int xo,
                                           int yo,
                                           double threshold)
      • neighbors2DLeast

        public boolean neighbors2DLeast​(float v,
                                        float[] map,
                                        int mapOffset,
                                        int xo,
                                        int yo,
                                        double threshold)
      • vl_find_local_extrema_2

        public int[] vl_find_local_extrema_2​(int[] extrema,
                                             int[] numExtrema,
                                             int[] bufferSize,
                                             float[] map,
                                             int mapOffset,
                                             int width,
                                             int height,
                                             double threshold)
        Parameters:
        extrema - buffer containing the found extrema (in/out).
        bufferSize - size of the @a extrema buffer in bytes (in/out).
        map - a 3D array representing the map.
        width - of the map.
        height - of the map.
        threshold - minumum extremum value.
        Returns:
        number of extrema found. An extremum contains 2 ::vl_index values; they are arranged sequentially. The function can reuse an already allocated buffer if
      • test_gaussian_elimination

        public void test_gaussian_elimination()
      • vl_gaussian_elimination

        public int vl_gaussian_elimination​(double[] A,
                                           int numRows,
                                           int numColumns)
        Parameters:
        M - matrix.
        numRows - number of rows of @c M.
        numColumns - number of columns of @c M. The function runs Gaussian elimination with pivoting on the matrix @a M in place.
      • vl_solve_linear_system_3

        public int vl_solve_linear_system_3​(double[] x,
                                            double[] A,
                                            double[] b)
        Parameters:
        x - result.
        A - system matrix.
        b - coefficients. The function computes a solution to @f$ Ax =b @f$ for a 3x3 matrix.
      • vl_refine_local_extreum_3

        public boolean vl_refine_local_extreum_3​(Covdet.VlCovDetExtremum3 refined,
                                                 float[] map,
                                                 int mapOffsetOriginal,
                                                 int width,
                                                 int height,
                                                 int depth,
                                                 int x,
                                                 int y,
                                                 int z)
        Parameters:
        refined - refined extremum (out).
        map - a 3D array representing the map.
        width - of the map.
        height - of the map.
        depth - of the map.
        x - initial x position.
        y - initial y position.
        z - initial z position.
        Returns:
        a flat indicating whether the extrema refinement was stable.
      • vl_solve_linear_system_2

        public int vl_solve_linear_system_2​(double[] x,
                                            double[] A,
                                            double[] b)
        Parameters:
        x - result.
        A - system matrix.
        b - coefficients. The function computes a solution to @f$ Ax =b @f$ for a 2x2 matrix.
      • vl_refine_local_extreum_2

        public boolean vl_refine_local_extreum_2​(Covdet.VlCovDetExtremum2 refined,
                                                 float[] map,
                                                 int mapOffsetOriginal,
                                                 int width,
                                                 int height,
                                                 int x,
                                                 int y)
        Parameters:
        refined - refined extremum (out).
        map - a 2D array representing the map.
        width - of the map.
        height - of the map.
        x - initial x position.
        y - initial y position.
        Returns:
        a flat indicating whether the extrema refinement was stable.
      • test_smooth

        public void test_smooth()
      • vl_imsmooth_f

        public void vl_imsmooth_f​(float[] smoothed,
                                  int smoothedOffset,
                                  int smoothedStride,
                                  float[] image,
                                  int imageOffset,
                                  int width,
                                  int height,
                                  int stride,
                                  double sigmax,
                                  double sigmay)
      • test_conv

        public void test_conv()
      • vl_imconvcol_vf

        public void vl_imconvcol_vf​(float[] dst,
                                    int dstOffset,
                                    int dst_stride,
                                    float[] src,
                                    int srcOffset,
                                    int src_width,
                                    int src_height,
                                    int src_stride,
                                    float[] filt,
                                    int filt_begin,
                                    int filt_end,
                                    int step,
                                    int flags)
      • _vl_new_gaussian_fitler_f

        public float[] _vl_new_gaussian_fitler_f​(int[] size,
                                                 double sigma)
      • vl_covdet_reset

        public void vl_covdet_reset​(Covdet.VlCovDet self)
        Parameters:
        self - object. This function removes any buffered features and frees other internal buffers.
      • vl_scalespace_delete

        public void vl_scalespace_delete​(Covdet.VlScaleSpace self)
        Parameters:
        self - object to delete.
      • vl_covdet_delete

        public void vl_covdet_delete​(Covdet.VlCovDet self)
        Parameters:
        self - object.
      • vl_covdet_append_feature

        public int vl_covdet_append_feature​(Covdet.VlCovDet self,
                                            Covdet.VlCovDetFeature feature)
        Parameters:
        self - object.
        feature - a pointer to the feature to append.
        Returns:
        status. The feature is copied. The function may fail with @c status equal to ::VL_ERR_ALLOC if there is insufficient memory.
      • log2

        private double log2​(double input)
      • vl_scalespace_get_default_geometry

        public Covdet.VlScaleSpaceGeometry vl_scalespace_get_default_geometry​(int width,
                                                                              int height)
        Parameters:
        width - image width.
        height - image height.
        Returns:
        the default scale space geometry. Both @a width and @a height must be at least one pixel wide.
      • vl_covdet_put_image

        public int vl_covdet_put_image​(Covdet.VlCovDet self,
                                       float[] image,
                                       int width,
                                       int height)
        Parameters:
        self - object.
        image - image to process.
        width - image width.
        height - image height.
        Returns:
        status.
      • _vl_scalespace_fill_octave

        public void _vl_scalespace_fill_octave​(Covdet.VlScaleSpace self,
                                               int o)
        Parameters:
        self - object instance.
        o - octave to process. The function takes the first sublevel of octave @a o (the one at sublevel `octaveFirstLevel` and iteratively smoothes it to obtain the other octave levels.
      • vl_scalespace_put_image

        public void vl_scalespace_put_image​(Covdet.VlScaleSpace self,
                                            float[] image)
        Parameters:
        self - ::VlScaleSpace object instance.
        image - image to process. Compute the data of all the defined octaves and scales of the scale space @a self.
      • _vl_scalespace_start_octave_from_previous_octave

        public void _vl_scalespace_start_octave_from_previous_octave​(Covdet.VlScaleSpace self,
                                                                     int o)
        Parameters:
        self - object.
        o - octave to initialize. The function initializes the first level of octave @a o from the content of octave o - 1.
      • vl_scalespace_get_level

        public float[] vl_scalespace_get_level​(Covdet.VlScaleSpace self,
                                               int o,
                                               int s,
                                               int[] levelOffset)
        Parameters:
        self - object.
        o - octave index.
        s - level index.
        Returns:
        pointer to the data for octave @a o, level @a s. The octave index @a o must be in the range @c firstOctave to @c lastOctave and the scale index @a s must be in the range @c octaveFirstSubdivision to @c octaveLastSubdivision.
      • copy_and_downsample

        public void copy_and_downsample​(float[] destination,
                                        int destinationOffset,
                                        float[] source,
                                        int sourceOffset,
                                        int width,
                                        int height,
                                        int numOctaves)
        ------------------------------------------------------------------
        Parameters:
        destination - output imgae buffer.
        source - input image buffer.
        width - input image width.
        height - input image height.
        numOctaves - octaves (non negative). The function downsamples the image @a d times, reducing it to @c 1/2^d of its original size. The parameters @a width and @a height are the size of the input image. The destination image @a dst is assumed to be floor(width/2^d) pixels wide and floor(height/2^d) pixels high.
      • copy_and_upsample

        public void copy_and_upsample​(float[] destination,
                                      int destinationOffset,
                                      float[] source,
                                      int sourceOffset,
                                      int width,
                                      int height)
        ------------------------------------------------------------------
        Parameters:
        destination - output image.
        source - input image.
        width - input image width.
        height - input image height. The output image has dimensions @a height by 2 @a width (so the destination buffer must be at least as big as two times the input buffer). Upsampling is performed by linear interpolation.
      • _vl_scalespace_start_octave_from_image

        public void _vl_scalespace_start_octave_from_image​(Covdet.VlScaleSpace self,
                                                           float[] image,
                                                           int o)
        ------------------------------------------------------------------
        Parameters:
        self - ::VlScaleSpace object instance.
        image - image data.
        o - octave to start. The function initializes the first level of octave @a o from image @a image. The dimensions of the image are the ones set during the creation of the ::VlScaleSpace object instance.
      • vl_scalespace_get_level_sigma

        public double vl_scalespace_get_level_sigma​(Covdet.VlScaleSpace self,
                                                    int o,
                                                    int s)
        ------------------------------------------------------------------
        Parameters:
        self - object.
        o - octave index.
        s - sublevel index. The function returns the scale $\sigma(o,s)$ as a function of the octave index @a o and sublevel @a s.
      • vl_scalespace_new_with_geometry

        public Covdet.VlScaleSpace vl_scalespace_new_with_geometry​(Covdet.VlScaleSpaceGeometry geom)
        ------------------------------------------------------------------
        Parameters:
        geom - scale space geomerty.
        Returns:
        new scale space object. If the geometry is not valid (see ::VlScaleSpaceGeometry), the result is unpredictable. The function returns `NULL` if it was not possible to allocate the object because of an out-of-memory condition.
      • VL_SHIFT_LEFT

        public int VL_SHIFT_LEFT​(int x,
                                 int n)
        Parameters:
        x - value.
        n - number of shift positions.
        Returns:
      • _vl_det_hessian_response

        public void _vl_det_hessian_response​(float[] hessian,
                                             int hessianOriginalOffset,
                                             float[] image,
                                             int imageOffset,
                                             int width,
                                             int height,
                                             double step,
                                             double sigma)
        Parameters:
        hessian - output image.
        image - input image.
        width - image width.
        height - image height.
        step - image sampling step (pixel size).
        sigma - Gaussian smoothing of the input image.
      • _vl_harris_response

        public void _vl_harris_response​(float[] harris,
                                        int harrisOffset,
                                        float[] image,
                                        int imageOffset,
                                        int width,
                                        int height,
                                        double step,
                                        double sigma,
                                        double sigmaI,
                                        double alpha)
        Parameters:
        harris - output image.
        image - input image.
        width - image width.
        height - image height.
        step - image sampling step (pixel size).
        sigma - Gaussian smoothing of the input image.
        sigmaI - integration scale.
        alpha - factor in the definition of the Harris score.
      • vl_imgradient_f

        public void vl_imgradient_f​(float[] xGradient,
                                    float[] yGradient,
                                    int gradWidthStride,
                                    int gradHeightStride,
                                    float[] image,
                                    int imageOffset,
                                    int imageWidth,
                                    int imageHeight,
                                    int imageStride)
      • _vl_dog_response

        public void _vl_dog_response​(float[] dog,
                                     int dogOffset,
                                     float[] level1,
                                     int level1Offset,
                                     float[] level2,
                                     int level2Offset,
                                     int width,
                                     int height)
        Parameters:
        dog - output image.
        level1 - input image at the smaller Gaussian scale.
        level2 - input image at the larger Gaussian scale.
        width - image width.
        height - image height.
      • vl_covdet_detect

        public void vl_covdet_detect​(Covdet.VlCovDet self)
        Parameters:
        self - object. This function runs the configured feature detector on the image that was passed by using ::vl_covdet_put_image.
      • vl_covdet_get_num_features

        public int vl_covdet_get_num_features​(Covdet.VlCovDet self)
        Returns:
        number of frames stored in the detector.
      • vl_covdet_extract_patch_helper

        public int vl_covdet_extract_patch_helper​(Covdet.VlCovDet self,
                                                  double[] sigma1,
                                                  double[] sigma2,
                                                  float[] patch,
                                                  int resolution,
                                                  double extent,
                                                  double sigma,
                                                  double[] A_,
                                                  double[] T_,
                                                  double d1,
                                                  double d2)
        Parameters:
        self - object.
        patch - buffer.
        resolution - patch resolution.
        extent - patch extent.
        sigma - desired smoothing in the patch frame.
        A_ - linear transfomration from patch to image.
        T_ - translation from patch to image.
        d1 - first singular value @a A.
        d2 - second singular value of @a A.
      • vl_covdet_extract_patch_for_frame

        public int vl_covdet_extract_patch_for_frame​(Covdet.VlCovDet self,
                                                     float[] patch,
                                                     int resolution,
                                                     double extent,
                                                     double sigma,
                                                     Covdet.VlFrameOrientedEllipse frame)
        Parameters:
        self - object.
        patch - buffer.
        resolution - patch resolution.
        extent - patch extent.
        sigma - desired smoothing in the patch frame.
        frame - feature frame. The function considers a patch of extent [-extent,extent] on each side, with a side counting 2*resolution+1 pixels. In attempts to extract from the scale space a patch based on the affine warping specified by @a frame in such a way that the resulting smoothing of the image is @a sigma (in the patch frame). The transformation is specified by the matrices @c A and @c T embedded in the feature @a frame. Note that this transformation maps pixels from the patch frame to the image frame.
      • vl_covdet_extract_laplacian_scales_for_frame

        public Covdet.VlCovDetFeatureLaplacianScale[] vl_covdet_extract_laplacian_scales_for_frame​(Covdet.VlCovDet self,
                                                                                                   int[] numScales,
                                                                                                   Covdet.VlFrameOrientedEllipse frame)
        Parameters:
        self - object.
        numScales - the number of detected scales.
        frame - pose of the feature.
        Returns:
        an array of detected scales. The function returns @c NULL if memory is insufficient.
      • prod2

        public void prod2​(double[] R,
                          double[] A,
                          double[] B)
      • transp2

        public void transp2​(double[] R,
                            double[] A)
      • det2

        public double det2​(double[] A)
      • check_svd

        public void check_svd​(double[] M,
                              double[] U,
                              double[] S,
                              double[] V)
      • test_svd2

        public void test_svd2()
      • vl_svd2

        public void vl_svd2​(double[] S,
                            double[] U,
                            double[] V,
                            double[] M)
        Parameters:
        S - 2x2 real diagonal matrix of the singular values (out).
        U - first 2x2 real orthonormal matrix (out).
        V - second 2x2 real orthonormal matrix (out).
        M - 2x2 matrix. The function comptues the SVD decomposition of the 2x2 real matrix @f$ M @f$:
      • isign

        int isign​(int i)
        Parameters:
        smin - smallest (in modulus) singular value (out).
        smax - largest (in modulus) singuarl value (out).
        sv - second component of the right singular vector of @c smax (out).
        cv - first component of the right singular vector of @c smax (out).
        su - second component of the left singular vector of @c smax (out).
        cu - first component of the left singular vector of @c smax (out).
        f - first entry of the upper triangular matrix.
        g - second entry of the upper triangular matrix.
        h - third entry of the upper triangular matrix.
      • sign

        double sign​(double x)
      • vl_lapack_dlasv2

        public void vl_lapack_dlasv2​(double[] smin,
                                     double[] smax,
                                     double[] sv,
                                     double[] cv,
                                     double[] su,
                                     double[] cu,
                                     double f,
                                     double g,
                                     double h)
      • vl_covdet_extract_laplacian_scales

        public void vl_covdet_extract_laplacian_scales​(Covdet.VlCovDet self)
        Parameters:
        self - object. Note that, since more than one orientation can be detected for each feature, this function may create copies of them, one for each orientation.
      • vl_covdet_extract_affine_shape_for_frame

        public int vl_covdet_extract_affine_shape_for_frame​(Covdet.VlCovDet self,
                                                            Covdet.VlFrameOrientedEllipse adapted,
                                                            Covdet.VlFrameOrientedEllipse frame)
        Parameters:
        self - object.
        adapted - the shape-adapted frame.
        frame - the input frame.
        Returns:
        ::VL_ERR_OK if affine adaptation is successful. This function may fail if adaptation is unsuccessful or if memory is insufficient.
      • vl_covdet_extract_affine_shape

        public void vl_covdet_extract_affine_shape​(Covdet.VlCovDet self)
        Parameters:
        self - object. This function may discard features for which no affine shape can reliably be detected.
      • vl_mod_2pi

        public double vl_mod_2pi​(double x)
      • vl_imgradient_polar_f

        public void vl_imgradient_polar_f​(float[] gradientModulus,
                                          float[] gradientAngle,
                                          int gradientHorizontalStride,
                                          int gradHeightStride,
                                          float[] image,
                                          int imageWidth,
                                          int imageHeight,
                                          int imageStride)
      • vl_covdet_extract_orientations_for_frame

        public Covdet.VlCovDetFeatureOrientation[] vl_covdet_extract_orientations_for_frame​(Covdet.VlCovDet self,
                                                                                            int[] numOrientations,
                                                                                            Covdet.VlFrameOrientedEllipse frame)
        Parameters:
        self - object.
        numOrientations - the number of detected orientations.
        frame - pose of the feature.
        Returns:
        an array of detected orientations with their scores. The returned array is a matrix of size @f$ 2 \times n @f$ where n is the number of detected orientations. The function returns @c NULL if memory is insufficient.
      • test_qsort

        public void test_qsort()
      • qsort_recursive

        public void qsort_recursive​(Covdet.VlCovDetFeatureOrientation[] array,
                                    int begin,
                                    int end)
        Parameters:
        array - (in/out) pointer to the array.
        begin - first element of the array portion.
        end - last element of the array portion. The function sorts the array using quick-sort. Note that
      • vl_covdet_extract_orientations

        public void vl_covdet_extract_orientations​(Covdet.VlCovDet self)
        Parameters:
        self - object. Note that, since more than one orientation can be detected for each feature, this function may create copies of them, one for each orientation.
      • vl_covdet_drop_features_outside

        public void vl_covdet_drop_features_outside​(Covdet.VlCovDet self,
                                                    double margin)
        Parameters:
        self - object.
        margin - geometric marging. The feature extent is defined by @c maring. A bounding box in the normalised feature frame containin a circle of radius
      • vl_covdet_get_transposed

        public boolean vl_covdet_get_transposed​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        whether images are transposed.
      • vl_covdet_set_transposed

        public void vl_covdet_set_transposed​(Covdet.VlCovDet self,
                                             boolean t)
        Parameters:
        self - object.
        t - whether images are transposed.
      • vl_covdet_get_edge_threshold

        public double vl_covdet_get_edge_threshold​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        the edge threshold.
      • vl_covdet_set_edge_threshold

        public void vl_covdet_set_edge_threshold​(Covdet.VlCovDet self,
                                                 double edgeThreshold)
        Parameters:
        self - object.
        edgeThreshold - the edge threshold. The edge threshold must be non-negative.
      • vl_covdet_get_peak_threshold

        public double vl_covdet_get_peak_threshold​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        the peak threshold.
      • vl_covdet_set_peak_threshold

        public void vl_covdet_set_peak_threshold​(Covdet.VlCovDet self,
                                                 double peakThreshold)
        Parameters:
        self - object.
        peakThreshold - the peak threshold. The peak threshold must be non-negative.
      • vl_covdet_get_laplacian_peak_threshold

        public double vl_covdet_get_laplacian_peak_threshold​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        the Laplacian peak threshold. This parameter affects only the detecors using the Laplacian scale selectino method such as Harris-Laplace.
      • vl_covdet_set_laplacian_peak_threshold

        public void vl_covdet_set_laplacian_peak_threshold​(Covdet.VlCovDet self,
                                                           double peakThreshold)
        Parameters:
        self - object.
        peakThreshold - the Laplacian peak threshold. The peak threshold must be non-negative.
      • vl_covdet_get_first_octave

        public int vl_covdet_get_first_octave​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        index of the first octave.
      • vl_covdet_set_first_octave

        public void vl_covdet_set_first_octave​(Covdet.VlCovDet self,
                                               int o)
        Parameters:
        self - object.
        o - index of the first octave. Calling this function resets the detector.
      • vl_covdet_get_num_octaves

        public int vl_covdet_get_num_octaves​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        maximal number of octaves.
      • vl_covdet_get_base_scale

        public double vl_covdet_get_base_scale​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        The base scale.
      • vl_covdet_set_num_octaves

        public void vl_covdet_set_num_octaves​(Covdet.VlCovDet self,
                                              int o)
        Parameters:
        self - object.
        o - max number of octaves. Calling this function resets the detector.
      • vl_covdet_set_base_scale

        public void vl_covdet_set_base_scale​(Covdet.VlCovDet self,
                                             double s)
        Parameters:
        self - object.
        s - the base scale. Calling this function resets the detector.
      • vl_covdet_set_max_num_orientations

        public void vl_covdet_set_max_num_orientations​(Covdet.VlCovDet self,
                                                       int m)
        Parameters:
        self - object.
        m - the max number of orientations. Calling this function resets the detector.
      • vl_covdet_get_octave_resolution

        public int vl_covdet_get_octave_resolution​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        octave resolution.
      • vl_covdet_set_octave_resolution

        public void vl_covdet_set_octave_resolution​(Covdet.VlCovDet self,
                                                    int r)
        Parameters:
        self - object.
        r - octave resoltuion. Calling this function resets the detector.
      • vl_covdet_get_aa_accurate_smoothing

        public boolean vl_covdet_get_aa_accurate_smoothing​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
      • vl_covdet_set_aa_accurate_smoothing

        public void vl_covdet_set_aa_accurate_smoothing​(Covdet.VlCovDet self,
                                                        boolean x)
        Parameters:
        self - object.
        x - whether accurate smoothing should be usd.
      • vl_covdet_get_max_num_orientations

        public int vl_covdet_get_max_num_orientations​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        maximal number of orientations.
      • vl_covdet_get_non_extrema_suppression_threshold

        public double vl_covdet_get_non_extrema_suppression_threshold​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        threshold.
      • vl_covdet_set_non_extrema_suppression_threshold

        public void vl_covdet_set_non_extrema_suppression_threshold​(Covdet.VlCovDet self,
                                                                    double x)
        Parameters:
        self - object.
        x - threshold.
      • vl_covdet_get_num_non_extrema_suppressed

        public int vl_covdet_get_num_non_extrema_suppressed​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        number.
      • vl_covdet_get_gss

        public Covdet.VlScaleSpace vl_covdet_get_gss​(Covdet.VlCovDet self)
        Returns:
        Gaussian scale space. A Gaussian scale space exists only after calling ::vl_covdet_put_image. Otherwise the function returns @c NULL.
      • vl_covdet_get_css

        public Covdet.VlScaleSpace vl_covdet_get_css​(Covdet.VlCovDet self)
        Returns:
        cornerness measure scale space. A cornerness measure scale space exists only after calling ::vl_covdet_detect. Otherwise the function returns @c NULL.
      • vl_covdet_get_laplacian_scales_statistics

        public int[] vl_covdet_get_laplacian_scales_statistics​(Covdet.VlCovDet self,
                                                               int[] numScales)
        Parameters:
        self - object.
        numScales - length of the histogram (out).
        Returns:
        histogram. Calling this function makes sense only after running a detector that uses the Laplacian as a secondary measure for scale detection
      • vl_covdet_get_allow_padded_warping

        public boolean vl_covdet_get_allow_padded_warping​(Covdet.VlCovDet self)
        Parameters:
        self - object.
        Returns:
        whether padded warped patches are computed.
      • vl_covdet_set_allow_padded_warping

        public void vl_covdet_set_allow_padded_warping​(Covdet.VlCovDet self,
                                                       boolean t)
        Parameters:
        self - object.
        t - whether padded warped patches are computed.
      • covdet_detector

        public float[][] covdet_detector​(float[][] image,
                                         boolean verbose,
                                         Covdet.VlCovDetMethod method,
                                         boolean doubleImage,
                                         int numOctaves,
                                         int octaveResolution,
                                         double baseScale,
                                         int maxNumOrientations,
                                         double peakThreshold,
                                         double edgeThreshold,
                                         double lapPeakThreshold,
                                         boolean allowPaddedWarping,
                                         double boundaryMargin,
                                         Covdet.vlCovDetDescriptorType descriptorType,
                                         int patchResolution,
                                         double patchRelativeExtent,
                                         double patchRelativeSmoothing,
                                         float[] patch,
                                         float[] patchXY,
                                         double[][] userFrames,
                                         boolean estimateAffineShape,
                                         boolean estimateOrientation,
                                         boolean outputDescriptors,
                                         java.util.Vector<float[][]> descriptors,
                                         int liopNumSpatialBins,
                                         int liopNumNeighbors,
                                         float liopRadius,
                                         float liopIntensityThreshold,
                                         boolean outputInfo,
                                         java.util.Vector<Covdet.VlScaleSpace> gssVec,
                                         java.util.Vector<Covdet.VlScaleSpace> cssVec,
                                         java.util.Vector<java.lang.Float> peak,
                                         java.util.Vector<java.lang.Float> edge,
                                         java.util.Vector<java.lang.Float> orientation,
                                         java.util.Vector<java.lang.Float> laplacian)
      • demo

        public void demo()
      • runAlgorithm

        public void runAlgorithm()
        Description copied from class: AlgorithmBase
        Actually runs the algorithm. Implemented by inheriting algorithms.
        Specified by:
        runAlgorithm in class AlgorithmBase