Package gov.nih.mipav.model.algorithms
Class Covdet
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.Covdet
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) static enum(package private) class(package private) class(package private) class(package private) class(package private) class(package private) static enum(package private) class(package private) class(package private) class(package private) class(package private) static enum(package private) class(package private) class(package private) classNested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean(package private) double(package private) double(package private) int(package private) double(package private) int(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) double(package private) int(package private) int(package private) int(package private) int(package private) double(package private) int(package private) double(package private) intinvalid input: '<' Buffer overflow error(package private) intinvalid input: '<' Resource allocation error(package private) intinvalid input: '<' Input/output error(package private) intinvalid input: '<' Bad argument or illegal data error(package private) int------------------------------------------------------------------(package private) intinvalid input: '<' No error(package private) intinvalid input: '<' @brief Pad with zeroes.(package private) int(package private) intinvalid input: '<' @brief Pad by continuity.(package private) intinvalid input: '<' @brief Padding field selector.Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean_vl_covdet_check_frame_inside(Covdet.VlCovDet self, Covdet.VlFrameOrientedEllipse frame, double margin) int_vl_covdet_compare_orientations_descending(Covdet.VlCovDetFeatureOrientation a, Covdet.VlCovDetFeatureOrientation b) void_vl_det_hessian_response(float[] hessian, int hessianOriginalOffset, float[] image, int imageOffset, int width, int height, double step, double sigma) void_vl_dog_response(float[] dog, int dogOffset, float[] level1, int level1Offset, float[] level2, int level2Offset, int width, int height) void_vl_harris_response(float[] harris, int harrisOffset, float[] image, int imageOffset, int width, int height, double step, double sigma, double sigmaI, double alpha) float[]_vl_new_gaussian_fitler_f(int[] size, double sigma) void_vl_scalespace_fill_octave(Covdet.VlScaleSpace self, int o) void_vl_scalespace_start_octave_from_image(Covdet.VlScaleSpace self, float[] image, int o) ------------------------------------------------------------------voidvoidcheck_svd(double[] M, double[] U, double[] S, double[] V) voidcopy_and_downsample(float[] destination, int destinationOffset, float[] source, int sourceOffset, int width, int height, int numOctaves) ------------------------------------------------------------------voidcopy_and_upsample(float[] destination, int destinationOffset, float[] source, int sourceOffset, int width, int height) ------------------------------------------------------------------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, Vector<float[][]> descriptors, int liopNumSpatialBins, int liopNumNeighbors, float liopRadius, float liopIntensityThreshold, boolean outputInfo, Vector<Covdet.VlScaleSpace> gssVec, Vector<Covdet.VlScaleSpace> cssVec, Vector<Float> peak, Vector<Float> edge, Vector<Float> orientation, Vector<Float> laplacian) voiddemo()doubledet2(double[] A) getName(Covdet.VlCovDetMethod method) boolean(package private) intisign(int i) private doublelog2(double input) booleanneighbors2DGreatest(float v, float[] map, int mapOffset, int xo, int yo, double threshold) booleanneighbors2DLeast(float v, float[] map, int mapOffset, int xo, int yo, double threshold) booleanneighbors3DGreatest(float v, float[] map, int mapOffset, int xo, int yo, int zo, double threshold) booleanneighbors3DLeast(float v, float[] map, int mapOffset, int xo, int yo, int zo, double threshold) voidprod2(double[] R, double[] A, double[] B) voidqsort(Covdet.VlCovDetFeatureOrientation[] array, int length) voidqsort_recursive(Covdet.VlCovDetFeatureOrientation[] array, int begin, int end) voidqsort_swap(Covdet.VlCovDetFeatureOrientation[] array, int indexA, int indexB) voidActually runs the algorithm.(package private) doublesign(double x) voidvoidvoidvoidvoidvoidtransp2(double[] R, double[] A) intvl_covdet_append_feature(Covdet.VlCovDet self, Covdet.VlCovDetFeature feature) voidvoidvoidvl_covdet_drop_features_outside(Covdet.VlCovDet self, double margin) voidintvl_covdet_extract_affine_shape_for_frame(Covdet.VlCovDet self, Covdet.VlFrameOrientedEllipse adapted, Covdet.VlFrameOrientedEllipse frame) voidvl_covdet_extract_laplacian_scales_for_frame(Covdet.VlCovDet self, int[] numScales, Covdet.VlFrameOrientedEllipse frame) voidvl_covdet_extract_orientations_for_frame(Covdet.VlCovDet self, int[] numOrientations, Covdet.VlFrameOrientedEllipse frame) intvl_covdet_extract_patch_for_frame(Covdet.VlCovDet self, float[] patch, int resolution, double extent, double sigma, Covdet.VlFrameOrientedEllipse frame) intvl_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) booleanbooleandoubledoubleintdoubleint[]vl_covdet_get_laplacian_scales_statistics(Covdet.VlCovDet self, int[] numScales) intdoubleintintintintdoubleboolean(package private) Covdet.VlCovDetvl_covdet_new(Covdet.VlCovDetMethod method) intvl_covdet_put_image(Covdet.VlCovDet self, float[] image, int width, int height) voidvoidvl_covdet_set_aa_accurate_smoothing(Covdet.VlCovDet self, boolean x) voidvl_covdet_set_allow_padded_warping(Covdet.VlCovDet self, boolean t) voidvl_covdet_set_base_scale(Covdet.VlCovDet self, double s) voidvl_covdet_set_edge_threshold(Covdet.VlCovDet self, double edgeThreshold) voidvl_covdet_set_first_octave(Covdet.VlCovDet self, int o) voidvl_covdet_set_laplacian_peak_threshold(Covdet.VlCovDet self, double peakThreshold) voidvl_covdet_set_max_num_orientations(Covdet.VlCovDet self, int m) voidvl_covdet_set_non_extrema_suppression_threshold(Covdet.VlCovDet self, double x) voidvl_covdet_set_num_octaves(Covdet.VlCovDet self, int o) voidvl_covdet_set_octave_resolution(Covdet.VlCovDet self, int r) voidvl_covdet_set_peak_threshold(Covdet.VlCovDet self, double peakThreshold) voidvl_covdet_set_transposed(Covdet.VlCovDet self, boolean t) int[]vl_find_local_extrema_2(int[] extrema, int[] numExtrema, int[] bufferSize, float[] map, int mapOffset, int width, int height, double threshold) int[]vl_find_local_extrema_3(int[] extrema, int[] numExtrema, int[] bufferSize, float[] map, int mapOffset, int width, int height, int depth, double threshold) intvl_gaussian_elimination(double[] A, int numRows, int numColumns) intvl_get_frame_size(Covdet.VlFrameType frameType) vl_get_frame_type(boolean affineAdaptation, boolean orientation) voidvl_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) voidvl_imgradient_f(float[] xGradient, float[] yGradient, int gradWidthStride, int gradHeightStride, float[] image, int imageOffset, int imageWidth, int imageHeight, int imageStride) voidvl_imgradient_polar_f(float[] gradientModulus, float[] gradientAngle, int gradientHorizontalStride, int gradHeightStride, float[] image, int imageWidth, int imageHeight, int imageStride) voidvl_imsmooth_f(float[] smoothed, int smoothedOffset, int smoothedStride, float[] image, int imageOffset, int width, int height, int stride, double sigmax, double sigmay) voidvl_lapack_dlasv2(double[] smin, double[] smax, double[] sv, double[] cv, double[] su, double[] cu, double f, double g, double h) doublevl_mod_2pi(double x) booleanvl_refine_local_extreum_2(Covdet.VlCovDetExtremum2 refined, float[] map, int mapOffsetOriginal, int width, int height, int x, int y) booleanvl_refine_local_extreum_3(Covdet.VlCovDetExtremum3 refined, float[] map, int mapOffsetOriginal, int width, int height, int depth, int x, int y, int z) voidvl_scalespace_get_default_geometry(int width, int height) float[]vl_scalespace_get_level(Covdet.VlScaleSpace self, int o, int s, int[] levelOffset) doublevl_scalespace_get_level_sigma(Covdet.VlScaleSpace self, int o, int s) ------------------------------------------------------------------vl_scalespace_get_octave_geometry(Covdet.VlScaleSpace self, int o) ------------------------------------------------------------------voidvl_scalespace_put_image(Covdet.VlScaleSpace self, float[] image) booleanintVL_SHIFT_LEFT(int x, int n) intvl_solve_linear_system_2(double[] x, double[] A, double[] b) intvl_solve_linear_system_3(double[] x, double[] A, double[] b) voidvl_svd2(double[] S, double[] U, double[] V, double[] M) Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
VL_EPSILON_D
double VL_EPSILON_D -
VL_ERR_OK
int VL_ERR_OK------------------------------------------------------------------ -
VL_ERR_OVERFLOW
int VL_ERR_OVERFLOWinvalid input: '<' No error -
VL_ERR_ALLOC
int VL_ERR_ALLOCinvalid input: '<' Buffer overflow error -
VL_ERR_BAD_ARG
int VL_ERR_BAD_ARGinvalid input: '<' Resource allocation error -
VL_ERR_IO
int VL_ERR_IOinvalid input: '<' Bad argument or illegal data error -
VL_ERR_EOF
int VL_ERR_EOFinvalid input: '<' Input/output error -
VL_PAD_BY_ZERO
int VL_PAD_BY_ZERO -
VL_PAD_BY_CONTINUITY
int VL_PAD_BY_CONTINUITYinvalid input: '<' @brief Pad with zeroes. -
VL_PAD_MASK
int VL_PAD_MASKinvalid input: '<' @brief Pad by continuity. -
VL_TRANSPOSE
int VL_TRANSPOSEinvalid input: '<' @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 Details
-
Covdet
public Covdet()
-
-
Method Details
-
vl_get_frame_size
- Parameters:
frameType- identifier of the type of frame.- Returns:
- size of the corresponding frame structure in bytes.
-
vl_get_frame_type
- 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:
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.M- matrix.
-
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.
-
getName
-
vl_covdet_new
- Parameters:
method- method for covariant feature detection.- Returns:
- new covariant detector.
-
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
- Parameters:
self- object. This function removes any buffered features and frees other internal buffers.
-
vl_scalespace_delete
- Parameters:
self- object to delete.
-
vl_covdet_delete
- Parameters:
self- object.
-
vl_covdet_append_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
- 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
- Parameters:
self- object.image- image to process.width- image width.height- image height.- Returns:
- status.
-
_vl_scalespace_fill_octave
- 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
- 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
- Parameters:
self- object.o- octave to initialize. The function initializes the first level of octave @a o from the content of octaveo - 1.
-
vl_scalespace_get_level
- 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 befloor(width/2^d)pixels wide andfloor(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
------------------------------------------------------------------- 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
------------------------------------------------------------------- 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_get_geometry
- Parameters:
self- object.- Returns:
- the scale space geometry.
-
vl_scalespacegeometry_is_equal
public boolean vl_scalespacegeometry_is_equal(Covdet.VlScaleSpaceGeometry a, Covdet.VlScaleSpaceGeometry b) - Parameters:
a- first geometry.b- second geometry.- Returns:
- true if equal.
-
vl_scalespace_new_with_geometry
------------------------------------------------------------------- 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_scalespace_get_octave_geometry
public Covdet.VlScaleSpaceOctaveGeometry vl_scalespace_get_octave_geometry(Covdet.VlScaleSpace self, int o) - Parameters:
self- object.o- octave index.- Returns:
- the geometry of octave @a o.
-
VL_SHIFT_LEFT
public int VL_SHIFT_LEFT(int x, int n) - Parameters:
x- value.n- number of shift positions.- Returns:
- @c x invalid input: '<'invalid input: '<' n . The macro is equivalent to the builtin @c invalid input: '<'invalid input: '<' operator, but it supports negative shifts too.
-
is_valid_geometry
-
_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
- 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
- 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 counting2*resolution+1pixels. 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
- 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_get_features
- Returns:
- frames stored in the detector.
-
vl_covdet_extract_affine_shape
- 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_compare_orientations_descending
public int _vl_covdet_compare_orientations_descending(Covdet.VlCovDetFeatureOrientation a, Covdet.VlCovDetFeatureOrientation b) -
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
-
qsort_recursive
- 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
-
qsort_swap
-
vl_covdet_extract_orientations
- 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_check_frame_inside
public boolean _vl_covdet_check_frame_inside(Covdet.VlCovDet self, Covdet.VlFrameOrientedEllipse frame, double margin) -
vl_covdet_drop_features_outside
- 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
- Parameters:
self- object.- Returns:
- whether images are transposed.
-
vl_covdet_set_transposed
- Parameters:
self- object.t- whether images are transposed.
-
vl_covdet_get_edge_threshold
- Parameters:
self- object.- Returns:
- the edge threshold.
-
vl_covdet_set_edge_threshold
- Parameters:
self- object.edgeThreshold- the edge threshold. The edge threshold must be non-negative.
-
vl_covdet_get_peak_threshold
- Parameters:
self- object.- Returns:
- the peak threshold.
-
vl_covdet_set_peak_threshold
- Parameters:
self- object.peakThreshold- the peak threshold. The peak threshold must be non-negative.
-
vl_covdet_get_laplacian_peak_threshold
- 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
- Parameters:
self- object.peakThreshold- the Laplacian peak threshold. The peak threshold must be non-negative.
-
vl_covdet_get_first_octave
- Parameters:
self- object.- Returns:
- index of the first octave.
-
vl_covdet_set_first_octave
- Parameters:
self- object.o- index of the first octave. Calling this function resets the detector.
-
vl_covdet_get_num_octaves
- Parameters:
self- object.- Returns:
- maximal number of octaves.
-
vl_covdet_get_base_scale
- Parameters:
self- object.- Returns:
- The base scale.
-
vl_covdet_set_num_octaves
- Parameters:
self- object.o- max number of octaves. Calling this function resets the detector.
-
vl_covdet_set_base_scale
- Parameters:
self- object.s- the base scale. Calling this function resets the detector.
-
vl_covdet_set_max_num_orientations
- Parameters:
self- object.m- the max number of orientations. Calling this function resets the detector.
-
vl_covdet_get_octave_resolution
- Parameters:
self- object.- Returns:
- octave resolution.
-
vl_covdet_set_octave_resolution
- Parameters:
self- object.r- octave resoltuion. Calling this function resets the detector.
-
vl_covdet_get_aa_accurate_smoothing
- Parameters:
self- object.- Returns:
- @c true if accurate smoothing is used.
-
vl_covdet_set_aa_accurate_smoothing
- Parameters:
self- object.x- whether accurate smoothing should be usd.
-
vl_covdet_get_max_num_orientations
- Parameters:
self- object.- Returns:
- maximal number of orientations.
-
vl_covdet_get_non_extrema_suppression_threshold
- Parameters:
self- object.- Returns:
- threshold.
-
vl_covdet_set_non_extrema_suppression_threshold
- Parameters:
self- object.x- threshold.
-
vl_covdet_get_num_non_extrema_suppressed
- Parameters:
self- object.- Returns:
- number.
-
vl_covdet_get_gss
- 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
- 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
- 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
- Parameters:
self- object.- Returns:
- whether padded warped patches are computed.
-
vl_covdet_set_allow_padded_warping
- 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, Vector<float[][]> descriptors, int liopNumSpatialBins, int liopNumNeighbors, float liopRadius, float liopIntensityThreshold, boolean outputInfo, Vector<Covdet.VlScaleSpace> gssVec, Vector<Covdet.VlScaleSpace> cssVec, Vector<Float> peak, Vector<Float> edge, Vector<Float> orientation, Vector<Float> laplacian) -
demo
public void demo() -
runAlgorithm
public void runAlgorithm()Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithmin classAlgorithmBase
-