Covariant feature detectors - Definition. More...
Data Structures | |
struct | VlCovDet |
Covariant feature detector. More... |
Functions | |
static int | _vl_resize_buffer (void **buffer, vl_size *bufferSize, vl_size targetSize) |
Reallocate buffer. | |
static int | _vl_enlarge_buffer (void **buffer, vl_size *bufferSize, vl_size targetSize) |
Enlarge buffer. | |
vl_size | vl_find_local_extrema_3 (vl_index **extrema, vl_size *bufferSize, float const *map, vl_size width, vl_size height, vl_size depth, double threshold) |
Find extrema in 3D function. | |
vl_size | vl_find_local_extrema_2 (vl_index **extrema, vl_size *bufferSize, float const *map, vl_size width, vl_size height, double threshold) |
Find extrema in 3D function. | |
vl_bool | vl_refine_local_extreum_3 (VlCovDetExtremum3 *refined, float const *map, vl_size width, vl_size height, vl_size depth, vl_index x, vl_index y, vl_index z) |
Refine extrema in 3D function. | |
vl_bool | vl_refine_local_extreum_2 (VlCovDetExtremum2 *refined, float const *map, vl_size width, vl_size height, vl_index x, vl_index y) |
Refine extrema in 3D function. | |
VlCovDet * | vl_covdet_new (VlCovDetMethod method) |
Create a new object instance. | |
void | vl_covdet_reset (VlCovDet *self) |
Reset object. | |
void | vl_covdet_delete (VlCovDet *self) |
Delete object instance. | |
int | vl_covdet_append_feature (VlCovDet *self, VlCovDetFeature const *feature) |
Append a feature to the internal buffer. | |
int | vl_covdet_put_image (VlCovDet *self, float const *image, vl_size width, vl_size height) |
Detect features in an image. | |
static void | _vl_det_hessian_response (float *hessian, float const *image, vl_size width, vl_size height, double step, double sigma) |
Scaled derminant of the Hessian filter. | |
static void | _vl_harris_response (float *harris, float const *image, vl_size width, vl_size height, double step, double sigma, double sigmaI, double alpha) |
Scale-normalised Harris response. | |
static void | _vl_dog_response (float *dog, float const *level1, float const *level2, vl_size width, vl_size height) |
Difference of Gaussian. | |
void | vl_covdet_detect (VlCovDet *self) |
Detect scale-space features. | |
vl_bool | vl_covdet_extract_patch_helper (VlCovDet *self, double *sigma1, double *sigma2, float *patch, vl_size resolution, double extent, double sigma, double(A_)[4], double(T_)[2], double d1, double d2) |
Helper for extracting patches. | |
vl_bool | vl_covdet_extract_patch_for_frame (VlCovDet *self, float *patch, vl_size resolution, double extent, double sigma, VlFrameOrientedEllipse frame) |
Helper for extracting patches. | |
int | vl_covdet_extract_affine_shape_for_frame (VlCovDet *self, VlFrameOrientedEllipse *adapted, VlFrameOrientedEllipse frame) |
Extract the affine shape for a feature frame. | |
void | vl_covdet_extract_affine_shape (VlCovDet *self) |
Extract the affine shape for the stored features. | |
VlCovDetFeatureOrientation * | vl_covdet_extract_orientations_for_frame (VlCovDet *self, vl_size *numOrientations, VlFrameOrientedEllipse frame) |
Extract the orientation(s) for a feature frame. | |
void | vl_covdet_extract_orientations (VlCovDet *self) |
Extract the orientation(s) for the stored features. | |
VlCovDetFeatureLaplacianScale * | vl_covdet_extract_laplacian_scales_for_frame (VlCovDet *self, vl_size *numScales, VlFrameOrientedEllipse frame) |
Extract the Laplacian scale(s) for a feature frame. | |
void | vl_covdet_extract_laplacian_scales (VlCovDet *self) |
Extract the Laplacian scales for the stored features. | |
void | vl_covdet_drop_features_outside (VlCovDet *self, double margin) |
Drop features (partially) outside the image. | |
vl_bool | vl_covdet_get_transposed (VlCovDet const *self) |
Get wether images are passed in transposed. | |
void | vl_covdet_set_transposed (VlCovDet *self, vl_bool t) |
Set the index of the first octave. | |
double | vl_covdet_get_edge_threshold (VlCovDet const *self) |
Get the edge threshold. | |
void | vl_covdet_set_edge_threshold (VlCovDet *self, double edgeThreshold) |
Set the edge threshold. | |
double | vl_covdet_get_peak_threshold (VlCovDet const *self) |
Get the peak threshold. | |
void | vl_covdet_set_peak_threshold (VlCovDet *self, double peakThreshold) |
Set the peak threshold. | |
vl_index | vl_covdet_get_first_octave (VlCovDet const *self) |
Get the index of the first octave. | |
void | vl_covdet_set_first_octave (VlCovDet *self, vl_index o) |
Set the index of the first octave. | |
vl_size | vl_covdet_get_octave_resolution (VlCovDet const *self) |
Get the octave resolution. | |
void | vl_covdet_set_octave_resolution (VlCovDet *self, vl_size r) |
Set the octave resolutuon. | |
vl_bool | vl_covdet_get_aa_accurate_smoothing (VlCovDet const *self) |
Get whether affine adaptation uses accurate smoothing. | |
void | vl_covdet_set_aa_accurate_smoothing (VlCovDet *self, vl_bool x) |
Set whether affine adaptation uses accurate smoothing. | |
double | vl_covdet_get_non_extrema_suppression_threshold (VlCovDet const *self) |
Get the non-extrema suppression threshold. | |
void | vl_covdet_set_non_extrema_suppression_threshold (VlCovDet *self, double x) |
Set the non-extrema suppression threshod. | |
vl_size | vl_covdet_get_num_non_extrema_suppressed (VlCovDet const *self) |
Get the number of non-extrema suppressed. | |
vl_size | vl_covdet_get_num_features (VlCovDet const *self) |
Get number of stored frames. | |
void * | vl_covdet_get_features (VlCovDet *self) |
Get the stored frames. | |
VlScaleSpace * | vl_covdet_get_gss (VlCovDet const *self) |
Get the Gaussian scale space. | |
VlScaleSpace * | vl_covdet_get_css (VlCovDet const *self) |
Get the cornerness measure scale space. | |
vl_size const * | vl_covdet_get_laplacian_scales_statistics (VlCovDet const *self, vl_size *numScales) |
Get the number of features found with a certain number of scales. |
Detailed Description
Function Documentation
|
static |
- 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.
|
static |
- 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.
- Parameters:
-
buffer bufferSize targetSize
- Returns:
- error code
|
static |
- 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.
- Parameters:
-
buffer bufferSize targetSize
- Returns:
- error code
int vl_covdet_append_feature | ( | VlCovDet * | self, |
VlCovDetFeature const * | feature | ||
) |
- Parameters:
-
self object. feature a pointer to the feature to append.
- Returns:
- status.
The feature is copied. The function may fail with status
equal to VL_ERR_ALLOC if there is insufficient memory.
void vl_covdet_delete | ( | VlCovDet * | self | ) |
- Parameters:
-
self object.
void vl_covdet_detect | ( | VlCovDet * | self | ) |
- Parameters:
-
method
- Returns:
- new covariant detector.
void vl_covdet_drop_features_outside | ( | VlCovDet * | self, |
double | margin | ||
) |
- Parameters:
-
self object. margin geometric marging.
The feature extent is defined by maring
. A bounding box in the normalised feature frame containin a circle of radius maring is created and mapped to the image by the feature frame transformation. Then the feature is dropped if the bounding box is not contained in the image.
For example, setting margin
to zero drops a feature only if its center is not contained.
Typically a valua of margin
equal to 1 or 2 is used.
void vl_covdet_extract_affine_shape | ( | VlCovDet * | self | ) |
- Parameters:
-
self object.
This function may discard features for which no affine shape can reliably be detected.
int vl_covdet_extract_affine_shape_for_frame | ( | VlCovDet * | self, |
VlFrameOrientedEllipse * | adapted, | ||
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.
void vl_covdet_extract_laplacian_scales | ( | 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.
VlCovDetFeatureLaplacianScale* vl_covdet_extract_laplacian_scales_for_frame | ( | VlCovDet * | self, |
vl_size * | numScales, | ||
VlFrameOrientedEllipse | frame | ||
) |
- Parameters:
-
self object. numScales the number of detected scales.
- Returns:
- an array of detected scales.
The function returns NULL
if memory is insufficient.
void vl_covdet_extract_orientations | ( | 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.
VlCovDetFeatureOrientation* vl_covdet_extract_orientations_for_frame | ( | VlCovDet * | self, |
vl_size * | numOrientations, | ||
VlFrameOrientedEllipse | frame | ||
) |
- Parameters:
-
self object. numOrientations the number of detected orientations.
- Returns:
- an array of detected orientations with their scores.
The returned array is a matrix of size \( 2 \times n \) where n is the number of detected orientations.
The function returns NULL
if memory is insufficient.
vl_bool vl_covdet_extract_patch_for_frame | ( | VlCovDet * | self, |
float * | patch, | ||
vl_size | resolution, | ||
double | extent, | ||
double | sigma, | ||
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 baed on the affine warping specified by frame in such a way that the resulting smoothing of the image is sigma (in the patch frame).
The transformation is specified by the matrices A
and T
embedded in the feature frame. Note that this transformation maps pixels from the patch frame to the image frame.
vl_bool vl_covdet_extract_patch_helper | ( | VlCovDet * | self, |
double * | sigma1, | ||
double * | sigma2, | ||
float * | patch, | ||
vl_size | resolution, | ||
double | extent, | ||
double | sigma, | ||
double(A_) | [4], | ||
double(T_) | [2], | ||
double | d1, | ||
double | d2 | ||
) |
- Parameters:
-
self object. sigma1 actual patch smoothing along the first axis (out). sigma2 actual patch smoothing along the second axis (out). 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. d2 second singular value of A.
vl_bool vl_covdet_get_aa_accurate_smoothing | ( | VlCovDet const * | self | ) |
- Parameters:
-
self object.
- Returns:
true
if accurate smoothing is used.
VlScaleSpace* vl_covdet_get_css | ( | VlCovDet const * | self | ) |
- Returns:
- cornerness measure scale space.
A cornerness measure scale space exists only after calling vl_covdet_detect. Otherwise the function returns NULL
.
double vl_covdet_get_edge_threshold | ( | VlCovDet const * | self | ) |
- Parameters:
-
self ::VlCovDet object.
- Returns:
- the edge threshold.
void* vl_covdet_get_features | ( | VlCovDet * | self | ) |
- Returns:
- frames stored in the detector.
vl_index vl_covdet_get_first_octave | ( | VlCovDet const * | self | ) |
- Parameters:
-
self ::VlCovDet object.
- Returns:
- index of the first octave.
VlScaleSpace* vl_covdet_get_gss | ( | VlCovDet const * | self | ) |
- Returns:
- Gaussian scale space.
A Gaussian scale space exists only after calling vl_covdet_put_image. Otherwise the function returns NULL
.
vl_size const* vl_covdet_get_laplacian_scales_statistics | ( | VlCovDet const * | self, |
vl_size * | numScales | ||
) |
- Parameters:
-
sellf 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
double vl_covdet_get_non_extrema_suppression_threshold | ( | VlCovDet const * | self | ) |
- Parameters:
-
self object.
- Returns:
- threshold.
vl_size vl_covdet_get_num_features | ( | VlCovDet const * | self | ) |
- Returns:
- number of frames stored in the detector.
vl_size vl_covdet_get_num_non_extrema_suppressed | ( | VlCovDet const * | self | ) |
- Parameters:
-
self object.
- Returns:
- number.
vl_size vl_covdet_get_octave_resolution | ( | VlCovDet const * | self | ) |
- Parameters:
-
self ::VlCovDet object.
- Returns:
- octave resolution.
double vl_covdet_get_peak_threshold | ( | VlCovDet const * | self | ) |
- Parameters:
-
self ::VlCovDet object.
- Returns:
- the peak threshold.
vl_bool vl_covdet_get_transposed | ( | VlCovDet const * | self | ) |
- Parameters:
-
self ::VlCovDet object.
- Returns:
- whether images are transposed.
VlCovDet* vl_covdet_new | ( | VlCovDetMethod | method | ) |
- Parameters:
-
method method for covariant feature detection.
- Returns:
- new covariant detector.
- Parameters:
-
self object. image image to process. width image width. height image height.
- Returns:
- status.
width and height must be at least one pixel. The function fails by returing VL_ERR_ALLOC if the memory is insufficient.
void vl_covdet_reset | ( | VlCovDet * | self | ) |
- Parameters:
-
self object.
This function removes any buffered features and frees other internal buffers.
void vl_covdet_set_aa_accurate_smoothing | ( | VlCovDet * | self, |
vl_bool | x | ||
) |
- Parameters:
-
self object. x whether accurate smoothing should be usd.
void vl_covdet_set_edge_threshold | ( | VlCovDet * | self, |
double | edgeThreshold | ||
) |
- Parameters:
-
self ::VlCovDet object. the edge threshold.
The edge threshold must be non-negative.
void vl_covdet_set_first_octave | ( | VlCovDet * | self, |
vl_index | o | ||
) |
- Parameters:
-
self ::VlCovDet object. index of the first octave.
Calling this function resets the detector.
void vl_covdet_set_non_extrema_suppression_threshold | ( | VlCovDet * | self, |
double | x | ||
) |
- Parameters:
-
self object. x threshold.
void vl_covdet_set_octave_resolution | ( | VlCovDet * | self, |
vl_size | r | ||
) |
- Parameters:
-
self ::VlCovDet object. octave resoltuion.
Calling this function resets the detector.
void vl_covdet_set_peak_threshold | ( | VlCovDet * | self, |
double | peakThreshold | ||
) |
- Parameters:
-
self ::VlCovDet object. the peak threshold.
The peak threshold must be non-negative.
void vl_covdet_set_transposed | ( | VlCovDet * | self, |
vl_bool | t | ||
) |
- Parameters:
-
self ::VlCovDet object. t whether images are transposed.
vl_size vl_find_local_extrema_2 | ( | vl_index ** | extrema, |
vl_size * | bufferSize, | ||
float const * | map, | ||
vl_size | width, | ||
vl_size | height, | ||
double | threshold | ||
) |
- Parameters:
-
extrema bufferSize map a 3D array representing the map. width of the map. height of the map. deepth of the map. threshold minumum extremum value.
- Returns:
- number of extrema found.
vl_size vl_find_local_extrema_3 | ( | vl_index ** | extrema, |
vl_size * | bufferSize, | ||
float const * | map, | ||
vl_size | width, | ||
vl_size | height, | ||
vl_size | depth, | ||
double | threshold | ||
) |
- Parameters:
-
extrema bufferSize map a 3D array representing the map. width of the map. height of the map. deepth of the map. threshold minumum extremum value.
- Returns:
- number of extrema found.
vl_bool vl_refine_local_extreum_2 | ( | VlCovDetExtremum2 * | refined, |
float const * | map, | ||
vl_size | width, | ||
vl_size | height, | ||
vl_index | x, | ||
vl_index | y | ||
) |
- Parameters:
-
refined refined extrema. map a 3D array representing the map. width of the map. height of the map. deepth of the map. x y z
- Returns:
- extrema refinement was stable.
vl_bool vl_refine_local_extreum_3 | ( | VlCovDetExtremum3 * | refined, |
float const * | map, | ||
vl_size | width, | ||
vl_size | height, | ||
vl_size | depth, | ||
vl_index | x, | ||
vl_index | y, | ||
vl_index | z | ||
) |
- Parameters:
-
refined refined extrema. map a 3D array representing the map. width of the map. height of the map. deepth of the map. x y z
- Returns:
- extrema refinement was stable.