dsift.c File Reference
Dense SIFT (DSIFT) - Definition. More...
#include "dsift.h"#include "pgm.h"#include "mathop.h"#include "imopv.h"#include <math.h>#include <string.h>Go to the source code of this file.
Functions | |
| float * | _vl_dsift_new_kernel (int binSize, int numBins, int binIndex, double windowSize) |
| Initialize new convolution kernel. | |
| float | _vl_dsift_normalize_histogram (float *begin, float *end) |
| Normalize histogram. | |
| static void | _vl_dsift_free_buffers (VlDsiftFilter *self) |
| Free internal buffers. | |
| void | _vl_dsift_update_buffers (VlDsiftFilter *self) |
| Updates internal buffers to current geometry. | |
| static void | _vl_dsift_alloc_buffers (VlDsiftFilter *self) |
| Allocate internal buffers. | |
| VlDsiftFilter * | vl_dsift_new (int imWidth, int imHeight) |
| Create a new DSIFT filter. | |
| VlDsiftFilter * | vl_dsift_new_basic (int imWidth, int imHeight, int step, int binSize) |
| Create a new DSIFT filter (basic interface). | |
| void | vl_dsift_delete (VlDsiftFilter *self) |
| Delete DSIFT filter. | |
| void | _vl_dsift_with_gaussian_window (VlDsiftFilter *self) |
| Process with Gaussian window. | |
| void | _vl_dsift_with_flat_window (VlDsiftFilter *self) |
| Process with flat window. | |
| void | vl_dsift_process (VlDsiftFilter *self, float const *im) |
| Compute keypoints and descriptors. | |
Detailed Description
For internal use only.
Definition in file dsift.c.
Function Documentation
| static void _vl_dsift_alloc_buffers | ( | VlDsiftFilter * | self | ) | [static] |
For internal use only.
- Parameters:
-
self DSIFT filter.
The function (re)allocates the internal buffers in accordance with the current image and descriptor geometry.
Definition at line 382 of file dsift.c.
References _vl_dsift_free_buffers(), _vl_dsift_update_buffers(), vl_dsift_get_descriptor_size(), vl_dsift_get_keypoint_num(), and vl_malloc().
Referenced by vl_dsift_process().
| static void _vl_dsift_free_buffers | ( | VlDsiftFilter * | self | ) | [static] |
For internal use only.
- Parameters:
-
self DSIFT filter.
Definition at line 327 of file dsift.c.
References vl_free().
Referenced by _vl_dsift_alloc_buffers(), and vl_dsift_delete().
| float* _vl_dsift_new_kernel | ( | int | binSize, | |
| int | numBins, | |||
| int | binIndex, | |||
| double | windowSize | |||
| ) |
For internal use only.
- Parameters:
-
binSize numBins binIndex negative to use flat window. windowSize
- Returns:
- a pointer to new filter.
Definition at line 258 of file dsift.c.
References vl_malloc().
Referenced by _vl_dsift_with_gaussian_window().
| float _vl_dsift_normalize_histogram | ( | float * | begin, | |
| float * | end | |||
| ) | [inline] |
For internal use only.
- Parameters:
-
begin first element of the histogram. end last plus one element of the histogram.
The function divides the specified histogram by its l2 norm.
Definition at line 305 of file dsift.c.
References VL_EPSILON_F, and vl_fast_sqrt_f().
Referenced by vl_dsift_process().
| void _vl_dsift_update_buffers | ( | VlDsiftFilter * | self | ) |
For internal use only.
Definition at line 354 of file dsift.c.
Referenced by _vl_dsift_alloc_buffers(), vl_dsift_new(), vl_dsift_set_bounds(), vl_dsift_set_geometry(), and vl_dsift_set_steps().
| void _vl_dsift_with_flat_window | ( | VlDsiftFilter * | self | ) | [inline] |
For internal use only.
- Parameters:
-
self DSIFT filter object.
Definition at line 584 of file dsift.c.
References vl_dsift_get_descriptor_size(), vl_imconvcoltri_f(), VL_PAD_BY_CONTINUITY, and VL_TRANSPOSE.
Referenced by vl_dsift_process().
| void _vl_dsift_with_gaussian_window | ( | VlDsiftFilter * | self | ) | [inline] |
For internal use only.
- Parameters:
-
self DSIFT filter.
Definition at line 509 of file dsift.c.
References _vl_dsift_new_kernel(), vl_dsift_get_descriptor_size(), vl_free(), vl_imconvcol_vf(), VL_PAD_BY_CONTINUITY, and VL_TRANSPOSE.
Referenced by vl_dsift_process().
| void vl_dsift_delete | ( | VlDsiftFilter * | self | ) |
- Parameters:
-
self DSIFT filter.
Definition at line 494 of file dsift.c.
References _vl_dsift_free_buffers(), and vl_free().
| VlDsiftFilter* vl_dsift_new | ( | int | imWidth, | |
| int | imHeight | |||
| ) |
- Parameters:
-
imWidth width of the image. imHeight height of the image
- Returns:
- new filter.
Definition at line 423 of file dsift.c.
References _vl_dsift_update_buffers(), VL_FALSE, and vl_malloc().
Referenced by vl_dsift_new_basic().
| VlDsiftFilter* vl_dsift_new_basic | ( | int | imWidth, | |
| int | imHeight, | |||
| int | step, | |||
| int | binSize | |||
| ) |
- Parameters:
-
imWidth width of the image. imHeight height of the image. step sampling step. binSize bin size.
The descriptor geometry matches the standard SIFT descriptor.
- Returns:
- new filter.
Definition at line 477 of file dsift.c.
References VlDsiftDescriptorGeometry_::binSizeX, VlDsiftDescriptorGeometry_::binSizeY, vl_dsift_get_geometry(), vl_dsift_new(), vl_dsift_set_geometry(), and vl_dsift_set_steps().
| void vl_dsift_process | ( | VlDsiftFilter * | self, | |
| float const * | im | |||
| ) |
- Parameters:
-
self DSIFT filter. im image data.
Definition at line 674 of file dsift.c.
References _vl_dsift_alloc_buffers(), _vl_dsift_normalize_histogram(), _vl_dsift_with_flat_window(), _vl_dsift_with_gaussian_window(), VlDsiftKeypoint_::norm, vl_dsift_get_descriptor_size(), vl_fast_atan2_f(), vl_fast_sqrt_f(), vl_floor_f(), vl_mod_2pi_f(), VL_PI, VlDsiftKeypoint_::x, and VlDsiftKeypoint_::y.